]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
cpufreq: make cpufreq_boost_enabled() return bool
authorDhruva Gole <d-gole@ti.com>
Thu, 27 Jun 2024 06:01:17 +0000 (11:31 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 28 Jun 2024 18:58:04 +0000 (20:58 +0200)
Since this function is supposed to return boost_enabled which is anyway
a bool type make sure that it's return value is also marked as bool.
This helps maintain better consistency in data types being used.

Signed-off-by: Dhruva Gole <d-gole@ti.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://patch.msgid.link/20240627060117.1809477-1-d-gole@ti.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cpufreq.c
include/linux/cpufreq.h

index 82c500389a402933836cbcc45b97f644cd6930ba..709e7b1f98264bc292d10c91607fa101b8d45128 100644 (file)
@@ -2873,7 +2873,7 @@ int cpufreq_enable_boost_support(void)
 }
 EXPORT_SYMBOL_GPL(cpufreq_enable_boost_support);
 
-int cpufreq_boost_enabled(void)
+bool cpufreq_boost_enabled(void)
 {
        return cpufreq_driver->boost_enabled;
 }
index 20f7e98ee8af9027b69435267fbc8c4a39476da4..6f57de7de4338cd527c975a96a2976f88fcd9c76 100644 (file)
@@ -785,7 +785,7 @@ ssize_t cpufreq_show_cpus(const struct cpumask *mask, char *buf);
 
 #ifdef CONFIG_CPU_FREQ
 int cpufreq_boost_trigger_state(int state);
-int cpufreq_boost_enabled(void);
+bool cpufreq_boost_enabled(void);
 int cpufreq_enable_boost_support(void);
 bool policy_has_boost_freq(struct cpufreq_policy *policy);
 
@@ -1164,9 +1164,9 @@ static inline int cpufreq_boost_trigger_state(int state)
 {
        return 0;
 }
-static inline int cpufreq_boost_enabled(void)
+static inline bool cpufreq_boost_enabled(void)
 {
-       return 0;
+       return false;
 }
 
 static inline int cpufreq_enable_boost_support(void)