linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/14] thermal core include cleanups
@ 2020-05-11 12:24 Amit Kucheria
  2020-05-11 12:24 ` [PATCH 01/14] thermal/core: Get rid of MODULE_* tags Amit Kucheria
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: Amit Kucheria @ 2020-05-11 12:24 UTC (permalink / raw)
  To: linux-kernel, linux-arm-msm, daniel.lezcano, Amit Daniel Kachhap,
	Amit Kucheria, Javi Merino, Viresh Kumar, Zhang Rui
  Cc: linux-pm

I noticed some remnants from when thermal core could be modular. While
cleaning that up, I fixed up the includes to be sorted alphabetically and
included export.h in files that were using EXPORT_SYMBOL* or THIS_MODULE
while at the same time removing inclusion of module.h from core files.

Finally, the names of the source files for the governors and core have some
inconsistencies and the last couple of patches rename them.

Build and boot tested on some ARM boards.

Amit Kucheria (14):
  thermal/core: Get rid of MODULE_* tags
  thermal/core: Replace module.h with export.h
  thermal/drivers/thermal_helpers: Sort headers alphabetically
  thermal/drivers/thermal_helpers: Include export.h
  thermal/drivers/thermal_hwmon: Sort headers alphabetically
  thermal/drivers/thermal_hwmon: Include export.h
  thermal/drivers/clock_cooling: Sort headers alphabetically
  thermal/drivers/clock_cooling: Include export.h
  thermal/drivers/cpufreq_cooling: Sort headers alphabetically
  thermal/drivers/cpufreq_cooling: Replace module.h with export.h
  thermal/drivers/of-thermal: Sort headers alphabetically
  thermal/drivers/user_space: Sort headers alphabetically
  thermal/governors: Prefix all source files with gov_
  thermal/of: Rename of-thermal.c

 drivers/thermal/Makefile                               | 10 +++++-----
 drivers/thermal/clock_cooling.c                        |  3 ++-
 drivers/thermal/cpufreq_cooling.c                      | 10 +++++-----
 drivers/thermal/{fair_share.c => gov_fair_share.c}     |  0
 .../{power_allocator.c => gov_power_allocator.c}       |  0
 drivers/thermal/{step_wise.c => gov_step_wise.c}       |  0
 drivers/thermal/{user_space.c => gov_user_space.c}     |  2 +-
 drivers/thermal/thermal_core.c                         |  6 +-----
 drivers/thermal/thermal_helpers.c                      |  3 ++-
 drivers/thermal/thermal_hwmon.c                        |  6 ++++--
 drivers/thermal/{of-thermal.c => thermal_of.c}         | 10 +++++-----
 11 files changed, 25 insertions(+), 25 deletions(-)
 rename drivers/thermal/{fair_share.c => gov_fair_share.c} (100%)
 rename drivers/thermal/{power_allocator.c => gov_power_allocator.c} (100%)
 rename drivers/thermal/{step_wise.c => gov_step_wise.c} (100%)
 rename drivers/thermal/{user_space.c => gov_user_space.c} (100%)
 rename drivers/thermal/{of-thermal.c => thermal_of.c} (100%)

-- 
2.20.1


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

* [PATCH 01/14] thermal/core: Get rid of MODULE_* tags
  2020-05-11 12:24 [PATCH 00/14] thermal core include cleanups Amit Kucheria
@ 2020-05-11 12:24 ` Amit Kucheria
  2020-05-11 12:24 ` [PATCH 02/14] thermal/core: Replace module.h with export.h Amit Kucheria
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Amit Kucheria @ 2020-05-11 12:24 UTC (permalink / raw)
  To: linux-kernel, linux-arm-msm, daniel.lezcano, Amit Daniel Kachhap,
	Amit Kucheria, Javi Merino, Viresh Kumar, Zhang Rui
  Cc: linux-pm

The thermal framework can no longer be compiled as a module as of
commit 554b3529fe01 ("thermal/drivers/core: Remove the module Kconfig's
option"). Remove the MODULE_* tags.

Rui is mentioned in the copyright line at the top of the file and the
license is mentioned in the SPDX tags. So no loss of information.

Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
---
 drivers/thermal/thermal_core.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 9a321dc548c8..286920e06277 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -27,10 +27,6 @@
 #include "thermal_core.h"
 #include "thermal_hwmon.h"
 
-MODULE_AUTHOR("Zhang Rui");
-MODULE_DESCRIPTION("Generic thermal management sysfs support");
-MODULE_LICENSE("GPL v2");
-
 static DEFINE_IDA(thermal_tz_ida);
 static DEFINE_IDA(thermal_cdev_ida);
 
-- 
2.20.1


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

* [PATCH 02/14] thermal/core: Replace module.h with export.h
  2020-05-11 12:24 [PATCH 00/14] thermal core include cleanups Amit Kucheria
  2020-05-11 12:24 ` [PATCH 01/14] thermal/core: Get rid of MODULE_* tags Amit Kucheria
@ 2020-05-11 12:24 ` Amit Kucheria
  2020-05-11 12:24 ` [PATCH 03/14] thermal/drivers/thermal_helpers: Sort headers alphabetically Amit Kucheria
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Amit Kucheria @ 2020-05-11 12:24 UTC (permalink / raw)
  To: linux-kernel, linux-arm-msm, daniel.lezcano, Amit Daniel Kachhap,
	Amit Kucheria, Javi Merino, Viresh Kumar, Zhang Rui
  Cc: linux-pm

Thermal core cannot be modular, remove the unnecessary module.h include
and replace with export.h to handle EXPORT_SYMBOL family of macros.

Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
---
 drivers/thermal/thermal_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 286920e06277..bed4a7bea7bb 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -9,9 +9,9 @@
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
-#include <linux/module.h>
 #include <linux/device.h>
 #include <linux/err.h>
+#include <linux/export.h>
 #include <linux/slab.h>
 #include <linux/kdev_t.h>
 #include <linux/idr.h>
-- 
2.20.1


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

* [PATCH 03/14] thermal/drivers/thermal_helpers: Sort headers alphabetically
  2020-05-11 12:24 [PATCH 00/14] thermal core include cleanups Amit Kucheria
  2020-05-11 12:24 ` [PATCH 01/14] thermal/core: Get rid of MODULE_* tags Amit Kucheria
  2020-05-11 12:24 ` [PATCH 02/14] thermal/core: Replace module.h with export.h Amit Kucheria
@ 2020-05-11 12:24 ` Amit Kucheria
  2020-05-11 12:24 ` [PATCH 04/14] thermal/drivers/thermal_helpers: Include export.h Amit Kucheria
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Amit Kucheria @ 2020-05-11 12:24 UTC (permalink / raw)
  To: linux-kernel, linux-arm-msm, daniel.lezcano, Amit Daniel Kachhap,
	Amit Kucheria, Javi Merino, Viresh Kumar, Zhang Rui
  Cc: linux-pm

Sort headers to make it easier to read and find duplicate headers.

Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
---
 drivers/thermal/thermal_helpers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/thermal_helpers.c b/drivers/thermal/thermal_helpers.c
index 2ba756af76b7..8ea0a05404f7 100644
--- a/drivers/thermal/thermal_helpers.c
+++ b/drivers/thermal/thermal_helpers.c
@@ -12,11 +12,11 @@
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
-#include <linux/sysfs.h>
 #include <linux/device.h>
 #include <linux/err.h>
 #include <linux/slab.h>
 #include <linux/string.h>
+#include <linux/sysfs.h>
 
 #include <trace/events/thermal.h>
 
-- 
2.20.1


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

* [PATCH 04/14] thermal/drivers/thermal_helpers: Include export.h
  2020-05-11 12:24 [PATCH 00/14] thermal core include cleanups Amit Kucheria
                   ` (2 preceding siblings ...)
  2020-05-11 12:24 ` [PATCH 03/14] thermal/drivers/thermal_helpers: Sort headers alphabetically Amit Kucheria
@ 2020-05-11 12:24 ` Amit Kucheria
  2020-05-11 12:24 ` [PATCH 05/14] thermal/drivers/thermal_hwmon: Sort headers alphabetically Amit Kucheria
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Amit Kucheria @ 2020-05-11 12:24 UTC (permalink / raw)
  To: linux-kernel, linux-arm-msm, daniel.lezcano, Amit Daniel Kachhap,
	Amit Kucheria, Javi Merino, Viresh Kumar, Zhang Rui
  Cc: linux-pm

