diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2022-08-18 23:59:46 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-08-26 04:02:20 +0300 |
commit | 14be375634c3f8ff750bdce0c10036c2fbfcb282 (patch) | |
tree | 2cc08566b88ac14c48359e9576274dc07dc20faa /arch/powerpc/platforms/powernv/idle.c | |
parent | f7d5f00702e2da656b2a8f975fdaa0d48329de36 (diff) | |
download | linux-14be375634c3f8ff750bdce0c10036c2fbfcb282.tar.xz |
powerpc: 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.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/
Link: https://lore.kernel.org/r/20220818205946.6336-1-wsa+renesas@sang-engineering.com
Diffstat (limited to 'arch/powerpc/platforms/powernv/idle.c')
-rw-r--r-- | arch/powerpc/platforms/powernv/idle.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/powernv/idle.c b/arch/powerpc/platforms/powernv/idle.c index 6f94b808dd39..6e6b3bd9c92f 100644 --- a/arch/powerpc/platforms/powernv/idle.c +++ b/arch/powerpc/platforms/powernv/idle.c @@ -1411,7 +1411,7 @@ static int __init pnv_parse_cpuidle_dt(void) goto out; } for (i = 0; i < nr_idle_states; i++) - strlcpy(pnv_idle_states[i].name, temp_string[i], + strscpy(pnv_idle_states[i].name, temp_string[i], PNV_IDLE_NAME_LEN); nr_pnv_idle_states = nr_idle_states; rc = 0; |