mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] staging: sm750fb: mark g_fbmode as const
@ 2026-09-22 22:55 Iñaki Sobera Sotomayor
  2026-09-23  7:27 ` Ahmet Sezgin Duran
  0 siblings, 1 reply; 3+ messages in thread
From: Iñaki Sobera Sotomayor @ 2026-09-22 22:55 UTC (permalink / raw)
  To: sudipm.mukherjee, teddy.wang, gregkh
  Cc: linux-fbdev, linux-staging, linux-kernel, Iñaki Sobera Sotomayor

The g_fbmode array of pointers is only used during module initialization
to parse display options and is never modified. Marking both the pointers
and the array const allows the compiler to place it in .rodata, which
avoids accidental modifications and cleans up a checkpatch warning.

Signed-off-by: Iñaki Sobera Sotomayor <inakisobera8@gmail.com>
---
 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 8b93bfeb2..c3f391cdd 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -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 *g_def_fbmode = "1024x768-32@60";
 static char *g_settings;
 static int g_dualview __ro_after_init;
-- 
2.55.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-23 15:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-22 22:55 [PATCH] staging: sm750fb: mark g_fbmode as const Iñaki Sobera Sotomayor
2026-09-23  7:27 ` Ahmet Sezgin Duran
2026-09-23 15:48   ` Iñaki Sobera Sotomayor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®