Re: [PATCH] staging: sm750fb: fix const pointer array declaration

From: Ahmet Sezgin Duran

Date: Sat Jun 13 2026 - 13:47:08 EST


On 6/13/26 1:06 AM, Jack Lee wrote:
g_fbmode should be declared as static const char * const to prevent
modification of the array pointer itself.

Signed-off-by: Jack Lee <skunkolee@xxxxxxxxx>
---
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 9f3e3d37e82a..19c3da654a43 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;

Did you compile this patch while sm750fb driver is enabled?

Regards,
Ahmet Sezgin Duran