Skip to contentSkip to conversation

staging: sm750fb: make fixId array static const char * const

PATCH Superseded Ignacio Peña 2 participants 2 messages Jul 18, 2025

Subsystems (2)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 staging: sm750fb: make fixId array static const char * const

Fix checkpatch warning for the fixId array only:
"WARNING: static const char * array should probably be
static const char * const"

The g_fbmode array cannot be made const as it is modified at runtime in lynxfb_setup() and lynx_alloc().

---
v3: Apologies for the confusion. v2 accidentally included changes to
g_fbmode which breaks the build. This version ONLY changes fixId which is never modified.

v2: Only change fixId array. The g_fbmode array is modified at

    runtime (lines 786, 788, 949, 953) and cannot be const.
 drivers/staging/sm750fb/sm750.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/sm750fb/sm750.c +1 -1
index 039e6875c894..c237a8f8eb59 100644
@@ -730,7 +730,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
 		"kernel HELPERS prepared vesa_modes",
 	};
 
-	static const char *fixId[2] = {
+	static const char * const fixId[2] = {
 		"sm750_fb1", "sm750_fb2",
 	};
 
Signature · 1 line
2.39.5 (Apple Git-154)
Reviewed-by on v3 1/1
#1 lore raw
Quoted 4 lines · Ignacio Peña

Fix checkpatch warning for the fixId array only:
"WARNING: static const char * array should probably be
static const char * const"

Quoted 8 lines

The g_fbmode array cannot be made const as it is modified at runtime in lynxfb_setup() and lynx_alloc().

---
v3: Apologies for the confusion. v2 accidentally included changes to
g_fbmode which breaks the build. This version ONLY changes fixId which is never modified.

Heh. No. The patch marked v2 was fine. Either v2 or this v3 is fine.

regards,
dan carpenter