Skip to contentSkip to conversation

staging: sm750fb: fix const pointer declaration in sm750.c

PATCH In review Vladan Kalaba 2 participants 3 messages Sep 22 – Sep 23

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

PATCH 1/1 staging: sm750fb: fix const pointer declaration in sm750.c

Fix static const char * declaration for g_fbmode[] to static const char * const as reported by checkpatch to cohere to Linux kernel coding standards.

---
 drivers/staging/sm750fb/sm750.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/sm750fb/sm750.c +1 -1
index 1ea3dd8b8f28..79d0221cdeae 100644
@@ -12,7 +12,7 @@
 static int g_hwcursor = 1;
 static int g_noaccel __ro_after_init;
 static int g_nomtrr __ro_after_init;
-static const char *g_fbmode[] = {NULL, NULL};
+static const char * const g_fbmode[] = {NULL, NULL};
 static const char * const g_def_fbmode = "1024x768-32@60";
 static char *g_settings;
 static int g_dualview __ro_after_init;
Signature · 1 line
2.53.0
#1 lore raw
Quoted 14 lines · Vladan Kalaba

Fix static const char * declaration for g_fbmode[] to static const char * const as reported by checkpatch to cohere to Linux kernel coding standards.

---
  drivers/staging/sm750fb/sm750.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/sm750fb/sm750.c +0 -0
index 1ea3dd8b8f28..79d0221cdeae 100644

drivers/staging/sm750fb/sm750.c line 18

Quoted 8 lines
drivers/staging/sm750fb/sm750.c +1 -1
@@ -12,7 +12,7 @@
  static int g_hwcursor = 1;
  static int g_noaccel __ro_after_init;
  static int g_nomtrr __ro_after_init;
-static const char *g_fbmode[] = {NULL, NULL};
+static const char * const g_fbmode[] = {NULL, NULL};
  static const char * const g_def_fbmode = "1024x768-32@60";
  static char *g_settings;
  static int g_dualview __ro_after_init;

Did you compile this patch? While SM750 module is enabled?

Regards,
Ahmet Sezgin Duran

#2 lore raw
Quoted 27 lines · Ahmet Sezgin Duran
Quoted 14 lines · Vladan Kalaba

Fix static const char * declaration for g_fbmode[] to static const char * const as reported by checkpatch to cohere to Linux kernel coding standards.

---
  drivers/staging/sm750fb/sm750.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/sm750fb/sm750.c +0 -0
index 1ea3dd8b8f28..79d0221cdeae 100644

drivers/staging/sm750fb/sm750.c line 18

Quoted 8 lines
drivers/staging/sm750fb/sm750.c +1 -1
@@ -12,7 +12,7 @@
  static int g_hwcursor = 1;
  static int g_noaccel __ro_after_init;
  static int g_nomtrr __ro_after_init;
-static const char *g_fbmode[] = {NULL, NULL};
+static const char * const g_fbmode[] = {NULL, NULL};
  static const char * const g_def_fbmode = "1024x768-32@60";
  static char *g_settings;
  static int g_dualview __ro_after_init;

Did you compile this patch? While SM750 module is enabled?

Quoted 2 lines

Regards,
Ahmet Sezgin Duran

Hi Ahmet,
My make defconfig didn't compile in SM750, my bad sorry. Will double check that in the future.

Sincerely,
Vladan