Re: [PATCH] staging: sm750fb: add const to g_fbmode array
From: Ahmet Sezgin Duran
Date: Wed May 06 2026 - 06:38:07 EST
On 5/6/26 10:14 AM, Chaitanya Sabnis wrote:
On Wed, May 6, 2026 at 11:57 AM Ahmet Sezgin Duran ahmet@xxxxxxxxxxxxxxx wrote:
Did you compile these changes?
Yes, I have verified the changes by compiling the driver with: make
M=drivers/staging/sm750fb/
The build completed successfully without errors.
Regards,
Chaitanya
Are you sure that you had enabled the module? When I apply and try to compile your patch, I get these errors:
>
> CC [M] drivers/staging/sm750fb/sm750.o
> drivers/staging/sm750fb/sm750.c: In function ‘lynxfb_set_fbinfo’:
> drivers/staging/sm750fb/sm750.c:785:33: error: assignment of read-only location ‘g_fbmode[index]’
> 785 | g_fbmode[index] = g_def_fbmode;
> | ^
> drivers/staging/sm750fb/sm750.c:787:41: error: assignment of read-only location ‘g_fbmode[index]’
> 787 | g_fbmode[index] = g_fbmode[0];
> | ^
> drivers/staging/sm750fb/sm750.c: In function ‘sm750fb_setup’:
> drivers/staging/sm750fb/sm750.c:896:45: error: assignment of read-only location ‘g_fbmode[0]’
> 896 | g_fbmode[0] = opt;
> | ^
> drivers/staging/sm750fb/sm750.c:900:45: error: assignment of read-only location ‘g_fbmode[1]’
> 900 | g_fbmode[1] = opt;
> | ^
Regards,
Ahmet Sezgin Duran