From: Nishka Dasgupta <nishkadg.linux@gmail.com>
To: bernie@plugable.com, b.zolnierkie@samsung.com,
linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org
Cc: Nishka Dasgupta <nishkadg.linux@gmail.com>
Subject: [PATCH] udlfb: Make dlfb_ops constant
Date: Mon, 19 Aug 2019 07:52:49 +0000 [thread overview]
Message-ID: <20190819075236.1051-1-nishkadg.linux@gmail.com> (raw)
Static structure dlfb_ops, of type fb_ops, is not used except to be
copied into another variable. Hence make dlfb_ops constant to protect it
from unintended modification.
Issue found with Coccinelle.
Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
---
drivers/video/fbdev/udlfb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/udlfb.c b/drivers/video/fbdev/udlfb.c
index c328e8265cb1..fe373b63ddd6 100644
--- a/drivers/video/fbdev/udlfb.c
+++ b/drivers/video/fbdev/udlfb.c
@@ -1183,7 +1183,7 @@ static int dlfb_ops_blank(int blank_mode, struct fb_info *info)
return 0;
}
-static struct fb_ops dlfb_ops = {
+static const struct fb_ops dlfb_ops = {
.owner = THIS_MODULE,
.fb_read = fb_sys_read,
.fb_write = dlfb_ops_write,
--
2.19.1
next reply other threads:[~2019-08-19 7:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20190819075250epcas3p207fe8748142f91b3d2d7df7c0803ed2e@epcas3p2.samsung.com>
2019-08-19 7:52 ` Nishka Dasgupta [this message]
2019-08-19 14:10 ` [PATCH] udlfb: Make dlfb_ops constant Bartlomiej Zolnierkiewicz
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=20190819075236.1051-1-nishkadg.linux@gmail.com \
--to=nishkadg.linux@gmail.com \
--cc=b.zolnierkie@samsung.com \
--cc=bernie@plugable.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-fbdev@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).