Skip to content

Commit ccf2872

Browse files
Wolfram Sangrafaeljw
authored andcommitted
cpuidle: powernv: 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 <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent ea37471 commit ccf2872

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/cpuidle/cpuidle-powernv.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,8 @@ static inline void add_powernv_state(int index, const char *name,
233233
unsigned int exit_latency,
234234
u64 psscr_val, u64 psscr_mask)
235235
{
236-
strlcpy(powernv_states[index].name, name, CPUIDLE_NAME_LEN);
237-
strlcpy(powernv_states[index].desc, name, CPUIDLE_NAME_LEN);
236+
strscpy(powernv_states[index].name, name, CPUIDLE_NAME_LEN);
237+
strscpy(powernv_states[index].desc, name, CPUIDLE_NAME_LEN);
238238
powernv_states[index].flags = flags;
239239
powernv_states[index].target_residency = target_residency;
240240
powernv_states[index].exit_latency = exit_latency;

0 commit comments

Comments
 (0)