linux-hams.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] hamradio: Remove unnecessary strscpy_pad() size arguments
@ 2025-04-07  8:26 Thorsten Blum
  2025-04-08 11:00 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2025-04-07  8:26 UTC (permalink / raw)
  To: Thomas Sailer, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: Thorsten Blum, linux-hams, netdev, linux-kernel

If the destination buffer has a fixed length, strscpy_pad()
automatically determines its size using sizeof() when the argument is
omitted. This makes the explicit sizeof() calls unnecessary - remove
them.

No functional changes intended.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 drivers/net/hamradio/baycom_epp.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/hamradio/baycom_epp.c b/drivers/net/hamradio/baycom_epp.c
index 9e366f275406..5fda7a0fcce0 100644
--- a/drivers/net/hamradio/baycom_epp.c
+++ b/drivers/net/hamradio/baycom_epp.c
@@ -1074,7 +1074,7 @@ static int baycom_siocdevprivate(struct net_device *dev, struct ifreq *ifr,
 		return 0;
 
 	case HDLCDRVCTL_DRIVERNAME:
-		strscpy_pad(hi.data.drivername, "baycom_epp", sizeof(hi.data.drivername));
+		strscpy_pad(hi.data.drivername, "baycom_epp");
 		break;
 		
 	case HDLCDRVCTL_GETMODE:
@@ -1091,8 +1091,7 @@ static int baycom_siocdevprivate(struct net_device *dev, struct ifreq *ifr,
 		return baycom_setmode(bc, hi.data.modename);
 
 	case HDLCDRVCTL_MODELIST:
-		strscpy_pad(hi.data.modename, "intclk,extclk,intmodem,extmodem,divider=x",
-			sizeof(hi.data.modename));
+		strscpy_pad(hi.data.modename, "intclk,extclk,intmodem,extmodem,divider=x");
 		break;
 
 	case HDLCDRVCTL_MODEMPARMASK:

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

* Re: [PATCH net-next] hamradio: Remove unnecessary strscpy_pad() size arguments
  2025-04-07  8:26 [PATCH net-next] hamradio: Remove unnecessary strscpy_pad() size arguments Thorsten Blum
@ 2025-04-08 11:00 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-04-08 11:00 UTC (permalink / raw)
  To: Thorsten Blum
  Cc: t.sailer, andrew+netdev, davem, edumazet, kuba, pabeni,
	linux-hams, netdev, linux-kernel

Hello:

This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Mon,  7 Apr 2025 10:26:07 +0200 you wrote:
> If the destination buffer has a fixed length, strscpy_pad()
> automatically determines its size using sizeof() when the argument is
> omitted. This makes the explicit sizeof() calls unnecessary - remove
> them.
> 
> No functional changes intended.
> 
> [...]

Here is the summary with links:
  - [net-next] hamradio: Remove unnecessary strscpy_pad() size arguments
    https://git.kernel.org/netdev/net-next/c/48afd5550524

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2025-04-08 11:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-07  8:26 [PATCH net-next] hamradio: Remove unnecessary strscpy_pad() size arguments Thorsten Blum
2025-04-08 11:00 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).