Re: [PATCH v2] staging: sm750fb: add const qualifier to string pointer arrays

From: Greg KH

Date: Mon May 04 2026 - 11:06:51 EST


On Sat, May 02, 2026 at 07:57:44PM -0500, Francisco Maestre wrote:
> Add 'const' qualifier to 'g_fbmode' and 'g_def_fbmode' pointer
> declarations to make them 'static const char * const', as the
> pointers themselves are not modified after initialization.
>
> This fixes the following checkpatch.pl warning:
> WARNING: static const char * array should probably be
> static const char * const
>
> Signed-off-by: Francisco Maestre <francisco@xxxxxxxxxxxxxxxxxxxxxx>
> ---
> v2: Resend as individual patch, not part of an unrelated series.
> drivers/staging/sm750fb/sm750.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
> index 62f6e0cdff4d..dc9653ed2108 100644
> --- a/drivers/staging/sm750fb/sm750.c
> +++ b/drivers/staging/sm750fb/sm750.c
> @@ -33,8 +33,8 @@
> static int g_hwcursor = 1;
> static int g_noaccel;
> static int g_nomtrr;
> -static const char *g_fbmode[] = {NULL, NULL};
> -static const char *g_def_fbmode = "1024x768-32@60";
> +static const char * const g_fbmode[] = {NULL, NULL};
> +static const char * const g_def_fbmode = "1024x768-32@60";
> static char *g_settings;
> static int g_dualview;
> static char *g_option;
> --
> 2.50.1 (Apple Git-155)
>
>

Any reason why you did not test build this patch? Always do so so that
you don't get grumpy maintainers asking why you didn't test build your
patch :)

thanks,

greg k-h