[PATCH] staging: sm750fb: make g_fbmode a fixed-size mutable array

Ahmet Sezgin Duran posted 1 patch 1 month ago
drivers/staging/sm750fb/sm750.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] staging: sm750fb: make g_fbmode a fixed-size mutable array
Posted by Ahmet Sezgin Duran 1 month ago
g_fbmode is modified at runtime. Use an explicit fixed-size array to
avoid a misleading checkpatch warning.

No functional changes.

Signed-off-by: Ahmet Sezgin Duran <ahmet@sezginduran.net>
---
 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 d100b9e1d3d5..8f8feb73f61b 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 *g_fbmode[2] = {NULL, NULL};
 static const char *g_def_fbmode = "1024x768-32@60";
 static char *g_settings;
 static int g_dualview;
-- 
2.47.3
Re: [PATCH] staging: sm750fb: make g_fbmode a fixed-size mutable array
Posted by Greg KH 4 weeks ago
On Fri, Jan 09, 2026 at 04:41:40PM +0000, Ahmet Sezgin Duran wrote:
> g_fbmode is modified at runtime. Use an explicit fixed-size array to
> avoid a misleading checkpatch warning.

Nah, checkpatch is wrong here.  And it is a great test to see if people
actually build the changes they want us to accept, so I'll leave the
code as-is for now, thanks.

greg k-h