From: Nishka Dasgupta <nishkadg.linux@gmail.com>
To: hdegoede@redhat.com, airlied@linux.ie, daniel@ffwll.ch,
dri-devel@lists.freedesktop.org
Cc: Nishka Dasgupta <nishkadg.linux@gmail.com>
Subject: [PATCH] drm/vboxvideo: Make structure vbox_fb_helper_funcs constant
Date: Tue, 13 Aug 2019 11:55:48 +0530 [thread overview]
Message-ID: <20190813062548.24770-1-nishkadg.linux@gmail.com> (raw)
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>
---
drivers/gpu/drm/vboxvideo/vbox_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/vboxvideo/vbox_drv.c b/drivers/gpu/drm/vboxvideo/vbox_drv.c
index 02537ab9cc08..2b57ea3195f2 100644
--- a/drivers/gpu/drm/vboxvideo/vbox_drv.c
+++ b/drivers/gpu/drm/vboxvideo/vbox_drv.c
@@ -32,7 +32,7 @@ static const struct pci_device_id pciidlist[] = {
};
MODULE_DEVICE_TABLE(pci, pciidlist);
-static struct drm_fb_helper_funcs vbox_fb_helper_funcs = {
+static const struct drm_fb_helper_funcs vbox_fb_helper_funcs = {
.fb_probe = vboxfb_create,
};
--
2.19.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next reply other threads:[~2019-08-13 6:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-13 6:25 Nishka Dasgupta [this message]
2019-08-13 7:57 ` [PATCH] drm/vboxvideo: Make structure vbox_fb_helper_funcs constant Hans de Goede
2019-08-14 17:26 ` Daniel Vetter
2019-08-14 17:36 ` Hans de Goede
2019-08-14 17:51 ` Daniel Vetter
2019-08-14 18:42 ` Sam Ravnborg
2019-08-14 19:28 ` Daniel Vetter
2019-08-18 10:56 ` Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190813062548.24770-1-nishkadg.linux@gmail.com \
--to=nishkadg.linux@gmail.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=hdegoede@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.