From: Simon Horman <horms@kernel.org>
To: Peter Seiderer <ps.report@gmx.net>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
"David S . Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Toke Høiland-Jørgensen" <toke@redhat.com>
Subject: Re: [PATCH net-next v2 3/3] net: pktgen: fix code style (WARNING: Prefer strscpy over strcpy)
Date: Wed, 16 Apr 2025 18:18:58 +0100 [thread overview]
Message-ID: <20250416171858.GX395307@horms.kernel.org> (raw)
In-Reply-To: <20250415112916.113455-4-ps.report@gmx.net>
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@gmx.net>
> ---
> Changes v1 -> v2:
> - squash memset/strscpy pattern into single strscpy_pad call (suggested
> by Jakub Kicinski)
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2025-04-16 17:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-15 11:29 [PATCH net-next v2 0/3] net: pktgen: fix checkpatch code style errors/warnings Peter Seiderer
2025-04-15 11:29 ` [PATCH net-next v2 1/3] net: pktgen: fix code style (ERROR: else should follow close brace '}') Peter Seiderer
2025-04-16 17:18 ` Simon Horman
2025-04-15 11:29 ` [PATCH net-next v2 2/3] net: pktgen: fix code style (WARNING: please, no space before tabs) Peter Seiderer
2025-04-16 17:18 ` Simon Horman
2025-04-15 11:29 ` [PATCH net-next v2 3/3] net: pktgen: fix code style (WARNING: Prefer strscpy over strcpy) Peter Seiderer
2025-04-16 17:18 ` Simon Horman [this message]
2025-04-17 11:20 ` [PATCH net-next v2 0/3] net: pktgen: fix checkpatch code style errors/warnings patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250416171858.GX395307@horms.kernel.org \
--to=horms@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=ps.report@gmx.net \
--cc=toke@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).