Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/vboxvideo: Make structure vbox_fb_helper_funcs constant

The static structure vbox_fb_helper_funcs, of type drm_fb_helper_funcs,
is used only when it is passed as the third argument to
drm_fb_helper_fbdev_setup(), which does not modify it. Hence make it
constant to protect it from unintended modifications.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190813062548.24770-1-nishkadg.linux@gmail.com

authored by

Nishka Dasgupta and committed by
Hans de Goede
596cb852 f2cb60e9

+1 -1
+1 -1
drivers/gpu/drm/vboxvideo/vbox_drv.c
··· 32 32 }; 33 33 MODULE_DEVICE_TABLE(pci, pciidlist); 34 34 35 - static struct drm_fb_helper_funcs vbox_fb_helper_funcs = { 35 + static const struct drm_fb_helper_funcs vbox_fb_helper_funcs = { 36 36 .fb_probe = vboxfb_create, 37 37 }; 38 38