Skip to contentSkip to conversation

staging: sm750fb: Fix const pointer declaration

PATCH In review Denis Arzubov 2 participants 2 messages May 4 – May 11

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: sm750fb: Fix const pointer declaration

Make g_fbmode array pointer const to follow kernel coding style. This resolves the checkpatch warning:
WARNING: static const char * array should probably be static const char * const

---
 drivers/staging/sm750fb/sm750.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/sm750fb/sm750.c +1 -1
index fadba95850be..8fc0d1c66991 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
maintainer
#1 lore raw
Quoted 25 lines · Denis Arzubov

Make g_fbmode array pointer const to follow kernel coding style. This resolves the checkpatch warning:
WARNING: static const char * array should probably be static const char * const

---
 drivers/staging/sm750fb/sm750.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/sm750fb/sm750.c +1 -1
index fadba95850be..8fc0d1c66991 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

Please always test-build your changes :(