All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] thermal: cpu_cooling: Remove pointless dependency on CONFIG_OF
@ 2019-10-30  9:10 Daniel Lezcano
  2019-10-30  9:10 ` [PATCH 2/2] thermal: cpu_cooling: Reorder the header file Daniel Lezcano
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Daniel Lezcano @ 2019-10-30  9:10 UTC (permalink / raw)
  To: daniel.lezcano
  Cc: Amit Daniel Kachhap, Viresh Kumar, Javi Merino, Zhang Rui,
	Eduardo Valentin, Amit Kucheria, open list:THERMAL/CPU_COOLING,
	open list

The option CONFIG_CPU_THERMAL depends on CONFIG_OF in the Kconfig.

It it pointless to check if CONFIG_OF is set in the header file as
this is always true if CONFIG_CPU_THERMAL is true. Remove it.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 include/linux/cpu_cooling.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/cpu_cooling.h b/include/linux/cpu_cooling.h
index bae54bb7c048..72d1c9c5e538 100644
--- a/include/linux/cpu_cooling.h
+++ b/include/linux/cpu_cooling.h
@@ -47,7 +47,7 @@ void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev)
 }
 #endif	/* CONFIG_CPU_THERMAL */
 
-#if defined(CONFIG_THERMAL_OF) && defined(CONFIG_CPU_THERMAL)
+#ifdef CONFIG_CPU_THERMAL
 /**
  * of_cpufreq_cooling_register - create cpufreq cooling device based on DT.
  * @policy: cpufreq policy.
@@ -60,6 +60,6 @@ of_cpufreq_cooling_register(struct cpufreq_policy *policy)
 {
 	return NULL;
 }
-#endif /* defined(CONFIG_THERMAL_OF) && defined(CONFIG_CPU_THERMAL) */
+#endif /* CONFIG_CPU_THERMAL */
 
 #endif /* __CPU_COOLING_H__ */
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] thermal: cpu_cooling: Reorder the header file
  2019-10-30  9:10 [PATCH 1/2] thermal: cpu_cooling: Remove pointless dependency on CONFIG_OF Daniel Lezcano
@ 2019-10-30  9:10 ` Daniel Lezcano
  2019-10-31  8:57   ` Viresh Kumar
  2019-11-04  6:21   ` Amit Kucheria
  2019-10-31  8:55 ` [PATCH 1/2] thermal: cpu_cooling: Remove pointless dependency on CONFIG_OF Viresh Kumar
  2019-11-04  6:20 ` Amit Kucheria
  2 siblings, 2 replies; 6+ messages in thread
From: Daniel Lezcano @ 2019-10-30  9:10 UTC (permalink / raw)
  To: daniel.lezcano
  Cc: Amit Daniel Kachhap, Viresh Kumar, Javi Merino, Zhang Rui,
	Eduardo Valentin, Amit Kucheria, open list:THERMAL/CPU_COOLING,
	open list

As the conditions are simplified and unified, it is useless to have
different blocks of definitions under the same compiler condition,
let's merge the blocks.

There is no functional change.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 include/linux/cpu_cooling.h | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/include/linux/cpu_cooling.h b/include/linux/cpu_cooling.h
index 72d1c9c5e538..b74732535e4b 100644
--- a/include/linux/cpu_cooling.h
+++ b/include/linux/cpu_cooling.h
@@ -33,6 +33,13 @@ cpufreq_cooling_register(struct cpufreq_policy *policy);
  */
 void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev);
 
+/**
+ * of_cpufreq_cooling_register - create cpufreq cooling device based on DT.
+ * @policy: cpufreq policy.
+ */
+struct thermal_cooling_device *
+of_cpufreq_cooling_register(struct cpufreq_policy *policy);
+
 #else /* !CONFIG_CPU_THERMAL */
 static inline struct thermal_cooling_device *
 cpufreq_cooling_register(struct cpufreq_policy *policy)
@@ -45,16 +52,7 @@ void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev)
 {
 	return;
 }
-#endif	/* CONFIG_CPU_THERMAL */
 
