cpufreq: make cpufreq_boost_enabled return bool
PATCH v2 1/1 cpufreq: make cpufreq_boost_enabled return bool
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.
---
Changelog:
"return false" instead of 0 as per Mario's suggestion.
Link to previous patch:
https://lore.kernel.org/linux-pm/[email protected]/
---
drivers/cpufreq/cpufreq.c | 2 +- include/linux/cpufreq.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/cpufreq/cpufreq.c +1 -1
@@ -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; }
include/linux/cpufreq.h +3 -3
@@ -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 )
base-commit: df9574a57d02b265322e77fb8628d4d33641dda9
Signature · 1 line
2.34.1
Quoted 5 lines · Dhruva Gole
Since this function is supposed to return
boost_enabledwhich 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 <[email protected]>
Quoted 54 lines
---
Changelog:
"return false" instead of 0 as per Mario's suggestion.Link to previous patch:
https://lore.kernel.org/linux-pm/[email protected]/---
drivers/cpufreq/cpufreq.c | 2 +- include/linux/cpufreq.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)drivers/cpufreq/cpufreq.c +1
-1@@ -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; }include/linux/cpufreq.h +3
-3@@ -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 )base-commit:
df9574a57d02b265322e77fb8628d4d33641dda9
Quoted 9 lines · Mario Limonciello
Quoted 5 lines · Dhruva Gole
Since this function is supposed to return
boost_enabledwhich 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 <[email protected]>Reviewed-by Mario Limonciello <[email protected]>
Applied as 6.11 material, thanks!
Quoted 56 lines
Quoted 54 lines
---
Changelog:
"return false" instead of 0 as per Mario's suggestion.Link to previous patch:
https://lore.kernel.org/linux-pm/[email protected]/---
drivers/cpufreq/cpufreq.c | 2 +- include/linux/cpufreq.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)drivers/cpufreq/cpufreq.c +1
-1@@ -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; }include/linux/cpufreq.h +3
-3@@ -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 )base-commit:
df9574a57d02b265322e77fb8628d4d33641dda9