All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: gdm724x: make DEVICE_STRING array const
@ 2026-10-15  9:31 pdsj2807
  2026-10-15  9:46 ` Greg KH
  2026-10-15 12:18 ` [PATCH v2] " pdsj2807
  0 siblings, 2 replies; 4+ messages in thread
From: pdsj2807 @ 2026-10-15  9:31 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, Palak Raval

From: Palak Raval <pdsj2807@gmail.com>

The DEVICE_STRING array contains pointers to string literals and is
never modified.

Declare it as 'const char * const' to improve const correctness and
prevent accidental modification. Also fix minor formatting issues
reported by checkpatch.

No functional changes intended.

Signed-off-by: Palak Raval <pdsj2807@gmail.com>
---
 drivers/staging/gdm724x/gdm_tty.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c
index 32b2e817ff04..ac8511b88464 100644
--- a/drivers/staging/gdm724x/gdm_tty.c
+++ b/drivers/staging/gdm724x/gdm_tty.c
@@ -31,7 +31,7 @@ static struct gdm *gdm_table[TTY_MAX_COUNT][GDM_TTY_MINOR];
 static DEFINE_MUTEX(gdm_table_lock);
 
 static const char *DRIVER_STRING[TTY_MAX_COUNT] = {"GCTATC", "GCTDM"};