-#ifdef CONFIG_CPU_THERMAL
-/**
- * of_cpufreq_cooling_register - create cpufreq cooling device based on DT.
- * @policy: cpufreq policy.
- */
-struct thermal_cooling_device *
-of_cpufreq_cooling_register(struct cpufreq_policy *policy);
-#else
 static inline struct thermal_cooling_device *
 of_cpufreq_cooling_register(struct cpufreq_policy *policy)
 {
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] thermal: cpu_cooling: Remove pointless dependency on CONFIG_OF
  2019-10-30  9:10 [PATCH 1/2] thermal: cpu_cooling: Remove pointless dependency on CONFIG_OF Daniel Lezcano
  2019-10-30  9:10 ` [PATCH 2/2] thermal: cpu_cooling: Reorder the header file Daniel Lezcano
@ 2019-10-31  8:55 ` Viresh Kumar
  2019-11-04  6:20 ` Amit Kucheria
  2 siblings, 0 replies; 6+ messages in thread
From: Viresh Kumar @ 2019-10-31  8:55 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Amit Daniel Kachhap, Javi Merino, Zhang Rui, Eduardo Valentin,
	Amit Kucheria, open list:THERMAL/CPU_COOLING, open list

On Wed, 30 Oct 2019 at 14:41, Daniel Lezcano <daniel.lezcano@linaro.org> wrote:
>
> The option CONFIG_CPU_THERMAL depends on CONFIG_OF in the Kconfig.
>
> It it pointless to check if CONFIG_OF is set in the header file as
> this is always true if CONFIG_CPU_THERMAL is true. Remove it.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---
>  include/linux/cpu_cooling.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] thermal: cpu_cooling: Reorder the header file
  2019-10-30  9:10 ` [PATCH 2/2] thermal: cpu_cooling: Reorder the header file Daniel Lezcano
@ 2019-10-31  8:57   ` Viresh Kumar
  2019-11-04  6:21   ` Amit Kucheria
  1 sibling, 0 replies; 6+ messages in thread
From: Viresh Kumar @ 2019-10-31  8:57 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Amit Daniel Kachhap, Javi Merino, Zhang Rui, Eduardo Valentin,
	Amit Kucheria, open list:THERMAL/CPU_COOLING, open list

On Wed, 30 Oct 2019 at 14:41, Daniel Lezcano <daniel.lezcano@linaro.org> wrote:
>
> As the conditions are simplified and unified, it is useless to have
> different blocks of definitions under the same compiler condition,
> let's merge the blocks.
>
> There is no functional change.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---
>  include/linux/cpu_cooling.h | 16 +++++++---------
>  1 file changed, 7 insertions(+), 9 deletions(-)

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] thermal: cpu_cooling: Remove pointless dependency on CONFIG_OF
  2019-10-30  9:10 [PATCH 1/2] thermal: cpu_cooling: Remove pointless dependency on CONFIG_OF Daniel Lezcano
  2019-10-30  9:10 ` [PATCH 2/2] thermal: cpu_cooling: Reorder the header file Daniel Lezcano
  2019-10-31  8:55 ` [PATCH 1/2] thermal: cpu_cooling: Remove pointless dependency on CONFIG_OF Viresh Kumar
