Linux kernel staging patches
 help / color / mirror / Atom feed
* [PATCH v3] staging: sm750fb: Keep g_fbmode array non-const
@ 2026-05-11 17:02 Chhabilal Dangal
  2026-05-11 17:27 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Chhabilal Dangal @ 2026-05-11 17:02 UTC (permalink / raw)
  To: Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman
  Cc: linux-fbdev, linux-staging, linux-kernel, Chhabilal Dangal

The g_fbmode array is modified at runtime, so it must remain
non-const. Added clarifying comment.

Signed-off-by: Chhabilal Dangal <yogeshdangal66@gmail.com>
---
 drivers/staging/sm750fb/sm750.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 9f3e3d37e82a..a553099f42f3 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -33,6 +33,7 @@
 static int g_hwcursor = 1;
 static int g_noaccel;
 static int g_nomtrr;
+/* intentionally non-const since array is modified at runtime */
 static const char *g_fbmode[] = {NULL, NULL};
 static const char *g_def_fbmode = "1024x768-32@60";
 static char *g_settings;
-- 
2.54.0


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

* Re: [PATCH v3] staging: sm750fb: Keep g_fbmode array non-const
  2026-05-11 17:02 [PATCH v3] staging: sm750fb: Keep g_fbmode array non-const Chhabilal Dangal
@ 2026-05-11 17:27 ` Greg Kroah-Hartman
       [not found]   ` <CAF9nfaDfdBKUnC6sVN8w84ruH5NkSxm8cqXN8JCWH0RESff4Rg@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-11 17:27 UTC (permalink / raw)
  To: Chhabilal Dangal
  Cc: Sudip Mukherjee, Teddy Wang, linux-fbdev, linux-staging,
	linux-kernel

On Mon, May 11, 2026 at 10:47:45PM +0545, Chhabilal Dangal wrote:
> The g_fbmode array is modified at runtime, so it must remain
> non-const. Added clarifying comment.
> 
> Signed-off-by: Chhabilal Dangal <yogeshdangal66@gmail.com>
> ---
>  drivers/staging/sm750fb/sm750.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
> index 9f3e3d37e82a..a553099f42f3 100644
> --- a/drivers/staging/sm750fb/sm750.c
> +++ b/drivers/staging/sm750fb/sm750.c
> @@ -33,6 +33,7 @@
>  static int g_hwcursor = 1;
>  static int g_noaccel;
>  static int g_nomtrr;
> +/* intentionally non-const since array is modified at runtime */

No comment is needed, if you change the code, it breaks the build, so
that is very obvious as you would never submit a patch that you did not
build, right?  :)

thanks,

greg k-h

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

* Re: [PATCH v3] staging: sm750fb: Keep g_fbmode array non-const
       [not found]   ` <CAF9nfaDfdBKUnC6sVN8w84ruH5NkSxm8cqXN8JCWH0RESff4Rg@mail.gmail.com>
@ 2026-05-12  5:35     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2026-05-12  5:35 UTC (permalink / raw)
  To: Alone; +Cc: Sudip Mukherjee, Teddy Wang, linux-fbdev, linux-staging,
	linux-kernel

On Tue, May 12, 2026 at 12:48:05AM +0545, Alone wrote:
> Thanks for the clarification and guidance.
> 
> I want to learn the correct workflow. As a student contributor, what checks
> and testing steps should I always perform before sending a patch?

Please start with not top-posting and sending html email :)

After that, go through the kernelnewbies.org first-patch tutorial, as
well as the free Linux Foundation kernel development online class.
Between those two, you should have a good basis for working on this
correctly.

Also read all of the documentation we have about submitting a patch.
People wrote that for a reason, don't ignore it :)

thanks,

greg k-h

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

end of thread, other threads:[~2026-05-12  5:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-11 17:02 [PATCH v3] staging: sm750fb: Keep g_fbmode array non-const Chhabilal Dangal
2026-05-11 17:27 ` Greg Kroah-Hartman
     [not found]   ` <CAF9nfaDfdBKUnC6sVN8w84ruH5NkSxm8cqXN8JCWH0RESff4Rg@mail.gmail.com>
2026-05-12  5:35     ` Greg Kroah-Hartman

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