staging: sm750fb: make g_fbmode array const
PATCH 1/1 staging: sm750fb: make g_fbmode array const
From: Palak Raval <[email protected]>
Make the g_fbmode array of pointers const since its entries are not modified.
--- drivers/staging/sm750fb/sm750.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/sm750fb/sm750.c +1 -1
@@ -12,7 +12,7 @@static int g_hwcursor =1 ;static int g_noaccel__ro_after_init ;static int g_nomtrr__ro_after_init ; -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__ro_after_init ;
Signature · 1 line
2.43.0
Quoted 15 lines · On 10/7/26 1:10 PM, [email protected] wrote:
From: Palak Raval <[email protected]>
Make the
g_fbmodearray of pointers const since its entries are not modified.Signed-off-by Palak Raval <[email protected]>--- drivers/staging/sm750fb/sm750.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/sm750fb/sm750.c +0
-0
drivers/staging/sm750fb/sm750.c line 18
Quoted 8 lines
drivers/staging/sm750fb/sm750.c +1
-1@@ -12,7 +12,7 @@static int g_hwcursor =1 ;static int g_noaccel__ro_after_init ;static int g_nomtrr__ro_after_init ; -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__ro_after_init ;
Did you compile this patch? While SM750 module is enabled?
Regards,
Ahmet Sezgin Duran
A message that is not in the archive (sent off-list or not yet received): CANNUkNj7WJ0TNZUGAdJh9r7FQRQDvj8DmB9_HDD7sonNDHkRnA@mail.gmail.com
Quoted 4 lines · Palak Dixit
Hi Ahmet,
Thanks for the review.
Quoted 8 lines
I enabled
CONFIG_FB_SM750and verified the patch by building the driver with:make M=drivers/staging/sm750fb
The build completed successfully and the sm750fb .ko module was generated.
Thanks,
Palak Raval
g_fbmode[] is assigned in lynxfb_set_fbinfo() and sm750fb_setup(), so this can't build. Maybe the .ko was left over from an earlier build? "make drivers/staging/sm750fb/sm750.o" should show the error.
This change has been sent and rejected many times before, see:
https://lore.kernel.org/linux-staging/?q=g_fbmode
Also, it doesn't even apply to Greg's staging-testing branch, make sure to rebase.
Regards,
Ahmet Sezgin Duran