[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3506634.R56niFO833@kista>
Date: Thu, 25 Aug 2022 23:34:25 +0200
From: Jernej Škrabec <jernej.skrabec@...il.com>
To: linux-kernel@...r.kernel.org,
Wolfram Sang <wsa+renesas@...g-engineering.com>
Cc: Wolfram Sang <wsa+renesas@...g-engineering.com>,
Kishon Vijay Abraham I <kishon@...com>,
Vinod Koul <vkoul@...nel.org>, Chen-Yu Tsai <wens@...e.org>,
Samuel Holland <samuel@...lland.org>,
linux-phy@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org, linux-sunxi@...ts.linux.dev
Subject: Re: [PATCH] phy: move from strlcpy with unused retval to strscpy
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@...l.gmail.com/ Signed-off-by: Wolfram Sang
> <wsa+renesas@...g-engineering.com>
Acked-by: Jernej Skrabec <jernej.skrabec@...il.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
Powered by blists - more mailing lists