From: "Ignacio Peña" <ignacio.pena87@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
"Ignacio Peña" <ignacio.pena87@gmail.com>
Subject: [PATCH 1/2] staging: sm750fb: make const arrays static const char * const
Date: Thu, 17 Jul 2025 23:49:13 -0400 [thread overview]
Message-ID: <20250718034913.49300-1-ignacio.pena87@gmail.com> (raw)
Fix checkpatch warning:
"WARNING: static const char * array should probably be
static const char * const"
This makes both the array and its contents immutable, which is the
intended behavior for these constant string arrays:
- g_fbmode: array of framebuffer mode strings
- fixId: array of framebuffer device names
Signed-off-by: Ignacio Peña <ignacio.pena87@gmail.com>
---
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 1d929aca3..82e01f114 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;
@@ -731,7 +731,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)
next reply other threads:[~2025-07-18 3:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-18 3:49 Ignacio Peña [this message]
2025-07-18 7:44 ` Greg Kroah-Hartman
2025-07-18 14:53 ` Dan Carpenter
2025-07-21 23:04 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250718034913.49300-1-ignacio.pena87@gmail.com \
--to=ignacio.pena87@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome