cpufreq: ACPI: Use str_enabled_disabled() helper
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Sat, 8 Oct 2022 19:52:44 +0000 (22:52 +0300)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 3 Nov 2022 18:10:57 +0000 (19:10 +0100)
Use str_enabled_disabled() helper instead of open coding the same.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/acpi-cpufreq.c

index 1bb2b90..8597ab0 100644 (file)
@@ -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;
 }