* [PATCH] net: Add missing const
@ 2026-11-25 18:19 Alejandro Colomar
2026-11-25 18:38 ` Joe Damato
0 siblings, 1 reply; 3+ messages in thread
From: Alejandro Colomar @ 2026-11-25 18:19 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
netdev
Cc: Alejandro Colomar, Simon Horman
[-- Attachment #1: Type: text/plain, Size: 885 bytes --]
These pointers are derived from other const pointers.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
---
Hi,
This was found when changing some <linux/string.h> APIs to preserve the
const qualifier in the return type.
Have a lovely night!
Alex
net/smc/smc_pnet.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/smc/smc_pnet.c b/net/smc/smc_pnet.c
index 61ef1d697eee..a4a4292a48da 100644
--- a/net/smc/smc_pnet.c
+++ b/net/smc/smc_pnet.c
@@ -285,9 +285,9 @@ static bool smc_pnet_apply_smcd(struct smcd_dev *smcd_dev, char *pnet_name)
*/
static bool smc_pnetid_valid(const char *pnet_name, char *pnetid)
{
- char *bf = skip_spaces(pnet_name);
+ const char *bf = skip_spaces(pnet_name);
size_t len = strlen(bf);
- char *end = bf + len;
+ const char *end = bf + len;
if (!len)
return false;
--
2.55.0
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net: Add missing const
2026-11-25 18:19 [PATCH] net: Add missing const Alejandro Colomar
@ 2026-11-25 18:38 ` Joe Damato
2026-11-25 20:37 ` Alejandro Colomar
0 siblings, 1 reply; 3+ messages in thread
From: Joe Damato @ 2026-11-25 18:38 UTC (permalink / raw)
To: Alejandro Colomar
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
netdev, Simon Horman
On Wed, Nov 25, 2026 at 07:19:51PM +0100, Alejandro Colomar wrote:
> These pointers are derived from other const pointers.
>
> Signed-off-by: Alejandro Colomar <alx@kernel.org>
> ---
>
> Hi,
>
> This was found when changing some <linux/string.h> APIs to preserve the
> const qualifier in the return type.
>
>
> Have a lovely night!
> Alex
>
> net/smc/smc_pnet.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
patch seems right but i think the subject line and commit message could be
improved tbh
Reviewed-by: Joe Damato <joe@dama.to>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: Add missing const
2026-11-25 18:38 ` Joe Damato
@ 2026-11-25 20:37 ` Alejandro Colomar
0 siblings, 0 replies; 3+ messages in thread
From: Alejandro Colomar @ 2026-11-25 20:37 UTC (permalink / raw)
To: Joe Damato, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, netdev, Simon Horman
[-- Attachment #1: Type: text/plain, Size: 981 bytes --]
Hi Joe,
> Date: 2026-11-25 10:38:26-0800
> From: Joe Damato <joe@dama.to>
>
> On Wed, Nov 25, 2026 at 07:19:51PM +0100, Alejandro Colomar wrote:
> > These pointers are derived from other const pointers.
> >
> > Signed-off-by: Alejandro Colomar <alx@kernel.org>
> > ---
> >
> > Hi,
> >
> > This was found when changing some <linux/string.h> APIs to preserve the
> > const qualifier in the return type.
> >
> >
> > Have a lovely night!
> > Alex
> >
> > net/smc/smc_pnet.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
>
> patch seems right but i think the subject line and commit message could be
> improved tbh
I kept it simple, because it's an obvious improvement, and adding more
text felt like bloating it too much, but if you propose any improvement,
I could incorporate it into the patch.
>
> Reviewed-by: Joe Damato <joe@dama.to>
Thanks!
Have a lovely night!
Alex
--
<https://www.alejandro-colomar.es>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-25 20:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-25 18:19 [PATCH] net: Add missing const Alejandro Colomar
2026-11-25 18:38 ` Joe Damato
2026-11-25 20:37 ` Alejandro Colomar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox