cpufreq: intel_pstate: Rearrange variable declaration involving __free()
Subsystems (2)
Rafael J. Wysocki
maintainerPATCH 1/1 cpufreq: intel_pstate: Rearrange variable declaration involving __free()
From: Rafael J. Wysocki <[email protected]>
Follow cleanup.h recommendations and define and assign a variable in one statement when __free() is used.
No intentional functional impact.
---
Zhang, I said the code structure here was intentional, but that was before the cleanup.h recommendation was pointed out to me.
--- drivers/cpufreq/intel_pstate.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/cpufreq/intel_pstate.c +1 -3
@@ -1502,9 +1502,7 @@ static void __intel_pstate_update_max_frstatic bool intel_pstate_update_max_freq (struct cpudata *cpudata) { - struct cpufreq_policy *policy __free(put_cpufreq_policy); - - policy =cpufreq_cpu_get (cpudata->cpu); + struct cpufreq_policy *policy __free(put_cpufreq_policy) = cpufreq_cpu_get(cpudata->cpu);if (!policy)return false;
Quoted 8 lines · Rafael J. Wysocki
From: Rafael J. Wysocki <[email protected]>
Follow
cleanup.hrecommendations and define and assign a variable in one statement when__free()is used.No intentional functional impact.
Signed-off-by Rafael J. Wysocki <[email protected]>
Best regards,
Krzysztof
Quoted 22 lines · Rafael J. Wysocki
From: Rafael J. Wysocki <[email protected]>
Follow
cleanup.hrecommendations and define and assign a variable in one statement when__free()is used.No intentional functional impact.
Signed-off-by Rafael J. Wysocki <[email protected]>---
Zhang, I said the code structure here was intentional, but that was before the
cleanup.hrecommendation was pointed out to me.--- drivers/cpufreq/intel_pstate.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/cpufreq/intel_pstate.c static void __intel_pstate_update_max_fr · line 1508
Quoted 10 lines
drivers/cpufreq/intel_pstate.c +1
-3@@ -1502,9 +1502,7 @@ static void __intel_pstate_update_max_frstatic bool intel_pstate_update_max_freq (struct cpudata *cpudata) { - struct cpufreq_policy *policy __free(put_cpufreq_policy); - - policy =cpufreq_cpu_get (cpudata->cpu); + struct cpufreq_policy *policy __free(put_cpufreq_policy) = cpufreq_cpu_get(cpudata->cpu);if (!policy)return false;
Signature · 1 line
viresh
Zihuan Zhang
Reviewed-byQuoted 23 lines · Rafael J. Wysocki
Quoted 21 lines
From: Rafael J. Wysocki <[email protected]>
Follow
cleanup.hrecommendations and define and assign a variable in one statement when__free()is used.No intentional functional impact.
Signed-off-by Rafael J. Wysocki <[email protected]>---
Zhang, I said the code structure here was intentional, but that was before the
cleanup.hrecommendation was pointed out to me.--- drivers/cpufreq/intel_pstate.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/cpufreq/intel_pstate.c +0
-0@@ -1502,9 +1502,7 @@ static void __intel_pstate_update_max_fr
Quoted 9 lines
drivers/cpufreq/intel_pstate.c static void __intel_pstate_update_max_fr · line 1508
Quoted 9 lines
drivers/cpufreq/intel_pstate.c +1
-3static bool intel_pstate_update_max_freq (struct cpudata *cpudata) { - struct cpufreq_policy *policy __free(put_cpufreq_policy); - - policy =cpufreq_cpu_get (cpudata->cpu); + struct cpufreq_policy *policy __free(put_cpufreq_policy) = cpufreq_cpu_get(cpudata->cpu);if (!policy)return false;