From: Simon Horman <horms@kernel.org>
To: Shubh <shubhisroking@gmail.com>
Cc: "Arınç ÜNAL" <arinc.unal@arinc9.com>,
"Daniel Golle" <daniel@makrotopia.org>,
"Landen Chao" <Landen.Chao@mediatek.com>,
"DENG Qingfang" <dqfext@gmail.com>,
"Sean Wang" <sean.wang@mediatek.com>,
"Andrew Lunn" <andrew@lunn.ch>,
"Florian Fainelli" <f.fainelli@gmail.com>,
"Vladimir Oltean" <olteanv@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org
Subject: Re: [PATCH] net: dsa: mt7530: refactor deprecated strncpy
Date: Tue, 5 Sep 2023 13:15:26 +0200 [thread overview]
Message-ID: <20230905111526.GE2146@kernel.org> (raw)
In-Reply-To: <20230905041614.14272-1-shubhisroking@gmail.com>
On Tue, Sep 05, 2023 at 09:46:14AM +0530, Shubh wrote:
> Prefer `strscpy_pad` to `strncpy`.
I think this needs some justification.
Why is strscpy_pad() preferred in this case?
Also, assuming this is not a bug-fix for 'net', then it is an enhancement,
and should be targeted at net-next.
Subject: [PATCH net-next] ...
As it stands, net-next is closed:
## Form letter - net-next-closed
The merge window for v6.6 has begun and therefore net-next is closed
for new drivers, features, code refactoring and optimizations.
We are currently accepting bug fixes only.
Please repost when net-next reopens after Sept 11th.
RFC patches sent for review only are obviously welcome at any time.
See: https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#development-cycle
>
> Signed-off-by: Shubh <shubhisroking@gmail.com>
> ---
> drivers/net/dsa/mt7530.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
> index 035a34b50..ee19475ec 100644
> --- a/drivers/net/dsa/mt7530.c
> +++ b/drivers/net/dsa/mt7530.c
> @@ -836,7 +836,7 @@ mt7530_get_strings(struct dsa_switch *ds, int port, u32 stringset,
> return;
>
> for (i = 0; i < ARRAY_SIZE(mt7530_mib); i++)
> - strncpy(data + i * ETH_GSTRING_LEN, mt7530_mib[i].name,
> + strscpy_pad(data + i * ETH_GSTRING_LEN, mt7530_mib[i].name,
> ETH_GSTRING_LEN);
The line above is no longer indented correctly.
> }
--
pw-bot: defer
WARNING: multiple messages have this Message-ID (diff)
From: Simon Horman <horms@kernel.org>
To: Shubh <shubhisroking@gmail.com>
Cc: "Arınç ÜNAL" <arinc.unal@arinc9.com>,
"Daniel Golle" <daniel@makrotopia.org>,
"Landen Chao" <Landen.Chao@mediatek.com>,
"DENG Qingfang" <dqfext@gmail.com>,
"Sean Wang" <sean.wang@mediatek.com>,
"Andrew Lunn" <andrew@lunn.ch>,
"Florian Fainelli" <f.fainelli@gmail.com>,
"Vladimir Oltean" <olteanv@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org
Subject: Re: [PATCH] net: dsa: mt7530: refactor deprecated strncpy
Date: Tue, 5 Sep 2023 13:15:26 +0200 [thread overview]
Message-ID: <20230905111526.GE2146@kernel.org> (raw)
In-Reply-To: <20230905041614.14272-1-shubhisroking@gmail.com>
On Tue, Sep 05, 2023 at 09:46:14AM +0530, Shubh wrote:
> Prefer `strscpy_pad` to `strncpy`.
I think this needs some justification.
Why is strscpy_pad() preferred in this case?
Also, assuming this is not a bug-fix for 'net', then it is an enhancement,
and should be targeted at net-next.
Subject: [PATCH net-next] ...
As it stands, net-next is closed:
## Form letter - net-next-closed
The merge window for v6.6 has begun and therefore net-next is closed
for new drivers, features, code refactoring and optimizations.
We are currently accepting bug fixes only.
Please repost when net-next reopens after Sept 11th.
RFC patches sent for review only are obviously welcome at any time.
See: https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#development-cycle
>
> Signed-off-by: Shubh <shubhisroking@gmail.com>
> ---
> drivers/net/dsa/mt7530.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
> index 035a34b50..ee19475ec 100644
> --- a/drivers/net/dsa/mt7530.c
> +++ b/drivers/net/dsa/mt7530.c
> @@ -836,7 +836,7 @@ mt7530_get_strings(struct dsa_switch *ds, int port, u32 stringset,
> return;
>
> for (i = 0; i < ARRAY_SIZE(mt7530_mib); i++)
> - strncpy(data + i * ETH_GSTRING_LEN, mt7530_mib[i].name,
> + strscpy_pad(data + i * ETH_GSTRING_LEN, mt7530_mib[i].name,
> ETH_GSTRING_LEN);
The line above is no longer indented correctly.
> }
--
pw-bot: defer
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-09-05 11:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-05 4:16 [PATCH] net: dsa: mt7530: refactor deprecated strncpy Shubh
2023-09-05 4:16 ` Shubh
2023-09-05 11:15 ` Simon Horman [this message]
2023-09-05 11:15 ` Simon Horman
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=20230905111526.GE2146@kernel.org \
--to=horms@kernel.org \
--cc=Landen.Chao@mediatek.com \
--cc=andrew@lunn.ch \
--cc=angelogioacchino.delregno@collabora.com \
--cc=arinc.unal@arinc9.com \
--cc=daniel@makrotopia.org \
--cc=davem@davemloft.net \
--cc=dqfext@gmail.com \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=sean.wang@mediatek.com \
--cc=shubhisroking@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.