From: "Krzysztof Hałasa" <khalasa@piap.pl> To: Wolfram Sang <wsa+renesas@sang-engineering.com> Cc: linux-kernel@vger.kernel.org, "David S. Miller" <davem@davemloft.net>, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] net: move from strlcpy with unused retval to strscpy Date: Tue, 23 Aug 2022 09:09:33 +0200 [thread overview] Message-ID: <m34jy38mhe.fsf@t19.piap.pl> (raw) In-Reply-To: <20220818210050.7108-1-wsa+renesas@sang-engineering.com> (Wolfram Sang's message of "Thu, 18 Aug 2022 23:00:34 +0200") Wolfram Sang <wsa+renesas@sang-engineering.com> writes: > Follow the advice of the below link and prefer 'strscpy' in this > subsystem. Conversion is 1:1 because the return value is not used. > Generated by a coccinelle script. Looks good to me (IXP4xx Ethernet). Acked-by: Krzysztof Hałasa <khalasa@piap.pl> > +++ b/drivers/net/ethernet/xscale/ixp4xx_eth.c > @@ -999,11 +999,11 @@ static void ixp4xx_get_drvinfo(struct net_device *dev, > { > struct port *port = netdev_priv(dev); > > - strlcpy(info->driver, DRV_NAME, sizeof(info->driver)); > + strscpy(info->driver, DRV_NAME, sizeof(info->driver)); > snprintf(info->fw_version, sizeof(info->fw_version), "%u:%u:%u:%u", > port->firmware[0], port->firmware[1], > port->firmware[2], port->firmware[3]); > - strlcpy(info->bus_info, "internal", sizeof(info->bus_info)); > + strscpy(info->bus_info, "internal", sizeof(info->bus_info)); > } > -- Krzysztof "Chris" Hałasa Sieć Badawcza Łukasiewicz Przemysłowy Instytut Automatyki i Pomiarów PIAP Al. Jerozolimskie 202, 02-486 Warszawa
WARNING: multiple messages have this Message-ID (diff)
From: "Krzysztof Hałasa" <khalasa@piap.pl> To: Wolfram Sang <wsa+renesas@sang-engineering.com> Cc: linux-kernel@vger.kernel.org, "David S. Miller" <davem@davemloft.net>, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] net: move from strlcpy with unused retval to strscpy Date: Tue, 23 Aug 2022 09:09:33 +0200 [thread overview] Message-ID: <m34jy38mhe.fsf@t19.piap.pl> (raw) In-Reply-To: <20220818210050.7108-1-wsa+renesas@sang-engineering.com> (Wolfram Sang's message of "Thu, 18 Aug 2022 23:00:34 +0200") Wolfram Sang <wsa+renesas@sang-engineering.com> writes: > Follow the advice of the below link and prefer 'strscpy' in this > subsystem. Conversion is 1:1 because the return value is not used. > Generated by a coccinelle script. Looks good to me (IXP4xx Ethernet). Acked-by: Krzysztof Hałasa <khalasa@piap.pl> > +++ b/drivers/net/ethernet/xscale/ixp4xx_eth.c > @@ -999,11 +999,11 @@ static void ixp4xx_get_drvinfo(struct net_device *dev, > { > struct port *port = netdev_priv(dev); > > - strlcpy(info->driver, DRV_NAME, sizeof(info->driver)); > + strscpy(info->driver, DRV_NAME, sizeof(info->driver)); > snprintf(info->fw_version, sizeof(info->fw_version), "%u:%u:%u:%u", > port->firmware[0], port->firmware[1], > port->firmware[2], port->firmware[3]); > - strlcpy(info->bus_info, "internal", sizeof(info->bus_info)); > + strscpy(info->bus_info, "internal", sizeof(info->bus_info)); > } > -- Krzysztof "Chris" Hałasa Sieć Badawcza Łukasiewicz Przemysłowy Instytut Automatyki i Pomiarów PIAP Al. Jerozolimskie 202, 02-486 Warszawa _______________________________________________ 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:[~2022-08-23 7:10 UTC|newest] Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-08-18 21:00 [PATCH] net: move from strlcpy with unused retval to strscpy Wolfram Sang 2022-08-18 21:00 ` [Intel-wired-lan] " Wolfram Sang 2022-08-18 21:00 ` Wolfram Sang 2022-08-19 6:53 ` Marc Kleine-Budde 2022-08-19 9:45 ` Petr Machata 2022-08-19 15:26 ` Geoff Levand 2022-08-19 15:26 ` Geoff Levand 2022-08-19 15:26 ` [Intel-wired-lan] " Geoff Levand 2022-08-19 15:45 ` Tom Lendacky 2022-08-19 15:45 ` Tom Lendacky 2022-08-19 15:45 ` [Intel-wired-lan] " Tom Lendacky 2022-08-19 15:45 ` Tom Lendacky via Virtualization 2022-08-19 16:06 ` Marcin Wojtas 2022-08-19 16:06 ` [Intel-wired-lan] " Marcin Wojtas 2022-08-19 16:06 ` Marcin Wojtas 2022-08-21 11:39 ` Leon Romanovsky 2022-08-21 11:39 ` Leon Romanovsky 2022-08-21 11:39 ` Leon Romanovsky 2022-08-21 11:39 ` [Intel-wired-lan] " Leon Romanovsky 2022-08-22 7:00 ` Shay Agroskin 2022-08-22 7:00 ` [Intel-wired-lan] " Shay Agroskin 2022-08-22 7:00 ` Shay Agroskin 2022-08-23 1:05 ` Jakub Kicinski 2022-08-23 1:05 ` Jakub Kicinski 2022-08-23 1:05 ` [Intel-wired-lan] " Jakub Kicinski 2022-08-30 19:59 ` Wolfram Sang 2022-08-30 19:59 ` Wolfram Sang 2022-08-30 19:59 ` [Intel-wired-lan] " Wolfram Sang 2022-08-23 7:09 ` Krzysztof Hałasa [this message] 2022-08-23 7:09 ` Krzysztof Hałasa 2022-08-18 21:02 Wolfram Sang 2022-08-23 1:20 ` 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=m34jy38mhe.fsf@t19.piap.pl \ --to=khalasa@piap.pl \ --cc=davem@davemloft.net \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=netdev@vger.kernel.org \ --cc=wsa+renesas@sang-engineering.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: linkBe 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.