* [PATCH] udlfb: Make dlfb_ops constant
@ 2019-08-19 7:52 ` Nishka Dasgupta
0 siblings, 0 replies; 4+ messages in thread
From: Nishka Dasgupta @ 2019-08-19 7:52 UTC (permalink / raw)
To: bernie, b.zolnierkie, linux-fbdev, dri-devel; +Cc: Nishka Dasgupta
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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] udlfb: Make dlfb_ops constant
@ 2019-08-19 7:52 ` Nishka Dasgupta
0 siblings, 0 replies; 4+ messages in thread
From: Nishka Dasgupta @ 2019-08-19 7:52 UTC (permalink / raw)
To: bernie, b.zolnierkie, linux-fbdev, dri-devel; +Cc: Nishka Dasgupta
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] udlfb: Make dlfb_ops constant
2019-08-19 7:52 ` Nishka Dasgupta
@ 2019-08-19 14:10 ` Bartlomiej Zolnierkiewicz
-1 siblings, 0 replies; 4+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2019-08-19 14:10 UTC (permalink / raw)
To: Nishka Dasgupta; +Cc: linux-fbdev, bernie, dri-devel
On 8/19/19 9:52 AM, Nishka Dasgupta wrote:
> 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>
Patch queued for v5.4, thanks.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] udlfb: Make dlfb_ops constant
@ 2019-08-19 14:10 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 4+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2019-08-19 14:10 UTC (permalink / raw)
To: Nishka Dasgupta; +Cc: linux-fbdev, bernie, dri-devel
On 8/19/19 9:52 AM, Nishka Dasgupta wrote:
> 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>
Patch queued for v5.4, thanks.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-08-19 14:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20190819075250epcas3p207fe8748142f91b3d2d7df7c0803ed2e@epcas3p2.samsung.com>
2019-08-19 7:52 ` [PATCH] udlfb: Make dlfb_ops constant Nishka Dasgupta
2019-08-19 7:52 ` Nishka Dasgupta
2019-08-19 14:10 ` Bartlomiej Zolnierkiewicz
2019-08-19 14:10 ` Bartlomiej Zolnierkiewicz
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.