Re: [PATCH] staging: sm750fb: Add const to g_fbmode array

From: Greg Kroah-Hartman

Date: Mon May 11 2026 - 04:05:10 EST


On Sat, May 09, 2026 at 10:25:57PM +0545, Alone wrote:
> From: Chhabilal Dangal <yogeshdangal66@xxxxxxxxx>
>
> Add const qualifier to g_fbmode array since the array
> itself is not modified after initialization.
>
> Signed-off-by: Chhabilal Dangal <yogeshdangal66@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 9f3e3d37e..19c3da654 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.54.0
>
>

Please always test-build your patches :(