It is preferable to include export.h when you are using EXPORT_SYMBOL
family of macros.

Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
---
 drivers/thermal/thermal_helpers.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/thermal/thermal_helpers.c b/drivers/thermal/thermal_helpers.c
index 8ea0a05404f7..e47da80daf3a 100644
--- a/drivers/thermal/thermal_helpers.c
+++ b/drivers/thermal/thermal_helpers.c
@@ -14,6 +14,7 @@
 
 #include <linux/device.h>
 #include <linux/err.h>
+#include <linux/export.h>
 #include <linux/slab.h>
 #include <linux/string.h>
 #include <linux/sysfs.h>
-- 
2.20.1


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

* [PATCH 05/14] thermal/drivers/thermal_hwmon: Sort headers alphabetically
  2020-05-11 12:24 [PATCH 00/14] thermal core include cleanups Amit Kucheria
                   ` (3 preceding siblings ...)
  2020-05-11 12:24 ` [PATCH 04/14] thermal/drivers/thermal_helpers: Include export.h Amit Kucheria
@ 2020-05-11 12:24 ` Amit Kucheria
  2020-05-11 12:24 ` [PATCH 06/14] thermal/drivers/thermal_hwmon: Include export.h Amit Kucheria
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Amit Kucheria @ 2020-05-11 12:24 UTC (permalink / raw)
  To: linux-kernel, linux-arm-msm, daniel.lezcano, Amit Daniel Kachhap,
	Amit Kucheria, Javi Merino, Viresh Kumar, Zhang Rui
  Cc: linux-pm

Sort headers to make it easier to read and find duplicate headers.

Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
---
 drivers/thermal/thermal_hwmon.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/thermal/thermal_hwmon.c b/drivers/thermal/thermal_hwmon.c
index c8d2620f2e42..e43ae551592d 100644
--- a/drivers/thermal/thermal_hwmon.c
+++ b/drivers/thermal/thermal_hwmon.c
@@ -10,10 +10,11 @@
  *  Copyright (C) 2013 Texas Instruments
  *  Copyright (C) 2013 Eduardo Valentin <eduardo.valentin@ti.com>
  */
+#include <linux/err.h>
 #include <linux/hwmon.h>
-#include <linux/thermal.h>
 #include <linux/slab.h>
-#include <linux/err.h>
+#include <linux/thermal.h>
+
 #include "thermal_hwmon.h"
 
 /* hwmon sys I/F */
-- 
2.20.1


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

* [PATCH 06/14] thermal/drivers/thermal_hwmon: Include export.h
  2020-05-11 12:24 [PATCH 00/14] thermal core include cleanups Amit Kucheria
                   ` (4 preceding siblings ...)
  2020-05-11 12:24 ` [PATCH 05/14] thermal/drivers/thermal_hwmon: Sort headers alphabetically Amit Kucheria
@ 2020-05-11 12:24 ` Amit Kucheria
  2020-05-11 12:24 ` [PATCH 07/14] thermal/drivers/clock_cooling: Sort headers alphabetically Amit Kucheria
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Amit Kucheria @ 2020-05-11 12:24 UTC (permalink / raw)
  To: linux-kernel, linux-arm-msm, daniel.lezcano, Amit Daniel Kachhap,
	Amit Kucheria, Javi Merino, Viresh Kumar, Zhang Rui
  Cc: linux-pm

It is preferable to include export.h when you are using EXPORT_SYMBOL
family of macros.

Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
---
 drivers/thermal/thermal_hwmon.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/thermal/thermal_hwmon.c b/drivers/thermal/thermal_hwmon.c
index e43ae551592d..8b92e00ff236 100644
--- a/drivers/thermal/thermal_hwmon.c
+++ b/drivers/thermal/thermal_hwmon.c
@@ -11,6 +11,7 @@
  *  Copyright (C) 2013 Eduardo Valentin <eduardo.valentin@ti.com>
  */
 #include <linux/err.h>
+#include <linux/export.h>
 #include <linux/hwmon.h>
 #include <linux/slab.h>
 #include <linux/thermal.h>
-- 
2.20.1


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

* [PATCH 07/14] thermal/drivers/clock_cooling: Sort headers alphabetically
  2020-05-11 12:24 [PATCH 00/14] thermal core include cleanups Amit Kucheria
                   ` (5 preceding siblings ...)
  2020-05-11 12:24 ` [PATCH 06/14] thermal/drivers/thermal_hwmon: Include export.h Amit Kucheria
