All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: sm750fb: constify static char pointer arrays
@ 2026-03-31  5:07 Hungyu Lin
  2026-03-31  8:45 ` Greg Kroah-Hartman
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Hungyu Lin @ 2026-03-31  5:07 UTC (permalink / raw)
  To: Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman
  Cc: linux-fbdev, linux-staging, linux-kernel, Hungyu Lin

The static const char * arrays 'g_fbmode' and 'fix_id' should be
defined as 'static const char * const' to make the pointer arrays
themselves constant. This allows the compiler to place them in the
read-only data section.

Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
---
 drivers/staging/sm750fb/sm750.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 9a42a08c8..b0bdfaeca 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -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;
@@ -728,7 +728,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
 		lynx750_ext, NULL, vesa_modes,
 	};
 	int cdb[] = {ARRAY_SIZE(lynx750_ext), 0, VESA_MODEDB_SIZE};
-	static const char *fix_id[2] = {
+	static const char * const fix_id[2] = {
 		"sm750_fb1", "sm750_fb2",
 	};
 
-- 
2.34.1


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

end of thread, other threads:[~2026-04-01 10:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-31  5:07 [PATCH] staging: sm750fb: constify static char pointer arrays Hungyu Lin
2026-03-31  8:45 ` Greg Kroah-Hartman
2026-03-31 13:30   ` Denny Lin
2026-03-31 13:37 ` [PATCH] staging: sm750fb: constify fix_id array Hungyu Lin
2026-03-31 13:43 ` [PATCH v2] " Hungyu Lin
2026-03-31 13:50   ` Greg Kroah-Hartman
2026-03-31 13:57 ` Hungyu Lin
2026-04-01 10:09   ` Greg Kroah-Hartman
2026-03-31 14:33 ` [PATCH] staging: sm750fb: constify static char pointer arrays kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.