cpufreq: ACPI: Use str_enabled_disabled() helper
PATCH 1/1 cpufreq: ACPI: Use str_enabled_disabled() helper
Use str_enabled_disabled() helper instead of open coding the same.
Signed-off-by Andy Shevchenko <[email protected]>
--- drivers/cpufreq/acpi-cpufreq.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/cpufreq/acpi-cpufreq.c +3 -2
@@ -19,6 +19,7 @@#include <linux/compiler.h> #include <linux/dmi.h> #include <linux/slab.h> +#include <linux/string_helpers.h> #include <linux/acpi.h> #include <linux/io.h>
@@ -135,8 +136,8 @@ static int set_boost(struct cpufreq_policy *policy, int val) {on_each_cpu_mask (policy->cpus, boost_set_msr_each, (void *)(long )val,1 ); -pr_debug ("CPU %*pbl: Core Boosting %sabled.\n" , -cpumask_pr_args (policy->cpus), val ?"en" :"dis" ); +pr_debug ("CPU %*pbl: Core Boosting %s.\n" , +cpumask_pr_args (policy->cpus),str_enabled_disabled (val));return 0 ; }
Signature · 1 line
2.35.1
Quoted 22 lines · Andy Shevchenko
Use
str_enabled_disabled()helper instead of open coding the same.Signed-off-by Andy Shevchenko <[email protected]>--- drivers/cpufreq/acpi-cpufreq.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/cpufreq/acpi-cpufreq.c +1
-0@@ -19,6 +19,7 @@#include <linux/compiler.h> #include <linux/dmi.h> #include <linux/slab.h> +#include <linux/string_helpers.h> #include <linux/acpi.h> #include <linux/io.h> @@ -135,8 +136,8 @@ static int set_boost(struct cpufreq_policy *policy, int val) {
drivers/cpufreq/acpi-cpufreq.c static int set_boost(struct cpufreq_policy *policy, int val)
Quoted 10 lines
drivers/cpufreq/acpi-cpufreq.c +2
-3on_each_cpu_mask (policy->cpus, boost_set_msr_each, (void *)(long )val,1 ); -pr_debug ("CPU %*pbl: Core Boosting %sabled.\n" , -cpumask_pr_args (policy->cpus), val ?"en" :"dis" ); +pr_debug ("CPU %*pbl: Core Boosting %s.\n" , +cpumask_pr_args (policy->cpus),str_enabled_disabled (val));return 0 ; } --
Applied as 6.2 material, thanks!