* [PATCH] staging: sm750fb: make g_fbmode array const
@ 2026-07-01 4:14 Ruziev Miraly
2026-07-01 5:06 ` Dan Carpenter
0 siblings, 1 reply; 7+ messages in thread
From: Ruziev Miraly @ 2026-07-01 4:14 UTC (permalink / raw)
To: gregkh, linux-staging; +Cc: linux-kernel, Ruziev Miraly
The g_fbmode array of pointers to constant strings is never modified.
Mark it as const to move it to the read-only data section (.rodata)
and comply with the Linux kernel coding style.
Signed-off-by: Ruziev Miraly <miraly.dev@gmail.com>
---
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 89c811e08..8f533f3b1 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -21,7 +21,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 *g_def_fbmode = "1024x768-32@60";
static char *g_settings;
static int g_dualview __ro_after_init;
--
2.54.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH] staging: sm750fb: make g_fbmode array const
@ 2026-06-21 4:44 Arnav Kapoor
0 siblings, 0 replies; 7+ messages in thread
From: Arnav Kapoor @ 2026-06-21 4:44 UTC (permalink / raw)
To: Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman,
open list:STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER,
open list:STAGING SUBSYSTEM, open list
Cc: Arnav Kapoor,
open list:STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER,
open list:STAGING SUBSYSTEM, open list
From: arnavk23 <kapoorarnav43@gmail.com>
checkpatch complains that a static const char * array should
probably be static const char * const.
Signed-off-by: Arnav Kapoor <kapoorarnav43@gmail.com>
Signed-off-by: arnavk23 <kapoorarnav43@gmail.com>
---
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.53.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH] staging: sm750fb: make g_fbmode array const
@ 2026-06-09 1:17 Brock Haftner
2026-06-09 6:12 ` Ahmet Sezgin Duran
0 siblings, 1 reply; 7+ messages in thread
From: Brock Haftner @ 2026-06-09 1:17 UTC (permalink / raw)
To: Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman, outreachy
Cc: linux-fbdev, linux-staging, linux-kernel, Brock Haftner
The g_fbmode array is a static array of constant strings, but the pointer
array itself is not marked as const. Fix the checkpatch.pl warning by
adding the const modifier to the array declaration.
Signed-off-by: Brock Haftner <brockhaftner@gmail.com>
---
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 89c811e0806c..8f533f3b1b42 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -21,7 +21,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 *g_def_fbmode = "1024x768-32@60";
static char *g_settings;
static int g_dualview __ro_after_init;
--
2.54.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH] staging: sm750fb: make g_fbmode array const
2026-06-09 1:17 Brock Haftner
@ 2026-06-09 6:12 ` Ahmet Sezgin Duran
2026-06-10 0:58 ` Brock Haftner
0 siblings, 1 reply; 7+ messages in thread
From: Ahmet Sezgin Duran @ 2026-06-09 6:12 UTC (permalink / raw)
To: Brock Haftner, Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman,
outreachy
Cc: linux-fbdev, linux-staging, linux-kernel
On 6/9/26 4:17 AM, Brock Haftner wrote:
> The g_fbmode array is a static array of constant strings, but the pointer
> array itself is not marked as const. Fix the checkpatch.pl warning by
> adding the const modifier to the array declaration.
>
> Signed-off-by: Brock Haftner <brockhaftner@gmail.com>
> ---
> 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 89c811e0806c..8f533f3b1b42 100644
> --- a/drivers/staging/sm750fb/sm750.c
> +++ b/drivers/staging/sm750fb/sm750.c
> @@ -21,7 +21,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 *g_def_fbmode = "1024x768-32@60";
> static char *g_settings;
> static int g_dualview __ro_after_init;
Did you compile this patch while enabling sm750fb driver in the config?
Regards,
Ahmet Sezgin Duran
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] staging: sm750fb: make g_fbmode array const
2026-06-09 6:12 ` Ahmet Sezgin Duran
@ 2026-06-10 0:58 ` Brock Haftner
0 siblings, 0 replies; 7+ messages in thread
From: Brock Haftner @ 2026-06-10 0:58 UTC (permalink / raw)
To: Ahmet Sezgin Duran
Cc: Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman, outreachy,
linux-fbdev, linux-staging, linux-kernel
On 6/8/26, Ahmet Sezgin Duran wrote:
> Did you compile this patch while enabling sm750fb driver in the config?
No, I did not. I apologize for the mistake.
I ran make drivers/staging/sm750fb/ prior to submitting, however I
failed to realize the driver was not enabled in my .config.
Cheers,
Brock
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-07-01 7:27 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-01 4:14 [PATCH] staging: sm750fb: make g_fbmode array const Ruziev Miraly
2026-07-01 5:06 ` Dan Carpenter
[not found] ` <CAOW+FoFQVdBXMVfF2n2eV0_2u71apaQM8fV+uO1JVasqcqq-vQ@mail.gmail.com>
2026-07-01 7:26 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2026-06-21 4:44 Arnav Kapoor
2026-06-09 1:17 Brock Haftner
2026-06-09 6:12 ` Ahmet Sezgin Duran
2026-06-10 0:58 ` Brock Haftner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox