kernel: cpu: Remove unnecessary ‘0’ values from ret
PATCH 1/1 kernel: cpu: Remove unnecessary ‘0’ values from ret
The ret variable is assigned when it does not need to be defined, as it has already been assigned before use.
Signed-off-by Li kunyu <[email protected]>
--- kernel/cpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
kernel/cpu.c +3 -3
@@ -998,7 +998,7 @@ static int cpuhp_up_callbacks(unsigned int cpu, struct cpuhp_cpu_state *st, enum cpuhp_state target) {enum cpuhp_state prev_state = st->state; -int ret =0 ; +int ret; ret =cpuhp_invoke_callback_range (true, cpu, st, target);if (ret) {
@@ -1402,7 +1402,7 @@ static int cpuhp_down_callbacks(unsigned int cpu, struct cpuhp_cpu_state *st, enum cpuhp_state target) {enum cpuhp_state prev_state = st->state; -int ret =0 ; +int ret; ret =cpuhp_invoke_callback_range (false, cpu, st, target);if (ret) {
@@ -2488,7 +2488,7 @@ int __cpuhp_setup_state_cpuslocked(enum cpuhp_state state,int (*teardown)(unsigned int cpu), bool multi_instance) { - int cpu, ret = 0; + int cpu, ret;bool dynstate;lockdep_assert_cpus_held ();
Signature · 1 line
2.18.2