Commit d7774785 authored by Nishka Dasgupta's avatar Nishka Dasgupta Committed by Oleksandr Andrushchenko

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: default avatarNishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: default avatarOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Reviewed-by: default avatarOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190813062712.24993-1-nishkadg.linux@gmail.com
parent 596cb852
...@@ -46,7 +46,7 @@ static void fb_destroy(struct drm_framebuffer *fb) ...@@ -46,7 +46,7 @@ static void fb_destroy(struct drm_framebuffer *fb)
drm_gem_fb_destroy(fb); drm_gem_fb_destroy(fb);
} }
static struct drm_framebuffer_funcs fb_funcs = { static const struct drm_framebuffer_funcs fb_funcs = {
.destroy = fb_destroy, .destroy = fb_destroy,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment