Netdev List
 help / color / mirror / Atom feed
* [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

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