@ 2020-05-11 12:24 ` Amit Kucheria
  2020-05-11 12:24 ` [PATCH 08/14] thermal/drivers/clock_cooling: Include export.h Amit Kucheria
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Amit Kucheria @ 2020-05-11 12:24 UTC (permalink / raw)
  To: linux-kernel, linux-arm-msm, daniel.lezcano, Amit Daniel Kachhap,
	Amit Kucheria, Javi Merino, Viresh Kumar, Zhang Rui
  Cc: linux-pm

Sort headers to make it easier to read and find duplicate headers.

Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
---
 drivers/thermal/clock_cooling.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/clock_cooling.c b/drivers/thermal/clock_cooling.c
index 7cb3ae4b44ee..fd6bc6eefc88 100644
--- a/drivers/thermal/clock_cooling.c
+++ b/drivers/thermal/clock_cooling.c
@@ -12,6 +12,7 @@
  *  Copyright (C) 2012  Amit Daniel <amit.kachhap@linaro.org>
  */
 #include <linux/clk.h>
+#include <linux/clock_cooling.h>
 #include <linux/cpufreq.h>
 #include <linux/device.h>
 #include <linux/err.h>
@@ -20,7 +21,6 @@
 #include <linux/pm_opp.h>
 #include <linux/slab.h>
 #include <linux/thermal.h>
-#include <linux/clock_cooling.h>
 
 /**
  * struct clock_cooling_device - data for cooling device with clock
-- 
2.20.1


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

* [PATCH 08/14] thermal/drivers/clock_cooling: Include export.h
  2020-05-11 12:24 [PATCH 00/14] thermal core include cleanups Amit Kucheria
                   ` (6 preceding siblings ...)
  2020-05-11 12:24 ` [PATCH 07/14] thermal/drivers/clock_cooling: Sort headers alphabetically Amit Kucheria
@ 2020-05-11 12:24 ` Amit Kucheria
  2020-05-11 12:24 ` [PATCH 09/14] thermal/drivers/cpufreq_cooling: Sort headers alphabetically Amit Kucheria
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Amit Kucheria @ 2020-05-11 12:24 UTC (permalink / raw)
  To: linux-kernel, linux-arm-msm, daniel.lezcano, Amit Daniel Kachhap,
	Amit Kucheria, Javi Merino, Viresh Kumar, Zhang Rui
  Cc: linux-pm

It is preferrable to include export.h when you are using EXPORT_SYMBOL
family of macros.

Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
---
 drivers/thermal/clock_cooling.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/thermal/clock_cooling.c b/drivers/thermal/clock_cooling.c
index fd6bc6eefc88..56cb1f46a428 100644
--- a/drivers/thermal/clock_cooling.c
+++ b/drivers/thermal/clock_cooling.c
@@ -16,6 +16,7 @@
 #include <linux/cpufreq.h>
 #include <linux/device.h>
 #include <linux/err.h>
+#include <linux/export.h>
 #include <linux/idr.h>
 #include <linux/mutex.h>
 #include <linux/pm_opp.h>
-- 
2.20.1


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

* [PATCH 09/14] thermal/drivers/cpufreq_cooling: Sort headers alphabetically
  2020-05-11 12:24 [PATCH 00/14] thermal core include cleanups Amit Kucheria
                   ` (7 preceding siblings ...)
  2020-05-11 12:24 ` [PATCH 08/14] thermal/drivers/clock_cooling: Include export.h Amit Kucheria
@ 2020-05-11 12:24 ` Amit Kucheria
  2020-05-11 12:24 ` [PATCH 10/14] thermal/drivers/cpufreq_cooling: Replace module.h with export.h Amit Kucheria
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Amit Kucheria @ 2020-05-11 12:24 UTC (permalink / raw)
  To: linux-kernel, linux-arm-msm, daniel.lezcano, Amit Daniel Kachhap,
	Amit Kucheria, Javi Merino, Viresh Kumar, Zhang Rui
  Cc: linux-pm

Sort headers to make it easier to read and find duplicate headers.

Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
---
 drivers/thermal/cpufreq_cooling.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/thermal/cpufreq_cooling.c b/drivers/thermal/cpufreq_cooling.c
index e297e135c031..1b5a63b4763d 100644
--- a/drivers/thermal/cpufreq_cooling.c
+++ b/drivers/thermal/cpufreq_cooling.c
@@ -11,16 +11,16 @@
  *
  */
 #include <linux/module.h>