@ 2019-11-04  6:20 ` Amit Kucheria
  2 siblings, 0 replies; 6+ messages in thread
From: Amit Kucheria @ 2019-11-04  6:20 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Amit Daniel Kachhap, Viresh Kumar, Javi Merino, Zhang Rui,
	Eduardo Valentin, open list:THERMAL/CPU_COOLING, open list

On Wed, Oct 30, 2019 at 2:41 PM Daniel Lezcano
<daniel.lezcano@linaro.org> wrote:
>
> The option CONFIG_CPU_THERMAL depends on CONFIG_OF in the Kconfig.
>
> It it pointless to check if CONFIG_OF is set in the header file as
> this is always true if CONFIG_CPU_THERMAL is true. Remove it.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>

> ---
>  include/linux/cpu_cooling.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/cpu_cooling.h b/include/linux/cpu_cooling.h
> index bae54bb7c048..72d1c9c5e538 100644
> --- a/include/linux/cpu_cooling.h
> +++ b/include/linux/cpu_cooling.h
> @@ -47,7 +47,7 @@ void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev)
>  }
>  #endif /* CONFIG_CPU_THERMAL */
>
> -#if defined(CONFIG_THERMAL_OF) && defined(CONFIG_CPU_THERMAL)
> +#ifdef CONFIG_CPU_THERMAL
>  /**
>   * of_cpufreq_cooling_register - create cpufreq cooling device based on DT.
>   * @policy: cpufreq policy.
> @@ -60,6 +60,6 @@ of_cpufreq_cooling_register(struct cpufreq_policy *policy)
>  {
>         return NULL;
>  }
> -#endif /* defined(CONFIG_THERMAL_OF) && defined(CONFIG_CPU_THERMAL) */
> +#endif /* CONFIG_CPU_THERMAL */
>
>  #endif /* __CPU_COOLING_H__ */
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] thermal: cpu_cooling: Reorder the header file
  2019-10-30  9:10 ` [PATCH 2/2] thermal: cpu_cooling: Reorder the header file Daniel Lezcano
  2019-10-31  8:57   ` Viresh Kumar
@ 2019-11-04  6:21   ` Amit Kucheria
  1 sibling, 0 replies; 6+ messages in thread
From: Amit Kucheria @ 2019-11-04  6:21 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Amit Daniel Kachhap, Viresh Kumar, Javi Merino, Zhang Rui,
	Eduardo Valentin, open list:THERMAL/CPU_COOLING, open list

On Wed, Oct 30, 2019 at 2:41 PM Daniel Lezcano
<daniel.lezcano@linaro.org> wrote:
>
> As the conditions are simplified and unified, it is useless to have
> different blocks of definitions under the same compiler condition,
> let's merge the blocks.
>
> There is no functional change.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>

> ---
>  include/linux/cpu_cooling.h | 16 +++++++---------
>  1 file changed, 7 insertions(+), 9 deletions(-)
>
> diff --git a/include/linux/cpu_cooling.h b/include/linux/cpu_cooling.h
> index 72d1c9c5e538..b74732535e4b 100644
> --- a/include/linux/cpu_cooling.h
> +++ b/include/linux/cpu_cooling.h
> @@ -33,6 +33,13 @@ cpufreq_cooling_register(struct cpufreq_policy *policy);
>   */
>  void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev);
>
> +/**
> + * of_cpufreq_cooling_register - create cpufreq cooling device based on DT.
> + * @policy: cpufreq policy.
> + */
> +struct thermal_cooling_device *
> +of_cpufreq_cooling_register(struct cpufreq_policy *policy);
> +
>  #else /* !CONFIG_CPU_THERMAL */
>  static inline struct thermal_cooling_device *
>  cpufreq_cooling_register(struct cpufreq_policy *policy)
> @@ -45,16 +52,7 @@ void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev)
>  {
>         return;
>  }
> -#endif /* CONFIG_CPU_THERMAL */
>
> -#ifdef CONFIG_CPU_THERMAL
> -/**
> - * of_cpufreq_cooling_register - create cpufreq cooling device based on DT.
> - * @policy: cpufreq policy.
> - */
> -struct thermal_cooling_device *
> -of_cpufreq_cooling_register(struct cpufreq_policy *policy);
> -#else
>  static inline struct thermal_cooling_device *
>  of_cpufreq_cooling_register(struct cpufreq_policy *policy)
>  {
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-11-04  6:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-30  9:10 [PATCH 1/2] thermal: cpu_cooling: Remove pointless dependency on CONFIG_OF Daniel Lezcano
2019-10-30  9:10 ` [PATCH 2/2] thermal: cpu_cooling: Reorder the header file Daniel Lezcano
2019-10-31  8:57   ` Viresh Kumar
2019-11-04  6:21   ` Amit Kucheria
2019-10-31  8:55 ` [PATCH 1/2] thermal: cpu_cooling: Remove pointless dependency on CONFIG_OF Viresh Kumar
2019-11-04  6:20 ` Amit Kucheria

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.