mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] staging: sm750fb: make fixId array static const char * const
@ 2025-07-18 20:32 Ignacio Peña
  2025-07-18 21:07 ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Ignacio Peña @ 2025-07-18 20:32 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-staging, linux-kernel

Fix checkpatch warning for the fixId array only:
"WARNING: static const char * array should probably be
 static const char * const"

The g_fbmode array cannot be made const as it is modified at runtime
in lynxfb_setup() and lynx_alloc().

Signed-off-by: Ignacio Peña <ignacio.pena87@gmail.com>
---
v2: Only change fixId array. The g_fbmode array is modified at
    runtime (lines 786, 788, 949, 953) and cannot be const.

 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 039e6875c894..c237a8f8eb59 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -730,7 +730,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
 		"kernel HELPERS prepared vesa_modes",
 	};
 
-	static const char *fixId[2] = {
+	static const char * const fixId[2] = {
 		"sm750_fb1", "sm750_fb2",
 	};
 
-- 
2.39.5 (Apple Git-154)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] staging: sm750fb: make fixId array static const char * const
  2025-07-18 20:32 [PATCH v2] staging: sm750fb: make fixId array static const char * const Ignacio Peña
@ 2025-07-18 21:07 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2025-07-18 21:07 UTC (permalink / raw)
  To: Ignacio Peña; +Cc: Greg Kroah-Hartman, linux-staging, linux-kernel

On Fri, Jul 18, 2025 at 04:32:18PM -0400, Ignacio Peña wrote:
> Fix checkpatch warning for the fixId array only:
> "WARNING: static const char * array should probably be
>  static const char * const"
> 
> The g_fbmode array cannot be made const as it is modified at runtime
> in lynxfb_setup() and lynx_alloc().
> 
> Signed-off-by: Ignacio Peña <ignacio.pena87@gmail.com>
> ---
> v2: Only change fixId array. The g_fbmode array is modified at
>     runtime (lines 786, 788, 949, 953) and cannot be const.

There you go.  That works.

Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-07-18 21:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-18 20:32 [PATCH v2] staging: sm750fb: make fixId array static const char * const Ignacio Peña
2025-07-18 21:07 ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®