linux_dsm_epyc7002/drivers/gpu/drm/nouveau/nvif
Gustavo A. R. Silva 7b97492555 drm/nouveau/mmu: use struct_size() helper
Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes, in particular in the
context in which this code is being used.

So, replace the following form:

sizeof(*kind) + sizeof(*kind->data) * mmu->kind_nr;

with:

struct_size(kind, data, mmu->kind_nr)

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2019-08-23 12:55:31 +10:00
..
client.c
device.c
disp.c
driver.c
fifo.c
Kbuild drm/nouveau: fix bogus GPL-2 license header 2019-07-19 16:26:51 +10:00
mem.c
mmu.c drm/nouveau/mmu: use struct_size() helper 2019-08-23 12:55:31 +10:00
notify.c
object.c
user.c
userc361.c
vmm.c drm/nouveau/mmu: support initialisation of client-managed address-spaces 2019-02-20 09:00:00 +10:00