-static char *DEVICE_STRING[TTY_MAX_COUNT] = {"GCT-ATC", "GCT-DM"};
+static const char * const DEVICE_STRING[TTY_MAX_COUNT] = {"GCT-ATC", "GCT-DM"};
 
 static void gdm_port_destruct(struct tty_port *port)
 {
@@ -160,6 +160,7 @@ static ssize_t gdm_tty_write(struct tty_struct *tty, const u8 *buf, size_t len)
 
 	while (remain) {
 		size_t sending_len = min_t(size_t, MUX_TX_MAX_SIZE, remain);
+
 		gdm->tty_dev->send_func(gdm->tty_dev->priv_dev,
 					(void *)(buf + sent_len),
 					sending_len,
@@ -272,7 +273,7 @@ int register_lte_tty_driver(void)
 
 	for (i = 0; i < TTY_MAX_COUNT; i++) {
 		tty_driver = tty_alloc_driver(GDM_TTY_MINOR,
-				TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV);
+					      TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV);
 		if (IS_ERR(tty_driver))
 			return PTR_ERR(tty_driver);
 
-- 
2.34.1


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

* Re: [PATCH] staging: gdm724x: make DEVICE_STRING array const
  2026-10-15  9:31 [PATCH] staging: gdm724x: make DEVICE_STRING array const pdsj2807
@ 2026-10-15  9:46 ` Greg KH
  2026-10-15 12:18 ` [PATCH v2] " pdsj2807
  1 sibling, 0 replies; 4+ messages in thread
From: Greg KH @ 2026-10-15  9:46 UTC (permalink / raw)
  To: pdsj2807; +Cc: linux-staging, linux-kernel

On Thu, Oct 15, 2026 at 03:01:25PM +0530, pdsj2807@gmail.com wrote:
> From: Palak Raval <pdsj2807@gmail.com>
> 
> The DEVICE_STRING array contains pointers to string literals and is
> never modified.
> 
> Declare it as 'const char * const' to improve const correctness and
> prevent accidental modification. Also fix minor formatting issues
> reported by checkpatch.

Please only do one logical thing per patch.

thanks,

greg k-h

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

* [PATCH v2] staging: gdm724x: make DEVICE_STRING array const
  2026-10-15  9:31 [PATCH] staging: gdm724x: make DEVICE_STRING array const pdsj2807
  2026-10-15  9:46 ` Greg KH
@ 2026-10-15 12:18 ` pdsj2807
  2026-10-17 11:25   ` Greg KH
  1 sibling, 1 reply; 4+ messages in thread
From: pdsj2807 @ 2026-10-15 12:18 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, Palak Raval

From: Palak Raval <pdsj2807@gmail.com>

The DEVICE_STRING array contains pointers to string literals and is
never modified.

Declare it as 'const char * const' to improve const correctness and
prevent accidental modification.

Signed-off-by: Palak Raval <pdsj2807@gmail.com>
---
v2:
- Drop unrelated formatting changes
- Keep only the DEVICE_STRING const-correctness change
---
 drivers/staging/gdm724x/gdm_tty.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c
index 32b2e817ff04..65c53811f099 100644
--- a/drivers/staging/gdm724x/gdm_tty.c
+++ b/drivers/staging/gdm724x/gdm_tty.c
@@ -31,7 +31,7 @@ static struct gdm *gdm_table[TTY_MAX_COUNT][GDM_TTY_MINOR];
 static DEFINE_MUTEX(gdm_table_lock);
 
 static const char *DRIVER_STRING[TTY_MAX_COUNT] = {"GCTATC", "GCTDM"};
-static char *DEVICE_STRING[TTY_MAX_COUNT] = {"GCT-ATC", "GCT-DM"};
+static const char * const DEVICE_STRING[TTY_MAX_COUNT] = {"GCT-ATC", "GCT-DM"};
 
 static void gdm_port_destruct(struct tty_port *port)
 {
-- 
2.34.1


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

* Re: [PATCH v2] staging: gdm724x: make DEVICE_STRING array const
  2026-10-15 12:18 ` [PATCH v2] " pdsj2807
@ 2026-10-17 11:25   ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2026-10-17 11:25 UTC (permalink / raw)
  To: pdsj2807; +Cc: linux-staging, linux-kernel

On Thu, Oct 15, 2026 at 05:48:06PM +0530, pdsj2807@gmail.com wrote:
> From: Palak Raval <pdsj2807@gmail.com>
> 
> The DEVICE_STRING array contains pointers to string literals and is
> never modified.
> 
> Declare it as 'const char * const' to improve const correctness and
> prevent accidental modification.
> 
> Signed-off-by: Palak Raval <pdsj2807@gmail.com>
> ---
> v2:
> - Drop unrelated formatting changes
> - Keep only the DEVICE_STRING const-correctness change
> ---
>  drivers/staging/gdm724x/gdm_tty.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c
> index 32b2e817ff04..65c53811f099 100644
> --- a/drivers/staging/gdm724x/gdm_tty.c
> +++ b/drivers/staging/gdm724x/gdm_tty.c
> @@ -31,7 +31,7 @@ static struct gdm *gdm_table[TTY_MAX_COUNT][GDM_TTY_MINOR];
>  static DEFINE_MUTEX(gdm_table_lock);
>  
>  static const char *DRIVER_STRING[TTY_MAX_COUNT] = {"GCTATC", "GCTDM"};
> -static char *DEVICE_STRING[TTY_MAX_COUNT] = {"GCT-ATC", "GCT-DM"};
> +static const char * const DEVICE_STRING[TTY_MAX_COUNT] = {"GCT-ATC", "GCT-DM"};
>  
>  static void gdm_port_destruct(struct tty_port *port)
>  {
> -- 
> 2.34.1
> 
> 

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch did not apply to any known trees that Greg is in control
  of.  Possibly this is because you made it against Linus's tree, not
  the linux-next tree, which is where all of the development for the
  next version of the kernel is at.  Please refresh your patch against
  the linux-next tree, or even better yet, the development tree
  specified in the MAINTAINERS file for the subsystem you are submitting
  a patch for, and resend it.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot

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

end of thread, other threads:[~2026-10-17 11:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-15  9:31 [PATCH] staging: gdm724x: make DEVICE_STRING array const pdsj2807
2026-10-15  9:46 ` Greg KH
2026-10-15 12:18 ` [PATCH v2] " pdsj2807
2026-10-17 11:25   ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.