-#include <linux/thermal.h>
+#include <linux/cpu.h>
 #include <linux/cpufreq.h>
+#include <linux/cpu_cooling.h>
+#include <linux/energy_model.h>
 #include <linux/err.h>
 #include <linux/idr.h>
 #include <linux/pm_opp.h>
 #include <linux/pm_qos.h>
 #include <linux/slab.h>
-#include <linux/cpu.h>
-#include <linux/cpu_cooling.h>
-#include <linux/energy_model.h>
+#include <linux/thermal.h>
 
 #include <trace/events/thermal.h>
 
-- 
2.20.1


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

* [PATCH 10/14] thermal/drivers/cpufreq_cooling: Replace module.h with export.h
  2020-05-11 12:24 [PATCH 00/14] thermal core include cleanups Amit Kucheria
                   ` (8 preceding siblings ...)
  2020-05-11 12:24 ` [PATCH 09/14] thermal/drivers/cpufreq_cooling: Sort headers alphabetically Amit Kucheria
@ 2020-05-11 12:24 ` Amit Kucheria
  2020-05-11 12:24 ` [PATCH 11/14] thermal/drivers/of-thermal: Sort headers alphabetically Amit Kucheria
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Amit Kucheria @ 2020-05-11 12:24 UTC (permalink / raw)
  To: linux-kernel, linux-arm-msm, daniel.lezcano, Amit Daniel Kachhap,
	Amit Kucheria, Javi Merino, Viresh Kumar, Zhang Rui
  Cc: linux-pm

cpufreq_cooling cannot be modular, remove the unnecessary module.h
include and replace with export.h to handle EXPORT_SYMBOL family of
macros.

Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
---
 drivers/thermal/cpufreq_cooling.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/cpufreq_cooling.c b/drivers/thermal/cpufreq_cooling.c
index 1b5a63b4763d..9e124020519f 100644
--- a/drivers/thermal/cpufreq_cooling.c
+++ b/drivers/thermal/cpufreq_cooling.c
@@ -10,12 +10,12 @@
  *		Viresh Kumar <viresh.kumar@linaro.org>
  *
  */
-#include <linux/module.h>
 #include <linux/cpu.h>
 #include <linux/cpufreq.h>
 #include <linux/cpu_cooling.h>
 #include <linux/energy_model.h>
 #include <linux/err.h>
+#include <linux/export.h>
 #include <linux/idr.h>
 #include <linux/pm_opp.h>
 #include <linux/pm_qos.h>
-- 
2.20.1


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

* [PATCH 11/14] thermal/drivers/of-thermal: Sort headers alphabetically
  2020-05-11 12:24 [PATCH 00/14] thermal core include cleanups Amit Kucheria
                   ` (9 preceding siblings ...)
  2020-05-11 12:24 ` [PATCH 10/14] thermal/drivers/cpufreq_cooling: Replace module.h with export.h Amit Kucheria
@ 2020-05-11 12:24 ` Amit Kucheria
  2020-05-11 12:25 ` [PATCH 12/14] thermal/drivers/user_space: " Amit Kucheria
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Amit Kucheria @ 2020-05-11 12:24 UTC (permalink / raw)
  To: linux-kernel, linux-arm-msm, daniel.lezcano, Amit Daniel Kachhap,
	Amit Kucheria, Javi Merino, Viresh Kumar, Zhang Rui
  Cc: linux-pm

Sort headers to make it easier to read and find duplicate headers.

Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
---
 drivers/thermal/of-thermal.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c
index 874a47d6923f..ddf88dbe7ba2 100644
--- a/drivers/thermal/of-thermal.c
+++ b/drivers/thermal/of-thermal.c
@@ -8,13 +8,13 @@
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
-#include <linux/thermal.h>
-#include <linux/slab.h>
-#include <linux/types.h>
-#include <linux/of_device.h>
-#include <linux/of_platform.h>
 #include <linux/err.h>
 #include <linux/export.h>
+#include <linux/of_device.h>
+#include <linux/of_platform.h>
+#include <linux/slab.h>
+#include <linux/thermal.h>
+#include <linux/types.h>
 #include <linux/string.h>
 
 #include "thermal_core.h"
