Skip to contentSkip to conversation

staging: sm750fb: add missing const to g_fbmode array

PATCH Superseded Eyüp Kerem Baş 2 participants 2 messages Feb 15 – Feb 16

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: sm750fb: add missing const to g_fbmode array

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.

---
 drivers/staging/sm750fb/sm750.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/sm750fb/sm750.c +1 -1
index fecd7457e615..15b5de33b8d9 100644
@@ -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;
Signature · 1 line
2.43.0
#1 lore raw
Quoted 1 line · Eyüp Kerem Baş

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

Quoted 3 lines

---