[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250416171858.GX395307@horms.kernel.org>
Date: Wed, 16 Apr 2025 18:18:58 +0100
From: Simon Horman <horms@...nel.org>
To: Peter Seiderer <ps.report@....net>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
"David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Toke Høiland-Jørgensen <toke@...hat.com>
Subject: Re: [PATCH net-next v2 3/3] net: pktgen: fix code style (WARNING:
Prefer strscpy over strcpy)
On Tue, Apr 15, 2025 at 01:29:16PM +0200, Peter Seiderer wrote:
> Fix checkpatch code style warnings:
>
> WARNING: Prefer strscpy over strcpy - see: https://github.com/KSPP/linux/issues/88
> #1423: FILE: net/core/pktgen.c:1423:
> + strcpy(pkt_dev->dst_min, buf);
>
> WARNING: Prefer strscpy over strcpy - see: https://github.com/KSPP/linux/issues/88
> #1444: FILE: net/core/pktgen.c:1444:
> + strcpy(pkt_dev->dst_max, buf);
>
> WARNING: Prefer strscpy over strcpy - see: https://github.com/KSPP/linux/issues/88
> #1554: FILE: net/core/pktgen.c:1554:
> + strcpy(pkt_dev->src_min, buf);
>
> WARNING: Prefer strscpy over strcpy - see: https://github.com/KSPP/linux/issues/88
> #1575: FILE: net/core/pktgen.c:1575:
> + strcpy(pkt_dev->src_max, buf);
>
> WARNING: Prefer strscpy over strcpy - see: https://github.com/KSPP/linux/issues/88
> #3231: FILE: net/core/pktgen.c:3231:
> + strcpy(pkt_dev->result, "Starting");
>
> WARNING: Prefer strscpy over strcpy - see: https://github.com/KSPP/linux/issues/88
> #3235: FILE: net/core/pktgen.c:3235:
> + strcpy(pkt_dev->result, "Error starting");
>
> WARNING: Prefer strscpy over strcpy - see: https://github.com/KSPP/linux/issues/88
> #3849: FILE: net/core/pktgen.c:3849:
> + strcpy(pkt_dev->odevname, ifname);
>
> While at it squash memset/strcpy pattern into single strscpy_pad call.
>
> Signed-off-by: Peter Seiderer <ps.report@....net>
> ---
> Changes v1 -> v2:
> - squash memset/strscpy pattern into single strscpy_pad call (suggested
> by Jakub Kicinski)
Reviewed-by: Simon Horman <horms@...nel.org>
Powered by blists - more mailing lists