-- 
2.20.1


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

* [PATCH 12/14] thermal/drivers/user_space: Sort headers alphabetically
  2020-05-11 12:24 [PATCH 00/14] thermal core include cleanups Amit Kucheria
                   ` (10 preceding siblings ...)
  2020-05-11 12:24 ` [PATCH 11/14] thermal/drivers/of-thermal: Sort headers alphabetically Amit Kucheria
@ 2020-05-11 12:25 ` Amit Kucheria
  2020-05-11 12:25 ` [PATCH 13/14] thermal/governors: Prefix all source files with gov_ Amit Kucheria
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Amit Kucheria @ 2020-05-11 12:25 UTC (permalink / raw)
  To: linux-kernel, linux-arm-msm, daniel.lezcano, Amit Daniel Kachhap,
	Amit Kucheria, Javi Merino, Viresh Kumar, Zhang Rui
  Cc: linux-pm

Sort headers to make it easier to read and find duplicate headers.

Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
---
 drivers/thermal/user_space.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/user_space.c b/drivers/thermal/user_space.c
index 293cffd9c8ad..82a7198bbe71 100644
--- a/drivers/thermal/user_space.c
+++ b/drivers/thermal/user_space.c
@@ -10,8 +10,8 @@
  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  */
 
-#include <linux/thermal.h>
 #include <linux/slab.h>
+#include <linux/thermal.h>
 
 #include "thermal_core.h"
 
-- 
2.20.1


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

* [PATCH 13/14] thermal/governors: Prefix all source files with gov_
  2020-05-11 12:24 [PATCH 00/14] thermal core include cleanups Amit Kucheria
                   ` (11 preceding siblings ...)
  2020-05-11 12:25 ` [PATCH 12/14] thermal/drivers/user_space: " Amit Kucheria
@ 2020-05-11 12:25 ` Amit Kucheria
  2020-05-11 12:25 ` [PATCH 14/14] thermal/of: Rename of-thermal.c Amit Kucheria
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Amit Kucheria @ 2020-05-11 12:25 UTC (permalink / raw)
  To: linux-kernel, linux-arm-msm, daniel.lezcano, Amit Daniel Kachhap,
	Amit Kucheria, Javi Merino, Viresh Kumar, Zhang Rui
  Cc: linux-pm

Bang-bang governor source file is prefixed with gov_. Do the same for
other governors for consistency so they're easy to find in the sources.

Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
---
 drivers/thermal/Makefile                                  | 8 ++++----
 drivers/thermal/{fair_share.c => gov_fair_share.c}        | 0
 .../thermal/{power_allocator.c => gov_power_allocator.c}  | 0
 drivers/thermal/{step_wise.c => gov_step_wise.c}          | 0
 drivers/thermal/{user_space.c => gov_user_space.c}        | 0
 5 files changed, 4 insertions(+), 4 deletions(-)
 rename drivers/thermal/{fair_share.c => gov_fair_share.c} (100%)
 rename drivers/thermal/{power_allocator.c => gov_power_allocator.c} (100%)
 rename drivers/thermal/{step_wise.c => gov_step_wise.c} (100%)
 rename drivers/thermal/{user_space.c => gov_user_space.c} (100%)

diff --git a/drivers/thermal/Makefile b/drivers/thermal/Makefile
index 8c8ed7b79915..09ff0e259d46 100644
--- a/drivers/thermal/Makefile
+++ b/drivers/thermal/Makefile
@@ -12,11 +12,11 @@ thermal_sys-$(CONFIG_THERMAL_HWMON)		+= thermal_hwmon.o
 thermal_sys-$(CONFIG_THERMAL_OF)		+= of-thermal.o
 
 # governors
-thermal_sys-$(CONFIG_THERMAL_GOV_FAIR_SHARE)	+= fair_share.o
+thermal_sys-$(CONFIG_THERMAL_GOV_FAIR_SHARE)	+= gov_fair_share.o
 thermal_sys-$(CONFIG_THERMAL_GOV_BANG_BANG)	+= gov_bang_bang.o
-thermal_sys-$(CONFIG_THERMAL_GOV_STEP_WISE)	+= step_wise.o
-thermal_sys-$(CONFIG_THERMAL_GOV_USER_SPACE)	+= user_space.o
-thermal_sys-$(CONFIG_THERMAL_GOV_POWER_ALLOCATOR)	+= power_allocator.o
+thermal_sys-$(CONFIG_THERMAL_GOV_STEP_WISE)	+= gov_step_wise.o
+thermal_sys-$(CONFIG_THERMAL_GOV_USER_SPACE)	+= gov_user_space.o
+thermal_sys-$(CONFIG_THERMAL_GOV_POWER_ALLOCATOR)	+= gov_power_allocator.o
 
 # cpufreq cooling
 thermal_sys-$(CONFIG_CPU_FREQ_THERMAL)	+= cpufreq_cooling.o
diff --git a/drivers/thermal/fair_share.c b/drivers/thermal/gov_fair_share.c
similarity index 100%
rename from drivers/thermal/fair_share.c
rename to drivers/thermal/gov_fair_share.c
diff --git a/drivers/thermal/power_allocator.c b/drivers/thermal/gov_power_allocator.c
similarity index 100%
rename from drivers/thermal/power_allocator.c
rename to drivers/thermal/gov_power_allocator.c
diff --git a/drivers/thermal/step_wise.c b/drivers/thermal/gov_step_wise.c
similarity index 100%
rename from drivers/thermal/step_wise.c
rename to drivers/thermal/gov_step_wise.c
diff --git a/drivers/thermal/user_space.c b/drivers/thermal/gov_user_space.c
similarity index 100%
rename from drivers/thermal/user_space.c
rename to drivers/thermal/gov_user_space.c
-- 
2.20.1


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

* [PATCH 14/14] thermal/of: Rename of-thermal.c
  2020-05-11 12:24 [PATCH 00/14] thermal core include cleanups Amit Kucheria
                   ` (12 preceding siblings ...)
  2020-05-11 12:25 ` [PATCH 13/14] thermal/governors: Prefix all source files with gov_ Amit Kucheria
@ 2020-05-11 12:25 ` Amit Kucheria
  2020-05-12  4:21 ` [PATCH 00/14] thermal core include cleanups Viresh Kumar
  2020-05-22 16:49 ` Daniel Lezcano
  15 siblings, 0 replies; 17+ messages in thread
From: Amit Kucheria @ 2020-05-11 12:25 UTC (permalink / raw)
  To: linux-kernel, linux-arm-msm, daniel.lezcano, Amit Daniel Kachhap,
	Amit Kucheria, Javi Merino, Viresh Kumar, Zhang Rui
  Cc: linux-pm

Core thermal framework code files should start with thermal_*.
of-thermal.c does not follow this pattern and can easily be confused
with platform driver.

Fix this by renaming it to thermal_of.c

Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
---
 drivers/thermal/Makefile                       | 2 +-
 drivers/thermal/{of-thermal.c => thermal_of.c} | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename drivers/thermal/{of-thermal.c => thermal_of.c} (100%)

diff --git a/drivers/thermal/Makefile b/drivers/thermal/Makefile
index 09ff0e259d46..d7969dd553cb 100644
--- a/drivers/thermal/Makefile
+++ b/drivers/thermal/Makefile
@@ -9,7 +9,7 @@ thermal_sys-y			+= thermal_core.o thermal_sysfs.o \
 
 # interface to/from other layers providing sensors
 thermal_sys-$(CONFIG_THERMAL_HWMON)		+= thermal_hwmon.o
-thermal_sys-$(CONFIG_THERMAL_OF)		+= of-thermal.o
+thermal_sys-$(CONFIG_THERMAL_OF)		+= thermal_of.o
 
 # governors
 thermal_sys-$(CONFIG_THERMAL_GOV_FAIR_SHARE)	+= gov_fair_share.o
diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/thermal_of.c
similarity index 100%
rename from drivers/thermal/of-thermal.c
rename to drivers/thermal/thermal_of.c
-- 
2.20.1


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

* Re: [PATCH 00/14] thermal core include cleanups
  2020-05-11 12:24 [PATCH 00/14] thermal core include cleanups Amit Kucheria
                   ` (13 preceding siblings ...)
  2020-05-11 12:25 ` [PATCH 14/14] thermal/of: Rename of-thermal.c Amit Kucheria
@ 2020-05-12  4:21 ` Viresh Kumar
  2020-05-22 16:49 ` Daniel Lezcano
  15 siblings, 0 replies; 17+ messages in thread
From: Viresh Kumar @ 2020-05-12  4:21 UTC (permalink / raw)
  To: Amit Kucheria
  Cc: linux-kernel, linux-arm-msm, daniel.lezcano, Amit Daniel Kachhap,
	Amit Kucheria, Javi Merino, Zhang Rui, linux-pm

On 11-05-20, 17:54, Amit Kucheria wrote:
> I noticed some remnants from when thermal core could be modular. While
> cleaning that up, I fixed up the includes to be sorted alphabetically and
> included export.h in files that were using EXPORT_SYMBOL* or THIS_MODULE
> while at the same time removing inclusion of module.h from core files.
> 
> Finally, the names of the source files for the governors and core have some
> inconsistencies and the last couple of patches rename them.
> 
> Build and boot tested on some ARM boards.

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

-- 
viresh

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

* Re: [PATCH 00/14] thermal core include cleanups
  2020-05-11 12:24 [PATCH 00/14] thermal core include cleanups Amit Kucheria
                   ` (14 preceding siblings ...)
  2020-05-12  4:21 ` [PATCH 00/14] thermal core include cleanups Viresh Kumar
@ 2020-05-22 16:49 ` Daniel Lezcano
  15 siblings, 0 replies; 17+ messages in thread
