w1: sgi: move from strlcpy with unused retval to strscpy
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> Link: https://lore.kernel.org/r/20220818210121.7589-1-wsa+renesas@sang-engineering.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
This commit is contained in:
parent
388f22fe5d
commit
5dfd3c73ff
|
@ -93,7 +93,7 @@ static int sgi_w1_probe(struct platform_device *pdev)
|
|||
|
||||
pdata = dev_get_platdata(&pdev->dev);
|
||||
if (pdata) {
|
||||
strlcpy(sdev->dev_id, pdata->dev_id, sizeof(sdev->dev_id));
|
||||
strscpy(sdev->dev_id, pdata->dev_id, sizeof(sdev->dev_id));
|
||||
sdev->bus_master.dev_id = sdev->dev_id;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue