linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [PATCH v2] staging: sm750fb: Make g_fbmode truly constant
@ 2025-02-22 20:15 Madhur Kumar
  2025-02-23  9:34 ` kernel test robot
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Madhur Kumar @ 2025-02-22 20:15 UTC (permalink / raw)
  To: sudipm.mukherjee, teddy.wang
  Cc: gregkh, linux-fbdev, linux-staging, linux-kernel, Madhur Kumar,
	Dan Carpenter

Declare g_fbmode as a pointer to constant data. This ensures that both
array and its element are immutable.

Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Madhur Kumar <madhurkumar004@gmail.com>
---
Changes in v2:
- Added commit message
---
 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 04c1b32a2..aa154032f 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;
-- 
2.48.1


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

end of thread, other threads:[~2025-03-20 14:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-22 20:15 [PATCH] [PATCH v2] staging: sm750fb: Make g_fbmode truly constant Madhur Kumar
2025-02-23  9:34 ` kernel test robot
2025-02-23 14:57 ` kernel test robot
2025-03-20 14:09 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).