From: Daniel Lezcano @ 2020-05-22 16:49 UTC (permalink / raw)
  To: Amit Kucheria, linux-kernel, linux-arm-msm, Amit Daniel Kachhap,
	Amit Kucheria, Javi Merino, Viresh Kumar, Zhang Rui
  Cc: linux-pm

On 11/05/2020 14:24, Amit Kucheria wrote:
> I noticed some remnants from when thermal core could be modular. While
> cleaning that up, I fixed up the includes to be sorted alphabetically and
> included export.h in files that were using EXPORT_SYMBOL* or THIS_MODULE
> while at the same time removing inclusion of module.h from core files.
> 
> Finally, the names of the source files for the governors and core have some
> inconsistencies and the last couple of patches rename them.
> 
> Build and boot tested on some ARM boards.

Series applied, thanks !

-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

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

end of thread, other threads:[~2020-05-22 16:49 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-11 12:24 [PATCH 00/14] thermal core include cleanups Amit Kucheria
2020-05-11 12:24 ` [PATCH 01/14] thermal/core: Get rid of MODULE_* tags Amit Kucheria
2020-05-11 12:24 ` [PATCH 02/14] thermal/core: Replace module.h with export.h Amit Kucheria
2020-05-11 12:24 ` [PATCH 03/14] thermal/drivers/thermal_helpers: Sort headers alphabetically Amit Kucheria
2020-05-11 12:24 ` [PATCH 04/14] thermal/drivers/thermal_helpers: Include export.h Amit Kucheria
2020-05-11 12:24 ` [PATCH 05/14] thermal/drivers/thermal_hwmon: Sort headers alphabetically Amit Kucheria
2020-05-11 12:24 ` [PATCH 06/14] thermal/drivers/thermal_hwmon: Include export.h Amit Kucheria
2020-05-11 12:24 ` [PATCH 07/14] thermal/drivers/clock_cooling: Sort headers alphabetically Amit Kucheria
2020-05-11 12:24 ` [PATCH 08/14] thermal/drivers/clock_cooling: Include export.h Amit Kucheria
2020-05-11 12:24 ` [PATCH 09/14] thermal/drivers/cpufreq_cooling: Sort headers alphabetically Amit Kucheria
2020-05-11 12:24 ` [PATCH 10/14] thermal/drivers/cpufreq_cooling: Replace module.h with export.h Amit Kucheria
2020-05-11 12:24 ` [PATCH 11/14] thermal/drivers/of-thermal: Sort headers alphabetically Amit Kucheria
2020-05-11 12:25 ` [PATCH 12/14] thermal/drivers/user_space: " Amit Kucheria
2020-05-11 12:25 ` [PATCH 13/14] thermal/governors: Prefix all source files with gov_ Amit Kucheria
2020-05-11 12:25 ` [PATCH 14/14] thermal/of: Rename of-thermal.c Amit Kucheria
2020-05-12  4:21 ` [PATCH 00/14] thermal core include cleanups Viresh Kumar
2020-05-22 16:49 ` Daniel Lezcano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).