diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2022-08-18 23:01:21 +0200 |
---|---|---|
committer | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2023-05-08 08:14:49 +0200 |
commit | 5dfd3c73ff81618fee0ef682b6fd7779863f41e4 (patch) | |
tree | 3e1b39710a5ee13954377e313f2d4d9e3d9d2561 | |
parent | w1: Remove driver match function (diff) | |
download | linux-5dfd3c73ff81618fee0ef682b6fd7779863f41e4.tar.xz linux-5dfd3c73ff81618fee0ef682b6fd7779863f41e4.zip |
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>
-rw-r--r-- | drivers/w1/masters/sgi_w1.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/w1/masters/sgi_w1.c b/drivers/w1/masters/sgi_w1.c index e8c7fa68d3cc..d7fbc3c146e1 100644 --- a/drivers/w1/masters/sgi_w1.c +++ b/drivers/w1/masters/sgi_w1.c @@ -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; } |