[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250625045526.82758-1-pratibimbakhadka@gmail.com>
Date: Wed, 25 Jun 2025 10:40:26 +0545
From: Pratibimba Khadka <pratibimbakhadka@...il.com>
To: sudipm.mukherjee@...il.com
Cc: Pratibimba Khadka <pratibimbakhadka@...il.com>,
Teddy Wang <teddy.wang@...iconmotion.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-fbdev@...r.kernel.org (open list:STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER),
linux-staging@...ts.linux.dev (open list:STAGING SUBSYSTEM),
linux-kernel@...r.kernel.org (open list)
Subject: [PATCH] staging: sm750fb: Mark g_fbmode as a pointer to const pointer
Fixes a checkpatch warning:
WARNING: static const char * array should probably be static const char * const
The array `g_fbmode` contains constant string pointers that are not supposed to be modified. By declaring it as `const char * const`, both the string literals and the pointers themselves are protected from accidental modification, which improves code safety and clarity.
Signed-off-by: Pratibimba Khadka <pratibimbakhadka@...il.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 1d929aca3..d3bce107f 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.50.0
Powered by blists - more mailing lists