linux-sunxi.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH] phy: move from strlcpy with unused retval to strscpy
@ 2022-08-18 21:00 Wolfram Sang
  2022-08-25 21:34 ` Jernej Škrabec
  2022-08-30  7:42 ` Vinod Koul
  0 siblings, 2 replies; 3+ messages in thread
From: Wolfram Sang @ 2022-08-18 21:00 UTC (permalink / raw)
  To: linux-kernel
  Cc: Wolfram Sang, Kishon Vijay Abraham I, Vinod Koul, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland, linux-phy, linux-arm-kernel,
	linux-sunxi

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.

Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/phy/allwinner/phy-sun4i-usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c
index d5f3b42eb8ce..3a3831f6059a 100644
--- a/drivers/phy/allwinner/phy-sun4i-usb.c
+++ b/drivers/phy/allwinner/phy-sun4i-usb.c
@@ -768,7 +768,7 @@ static int sun4i_usb_phy_probe(struct platform_device *pdev)
 		if (data->cfg->dedicated_clocks)
 			snprintf(name, sizeof(name), "usb%d_phy", i);
 		else
-			strlcpy(name, "usb_phy", sizeof(name));
+			strscpy(name, "usb_phy", sizeof(name));
 
 		phy->clk = devm_clk_get(dev, name);
 		if (IS_ERR(phy->clk)) {
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] phy: move from strlcpy with unused retval to strscpy
  2022-08-18 21:00 [PATCH] phy: move from strlcpy with unused retval to strscpy Wolfram Sang
@ 2022-08-25 21:34 ` Jernej Škrabec
  2022-08-30  7:42 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Jernej Škrabec @ 2022-08-25 21:34 UTC (permalink / raw)
  To: linux-kernel, Wolfram Sang
  Cc: Wolfram Sang, Kishon Vijay Abraham I, Vinod Koul, Chen-Yu Tsai,
	Samuel Holland, linux-phy, linux-arm-kernel, linux-sunxi

Dne četrtek, 18. avgust 2022 ob 23:00:56 CEST je Wolfram Sang napisal(a):
> 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.
> 
> Link:
> https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmk
> nw@mail.gmail.com/ Signed-off-by: Wolfram Sang
> <wsa+renesas@sang-engineering.com>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej

> ---
>  drivers/phy/allwinner/phy-sun4i-usb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c
> b/drivers/phy/allwinner/phy-sun4i-usb.c index d5f3b42eb8ce..3a3831f6059a
> 100644
> --- a/drivers/phy/allwinner/phy-sun4i-usb.c
> +++ b/drivers/phy/allwinner/phy-sun4i-usb.c
> @@ -768,7 +768,7 @@ static int sun4i_usb_phy_probe(struct platform_device
> *pdev) if (data->cfg->dedicated_clocks)
>  			snprintf(name, sizeof(name), "usb%d_phy", 
i);
>  		else
> -			strlcpy(name, "usb_phy", sizeof(name));
> +			strscpy(name, "usb_phy", sizeof(name));
> 
>  		phy->clk = devm_clk_get(dev, name);
>  		if (IS_ERR(phy->clk)) {
> --
> 2.35.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] phy: move from strlcpy with unused retval to strscpy
  2022-08-18 21:00 [PATCH] phy: move from strlcpy with unused retval to strscpy Wolfram Sang
  2022-08-25 21:34 ` Jernej Škrabec
@ 2022-08-30  7:42 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2022-08-30  7:42 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-kernel, Kishon Vijay Abraham I, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland, linux-phy, linux-arm-kernel,
	linux-sunxi

On 18-08-22, 23:00, Wolfram Sang wrote:
> 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.

Applied, thanks

-- 
~Vinod

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-30  7:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-18 21:00 [PATCH] phy: move from strlcpy with unused retval to strscpy Wolfram Sang
2022-08-25 21:34 ` Jernej Škrabec
2022-08-30  7:42 ` Vinod Koul

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