mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kurmapu Sai Devansh Prasad <btech10487.26@bitmesra.ac.in>
To: sudipm.mukherjee@gmail.com, teddy.wang@siliconmotion.com,
	gregkh@linuxfoundation.org
Cc: linux-fbdev@vger.kernel.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org,
	Kurmapu Sai Devansh Prasad <btech10487.26@bitmesra.ac.in>
Subject: [PATCH] staging: sm750fb: constify g_fbmode array
Date: Fri,  6 Nov 2026 22:19:35 +0530	[thread overview]
Message-ID: <20261106164935.18502-1-btech10487.26@bitmesra.ac.in> (raw)

The g_fbmode array contains string pointers that do not need to be
modified. Add the 'const' keyword to lock these pointers, making
the entire array read-only. This allows the compiler to safely move
it into the .rodata section.

Fixes checkpatch warning:
WARNING: static const char * array should probably be static const char * const

Signed-off-by: Kurmapu Sai Devansh Prasad <btech10487.26@bitmesra.ac.in>
---
 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 21e310274330..47d2917cc1d6 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -12,7 +12,7 @@
 static int g_hwcursor = 1;
 static int g_noaccel __ro_after_init;
 static int g_nomtrr __ro_after_init;
-static const char *g_fbmode[] = {NULL, NULL};
+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 __ro_after_init;
-- 
2.56.0


             reply	other threads:[~2026-11-06 16:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-06 16:49 Kurmapu Sai Devansh Prasad [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-03-09 10:50 dipesh chaudhary
     [not found] <20260309104824.294332-1-me@dipeshchaudhary.in>
2026-03-09 10:48 ` dipesh chaudhary
2026-03-09 10:13 dipesh chaudhary
2026-03-09 10:06 dipesh chaudhary
     [not found] <9e566c42-8ec3-4d06-91be-0489de4e91c0@smtp-relay.sendinblue.com>
2026-03-09  9:56 ` Greg KH
2026-03-09  9:49 dipesh chaudhary

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=20261106164935.18502-1-btech10487.26@bitmesra.ac.in \
    --to=btech10487.26@bitmesra.ac.in \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=sudipm.mukherjee@gmail.com \
    --cc=teddy.wang@siliconmotion.com \
    /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

all inboxes | Powered by JetHome®