staging: sm750fb: Mark g_noaccel, g_nomtrr and g_dualview as __ro_after_init

Started by Len Bao on May 16, 2026

Subsystems (3)

Maintainers (5)

Show 1 more
DORMANTno replies LANDED

Status: Landed in mainline as ddf58ed94154 on 2026-05-21.

open the first message on its own page

Message details and related content
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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help