[PATCH] staging: sm750fb: add missing const to g_fbmode array

Subsystems: staging - silicon motion sm750 frame buffer driver, staging subsystem, the rest

STALE166d

2 messages, 2 authors, 2026-02-16 · open the first message on its own page

[PATCH] staging: sm750fb: add missing const to g_fbmode array

From: Eyüp Kerem Baş <hidden>
Date: 2026-02-15 21:31:48

Checkpatch reported a warning that the static const char * array should probably be static const char * const. This patch adds the missing const keyword to g_fbmode array, moving it to read-only memory.

Signed-off-by: Eyüp Kerem Baş <redacted>
---
 drivers/staging/sm750fb/sm750.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index fecd7457e615..15b5de33b8d9 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -33,7 +33,7 @@
 static int g_hwcursor = 1;
 static int g_noaccel;
 static int g_nomtrr;
-static const char *g_fbmode[] = {NULL, NULL};
+static const char * const g_fbmode[] = {NULL, NULL};
 static const char *g_def_fbmode = "1024x768-32@60";
 static char *g_settings;
 static int g_dualview;
-- 
2.43.0

Re: [PATCH] staging: sm750fb: add missing const to g_fbmode array

From: Ethan Tidmore <hidden>
Date: 2026-02-16 00:27:03

On Sun Feb 15, 2026 at 3:31 PM CST, Eyüp Kerem Baş wrote:
Checkpatch reported a warning that the static const char * array should probably be static const char * const. This patch adds the missing const keyword to g_fbmode array, moving it to read-only memory.
Please keep a maximum of 75 characters per line. Next time when
submitting a patch use "$ ./scripts/checkpatch.pl --strict <patch>" to
catch things like this.

Thanks,

ET
Signed-off-by: Eyüp Kerem Baş <redacted>
---
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help