Re: [PATCH][next] drm/virtio: Use struct_size() helper in kmalloc()

2020-08-17 Thread Gerd Hoffmann
On Wed, Jun 17, 2020 at 04:57:07PM -0500, Gustavo A. R. Silva wrote: > Make use of the struct_size() helper instead of an open-coded version > in order to avoid any potential type mistakes. > > This code was detected with the help of Coccinelle and, audited and > fixed manually. > > Signed-off-by

[PATCH][next] drm/virtio: Use struct_size() helper in kmalloc()

2020-06-17 Thread Gustavo A. R. Silva
Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. This code was detected with the help of Coccinelle and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/virtio/virtgpu_gem.c | 3 +-- 1 file ch