* [PATCH] staging: sm750fb: Mark g_noaccel, g_nomtrr and g_dualview as __ro_after_init
@ 2026-05-16 14:23 Len Bao
0 siblings, 0 replies; only message in thread
From: Len Bao @ 2026-05-16 14:23 UTC (permalink / raw)
To: Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman
Cc: Len Bao, linux-fbdev, linux-staging, linux-kernel
The 'g_noaccel', 'g_nomtrr' and 'g_dualview' variables are initialized
only during the init phase in the 'lynxfb_setup' function and never
changed. So, mark them as __ro_after_init.
Signed-off-by: Len Bao <len.bao@gmx.us>
---
drivers/staging/sm750fb/sm750.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 9f3e3d37e..99f5269f1 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -31,12 +31,12 @@
/* common var for all device */
static int g_hwcursor = 1;
-static int g_noaccel;
-static int g_nomtrr;
+static int g_noaccel __ro_after_init;
+static int g_nomtrr __ro_after_init;
static const char *g_fbmode[] = {NULL, NULL};
static const char *g_def_fbmode = "1024x768-32@60";
static char *g_settings;
-static int g_dualview;
+static int g_dualview __ro_after_init;
static char *g_option;
static const struct fb_videomode lynx750_ext[] = {
--
2.43.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-05-16 14:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-16 14:23 [PATCH] staging: sm750fb: Mark g_noaccel, g_nomtrr and g_dualview as __ro_after_init Len Bao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox