linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] net: move from strlcpy with unused retval to strscpy
       [not found] <20220818210050.7108-1-wsa+renesas@sang-engineering.com>
@ 2022-08-23  7:09 ` Krzysztof Hałasa
  0 siblings, 0 replies; only message in thread
From: Krzysztof Hałasa @ 2022-08-23  7:09 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-kernel, David S. Miller, netdev, linux-arm-kernel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-23  7:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20220818210050.7108-1-wsa+renesas@sang-engineering.com>
2022-08-23  7:09 ` [PATCH] net: move from strlcpy with unused retval to strscpy Krzysztof Hałasa

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).