]> git.baikalelectronics.ru Git - kernel.git/commit
drm/xen-front: Make structure fb_funcs constant
authorNishka Dasgupta <nishkadg.linux@gmail.com>
Tue, 13 Aug 2019 06:27:11 +0000 (11:57 +0530)
committerOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Mon, 19 Aug 2019 05:32:52 +0000 (08:32 +0300)
commitce5262b6e32907b8e0a0ab99a5e7114aae9e5978
tree10af369491062e5af618da2ff5cb84516428ed5b
parent0609f303561044005a512d387d37a4609fa05a94
drm/xen-front: Make structure fb_funcs constant

Static structure fb_funcs, of type drm_framebuffer_funcs, is used only
when it is passed to drm_gem_fb_create_with_funcs() as its last
argument. drm_gem_fb_create_with_funcs does not modify its lst argument
(fb_funcs) and hence fb_funcs is never modified. Therefore make fb_funcs
constant to protect it from further modification.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190813062712.24993-1-nishkadg.linux@gmail.com
drivers/gpu/drm/xen/xen_drm_front_kms.c