linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/30] thermal: cpu_cooling: remove unused headers
       [not found] <1366218743-20841-1-git-send-email-eduardo.valentin@ti.com>
@ 2013-04-17 17:11 ` Eduardo Valentin
  2013-04-22  2:16   ` amit daniel kachhap
                     ` (2 more replies)
  2013-04-17 17:11 ` [PATCH 02/30] thermal: cpu_cooling: remove trailing white spaces Eduardo Valentin
                   ` (29 subsequent siblings)
  30 siblings, 3 replies; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-17 17:11 UTC (permalink / raw)
  To: amit.kachhap; +Cc: Eduardo Valentin, Zhang Rui, linux-pm, linux-kernel

As this code is not a module nor a platform device driver,
this patch removes some unused header files.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/cpu_cooling.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index 5f5c780..778c43d 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -20,10 +20,7 @@
  *
  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  */
-#include <linux/kernel.h>
-#include <linux/module.h>
 #include <linux/thermal.h>
-#include <linux/platform_device.h>
 #include <linux/cpufreq.h>
 #include <linux/err.h>
 #include <linux/slab.h>
-- 
1.8.2.1.342.gfa7285d


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

* [PATCH 02/30] thermal: cpu_cooling: remove trailing white spaces
       [not found] <1366218743-20841-1-git-send-email-eduardo.valentin@ti.com>
  2013-04-17 17:11 ` [PATCH 01/30] thermal: cpu_cooling: remove unused headers Eduardo Valentin
@ 2013-04-17 17:11 ` Eduardo Valentin
  2013-04-24 14:48   ` Zhang, Rui
  2013-04-17 17:11 ` [PATCH 03/30] thermal: cpu_cooling: fix kernel_doc for cpufreq_cooling_device Eduardo Valentin
                   ` (28 subsequent siblings)
  30 siblings, 1 reply; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-17 17:11 UTC (permalink / raw)
  To: amit.kachhap; +Cc: Eduardo Valentin, Zhang Rui, linux-pm, linux-kernel

Remove unnecessary white spaces.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/cpu_cooling.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index 778c43d..d0d6a0c 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -131,14 +131,13 @@ static int get_property(unsigned int cpu, unsigned long input,
 	int descend = -1;
 	struct cpufreq_frequency_table *table =
 					cpufreq_frequency_get_table(cpu);
-	
+
 	if (!output)
 		return -EINVAL;
 
 	if (!table)
 		return -EINVAL;
 
-	
 	for (i = 0; table[i].frequency != CPUFREQ_TABLE_END; i++) {
 		/* ignore invalid entries */
 		if (table[i].frequency == CPUFREQ_ENTRY_INVALID)
-- 
1.8.2.1.342.gfa7285d


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

* [PATCH 03/30] thermal: cpu_cooling: fix kernel_doc for cpufreq_cooling_device
       [not found] <1366218743-20841-1-git-send-email-eduardo.valentin@ti.com>
  2013-04-17 17:11 ` [PATCH 01/30] thermal: cpu_cooling: remove unused headers Eduardo Valentin
  2013-04-17 17:11 ` [PATCH 02/30] thermal: cpu_cooling: remove trailing white spaces Eduardo Valentin
@ 2013-04-17 17:11 ` Eduardo Valentin
  2013-04-22  2:18   ` amit kachhap
  2013-04-24 14:49   ` Zhang, Rui
  2013-04-17 17:11 ` [PATCH 04/30] thermal: cpu_cooling: use EXPORT_SYMBOL_GPL Eduardo Valentin
                   ` (27 subsequent siblings)
  30 siblings, 2 replies; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-17 17:11 UTC (permalink / raw)
  To: amit.kachhap; +Cc: Eduardo Valentin, Zhang Rui, linux-pm, linux-kernel

Simple fixes for making kernel_doc happy about
struct cpufreq_cooling_device. Includes also a minor
spelling fix.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/cpu_cooling.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index d0d6a0c..7c0c05b 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -28,11 +28,11 @@
 #include <linux/cpu_cooling.h>
 
 /**
- * struct cpufreq_cooling_device
+ * struct cpufreq_cooling_device - data for cooling device with cpufreq
  * @id: unique integer value corresponding to each cpufreq_cooling_device
  *	registered.
- * @cool_dev: thermal_cooling_device pointer to keep track of the the
- *	egistered cooling device.
+ * @cool_dev: thermal_cooling_device pointer to keep track of the
+ *	registered cooling device.
  * @cpufreq_state: integer value representing the current state of cpufreq
  *	cooling	devices.
  * @cpufreq_val: integer value representing the absolute value of the clipped
-- 
1.8.2.1.342.gfa7285d


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

* [PATCH 04/30] thermal: cpu_cooling: use EXPORT_SYMBOL_GPL
       [not found] <1366218743-20841-1-git-send-email-eduardo.valentin@ti.com>
                   ` (2 preceding siblings ...)
  2013-04-17 17:11 ` [PATCH 03/30] thermal: cpu_cooling: fix kernel_doc for cpufreq_cooling_device Eduardo Valentin
@ 2013-04-17 17:11 ` Eduardo Valentin
  2013-04-24 14:50   ` Zhang, Rui
  2013-04-17 17:11 ` [PATCH 05/30] thermal: cpu_cooling: remove compiler warning Eduardo Valentin
                   ` (26 subsequent siblings)
  30 siblings, 1 reply; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-17 17:11 UTC (permalink / raw)
  To: amit.kachhap; +Cc: Eduardo Valentin, Zhang Rui, linux-pm, linux-kernel

Restrict the usage to GPL modules.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/cpu_cooling.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index 7c0c05b..64dc4dd 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -200,8 +200,7 @@ unsigned long cpufreq_cooling_get_level(unsigned int cpu, unsigned int freq)
 		return THERMAL_CSTATE_INVALID;
 	return (unsigned long)val;
 }
-
-EXPORT_SYMBOL(cpufreq_cooling_get_level);
+EXPORT_SYMBOL_GPL(cpufreq_cooling_get_level);
 
 /**
  * get_cpu_frequency - get the absolute value of frequency from level.
@@ -414,7 +413,7 @@ struct thermal_cooling_device *cpufreq_cooling_register(
 	mutex_unlock(&cooling_cpufreq_lock);
 	return cool_dev;
 }
-EXPORT_SYMBOL(cpufreq_cooling_register);
+EXPORT_SYMBOL_GPL(cpufreq_cooling_register);
 
 /**
  * cpufreq_cooling_unregister - function to remove cpufreq cooling device.
@@ -438,4 +437,4 @@ void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev)
 	release_idr(&cpufreq_idr, cpufreq_dev->id);
 	kfree(cpufreq_dev);
 }
-EXPORT_SYMBOL(cpufreq_cooling_unregister);
+EXPORT_SYMBOL_GPL(cpufreq_cooling_unregister);
-- 
1.8.2.1.342.gfa7285d


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

* [PATCH 05/30] thermal: cpu_cooling: remove compiler warning
       [not found] <1366218743-20841-1-git-send-email-eduardo.valentin@ti.com>
                   ` (3 preceding siblings ...)
  2013-04-17 17:11 ` [PATCH 04/30] thermal: cpu_cooling: use EXPORT_SYMBOL_GPL Eduardo Valentin
@ 2013-04-17 17:11 ` Eduardo Valentin
  2013-04-17 17:11 ` [PATCH 06/30] thermal: cpu_cooling: standardize end of function Eduardo Valentin
                   ` (25 subsequent siblings)
  30 siblings, 0 replies; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-17 17:11 UTC (permalink / raw)
  To: amit.kachhap; +Cc: Eduardo Valentin, Zhang Rui, linux-pm, linux-kernel

level will be used only if GET_FREQ mode is requested.
There is no potential harm with current code. But for
cleaning the compilation log, this patch initializes
level to zero.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/cpu_cooling.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index 64dc4dd..bdc4233 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -126,7 +126,7 @@ static int get_property(unsigned int cpu, unsigned long input,
 	unsigned int* output, enum cpufreq_cooling_property property)
 {
 	int i, j;
-	unsigned long max_level = 0, level;
+	unsigned long max_level = 0, level = 0;
 	unsigned int freq = CPUFREQ_ENTRY_INVALID;
 	int descend = -1;
 	struct cpufreq_frequency_table *table =
-- 
1.8.2.1.342.gfa7285d


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

* [PATCH 06/30] thermal: cpu_cooling: standardize end of function
       [not found] <1366218743-20841-1-git-send-email-eduardo.valentin@ti.com>
                   ` (4 preceding siblings ...)
  2013-04-17 17:11 ` [PATCH 05/30] thermal: cpu_cooling: remove compiler warning Eduardo Valentin
@ 2013-04-17 17:11 ` Eduardo Valentin
  2013-04-17 17:12 ` [PATCH 07/30] thermal: cpu_cooling: fix kernel doc for is_cpufreq_valid Eduardo Valentin
                   ` (24 subsequent siblings)
  30 siblings, 0 replies; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-17 17:11 UTC (permalink / raw)
  To: amit.kachhap; +Cc: Eduardo Valentin, Zhang Rui, linux-pm, linux-kernel

Just for code readiness, this patch makes all functions
on this file to have a blank line before their returns.
Now, some functions follow this pattern, and others will
not have a blank line. So, this patch makes it a single
pattern.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/cpu_cooling.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index bdc4233..68d5a2d 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -67,6 +67,11 @@ static struct cpufreq_cooling_device *notify_device;
  * get_idr - function to get a unique id.
  * @idr: struct idr * handle used to create a id.
  * @id: int * value generated by this function.
+ *
+ * This function will populate @id with an unique
+ * id, using the idr API.
+ *
+ * Return: 0 on success, an error code on failure.
  */
 static int get_idr(struct idr *idr, int *id)
 {
@@ -78,6 +83,7 @@ static int get_idr(struct idr *idr, int *id)
 	if (unlikely(ret < 0))
 		return ret;
 	*id = ret;
+
 	return 0;
 }
 
@@ -102,6 +108,7 @@ static void release_idr(struct idr *idr, int id)
 static int is_cpufreq_valid(int cpu)
 {
 	struct cpufreq_policy policy;
+
 	return !cpufreq_get_policy(&policy, cpu);
 }
 
@@ -189,6 +196,7 @@ static int get_property(unsigned int cpu, unsigned long input,
 		}
 		j++;
 	}
+
 	return -EINVAL;
 }
 
@@ -198,6 +206,7 @@ unsigned long cpufreq_cooling_get_level(unsigned int cpu, unsigned int freq)
 
 	if (get_property(cpu, (unsigned long)freq, &val, GET_LEVEL))
 		return THERMAL_CSTATE_INVALID;
+
 	return (unsigned long)val;
 }
 EXPORT_SYMBOL_GPL(cpufreq_cooling_get_level);
@@ -216,6 +225,7 @@ static unsigned int get_cpu_frequency(unsigned int cpu, unsigned long level)
 	ret = get_property(cpu, level, &freq, GET_FREQ);
 	if (ret)
 		return 0;
+
 	return freq;
 }
 
@@ -322,6 +332,7 @@ static int cpufreq_get_cur_state(struct thermal_cooling_device *cdev,
 	struct cpufreq_cooling_device *cpufreq_device = cdev->devdata;
 
 	*state = cpufreq_device->cpufreq_state;
+
 	return 0;
 }
 
@@ -411,6 +422,7 @@ struct thermal_cooling_device *cpufreq_cooling_register(
 	cpufreq_dev_count++;
 
 	mutex_unlock(&cooling_cpufreq_lock);
+
 	return cool_dev;
 }
 EXPORT_SYMBOL_GPL(cpufreq_cooling_register);
-- 
1.8.2.1.342.gfa7285d


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

* [PATCH 07/30] thermal: cpu_cooling: fix kernel doc for is_cpufreq_valid
       [not found] <1366218743-20841-1-git-send-email-eduardo.valentin@ti.com>
                   ` (5 preceding siblings ...)
  2013-04-17 17:11 ` [PATCH 06/30] thermal: cpu_cooling: standardize end of function Eduardo Valentin
@ 2013-04-17 17:12 ` Eduardo Valentin
  2013-04-17 17:12 ` [PATCH 08/30] thermal: cpu_cooling: add documentation for get_property Eduardo Valentin
                   ` (23 subsequent siblings)
  30 siblings, 0 replies; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-17 17:12 UTC (permalink / raw)
  To: amit.kachhap; +Cc: Eduardo Valentin, Zhang Rui, linux-pm, linux-kernel

Update documentation for is_cpufreq_valid function so
that kernel-doc does not complain about return value.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/cpu_cooling.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index 68d5a2d..bc1ec19 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -102,8 +102,14 @@ static void release_idr(struct idr *idr, int id)
 /* Below code defines functions to be used for cpufreq as cooling device */
 
 /**
- * is_cpufreq_valid - function to check if a cpu has frequency transition policy.
+ * is_cpufreq_valid - function to check frequency transitioning capability.
  * @cpu: cpu for which check is needed.
+ *
+ * This function will check the current state of the system if
+ * it is capable of changing the frequency for a given @cpu.
+ *
+ * Return: 0 if the system is not currently capable of changing
+ * the frequency of given cpu. !0 in case the frequency is changeable.
  */
 static int is_cpufreq_valid(int cpu)
 {
-- 
1.8.2.1.342.gfa7285d


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

* [PATCH 08/30] thermal: cpu_cooling: add documentation for get_property
       [not found] <1366218743-20841-1-git-send-email-eduardo.valentin@ti.com>
                   ` (6 preceding siblings ...)
  2013-04-17 17:12 ` [PATCH 07/30] thermal: cpu_cooling: fix kernel doc for is_cpufreq_valid Eduardo Valentin
@ 2013-04-17 17:12 ` Eduardo Valentin
  2013-04-17 17:12 ` [PATCH 09/30] thermal: cpu_cooling: standardize comment style Eduardo Valentin
                   ` (22 subsequent siblings)
  30 siblings, 0 replies; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-17 17:12 UTC (permalink / raw)
  To: amit.kachhap; +Cc: Eduardo Valentin, Zhang Rui, linux-pm, linux-kernel

As this is one of the central functions of this file,
it deserves a proper documentation. This patch improves
the existing comment to format it as a kernel-doc style.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/cpu_cooling.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index bc1ec19..0fa14b7 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -124,8 +124,14 @@ enum cpufreq_cooling_property {
 	GET_MAXL,
 };
 
-/*
- * this is the common function to
+/**
+ * get_property - fetch a property of interest for a give cpu.
+ * @cpu: cpu for which the property is required
+ * @input: query parameter
+ * @output: query return
+ * @property: type of query (frequency, level, max level)
+ *
+ * This is the common function to
  * 1. get maximum cpu cooling states
  * 2. translate frequency to cooling state
  * 3. translate cooling state to frequency
@@ -134,7 +140,9 @@ enum cpufreq_cooling_property {
  * a) reduce duplicate code as most of the code can be shared.
  * b) make sure the logic is consistent when translating between
  *    cooling states and frequencies.
-*/
+ *
+ * Return: 0 on success, -EINVAL when invalid parameters are passed.
+ */
 static int get_property(unsigned int cpu, unsigned long input,
 	unsigned int* output, enum cpufreq_cooling_property property)
 {
-- 
1.8.2.1.342.gfa7285d


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

* [PATCH 09/30] thermal: cpu_cooling: standardize comment style
       [not found] <1366218743-20841-1-git-send-email-eduardo.valentin@ti.com>
                   ` (7 preceding siblings ...)
  2013-04-17 17:12 ` [PATCH 08/30] thermal: cpu_cooling: add documentation for get_property Eduardo Valentin
@ 2013-04-17 17:12 ` Eduardo Valentin
  2013-04-17 17:12 ` [PATCH 10/30] thermal: cpu_cooling: align on open parenthesis Eduardo Valentin
                   ` (21 subsequent siblings)
  30 siblings, 0 replies; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-17 17:12 UTC (permalink / raw)
  To: amit.kachhap; +Cc: Eduardo Valentin, Zhang Rui, linux-pm, linux-kernel

There are at least three patterns for oneline comments in this
file. This patch changes them to one single pattern

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/cpu_cooling.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index 0fa14b7..224048c 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -297,7 +297,7 @@ static int cpufreq_thermal_notifier(struct notifier_block *nb,
 	if (cpumask_test_cpu(policy->cpu, &notify_device->allowed_cpus))
 		max_freq = notify_device->cpufreq_val;
 
-	/* Never exceed user_policy.max*/
+	/* Never exceed user_policy.max */
 	if (max_freq > policy->user_policy.max)
 		max_freq = policy->user_policy.max;
 
@@ -307,9 +307,7 @@ static int cpufreq_thermal_notifier(struct notifier_block *nb,
 	return 0;
 }
 
-/*
- * cpufreq cooling device callback functions are defined below
- */
+/* cpufreq cooling device callback functions are defined below */
 
 /**
  * cpufreq_get_max_state - callback function to get the max cooling state.
@@ -389,9 +387,9 @@ struct thermal_cooling_device *cpufreq_cooling_register(
 	int ret = 0, i;
 	struct cpufreq_policy policy;
 
-	/*Verify that all the clip cpus have same freq_min, freq_max limit*/
+	/* Verify that all the clip cpus have same freq_min, freq_max limit */
 	for_each_cpu(i, clip_cpus) {
-		/*continue if cpufreq policy not found and not return error*/
+		/* continue if cpufreq policy not found and not return error */
 		if (!cpufreq_get_policy(&policy, i))
 			continue;
 		if (min == 0 && max == 0) {
-- 
1.8.2.1.342.gfa7285d


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

* [PATCH 10/30] thermal: cpu_cooling: align on open parenthesis
       [not found] <1366218743-20841-1-git-send-email-eduardo.valentin@ti.com>
                   ` (8 preceding siblings ...)
  2013-04-17 17:12 ` [PATCH 09/30] thermal: cpu_cooling: standardize comment style Eduardo Valentin
@ 2013-04-17 17:12 ` Eduardo Valentin
  2013-04-17 17:12 ` [PATCH 11/30] thermal: cpu_cooling: remove trailing blank line Eduardo Valentin
                   ` (20 subsequent siblings)
  30 siblings, 0 replies; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-17 17:12 UTC (permalink / raw)
  To: amit.kachhap; +Cc: Eduardo Valentin, Zhang Rui, linux-pm, linux-kernel

Improve code readiness by remove checkpatch.pl warnings
on get_property function.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/cpu_cooling.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index 224048c..3d985ff 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -144,7 +144,8 @@ enum cpufreq_cooling_property {
  * Return: 0 on success, -EINVAL when invalid parameters are passed.
  */
 static int get_property(unsigned int cpu, unsigned long input,
-	unsigned int* output, enum cpufreq_cooling_property property)
+			unsigned int *output,
+			enum cpufreq_cooling_property property)
 {
 	int i, j;
 	unsigned long max_level = 0, level = 0;
-- 
1.8.2.1.342.gfa7285d


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

* [PATCH 11/30] thermal: cpu_cooling: remove trailing blank line
       [not found] <1366218743-20841-1-git-send-email-eduardo.valentin@ti.com>
                   ` (9 preceding siblings ...)
  2013-04-17 17:12 ` [PATCH 10/30] thermal: cpu_cooling: align on open parenthesis Eduardo Valentin
@ 2013-04-17 17:12 ` Eduardo Valentin
  2013-04-17 17:12 ` [PATCH 12/30] thermal: cpu_cooling: document cpufreq_get_cooling_level Eduardo Valentin
                   ` (19 subsequent siblings)
  30 siblings, 0 replies; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-17 17:12 UTC (permalink / raw)
  To: amit.kachhap; +Cc: Eduardo Valentin, Zhang Rui, linux-pm, linux-kernel

Remove unnecessary blank line.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/cpu_cooling.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index 3d985ff..8ba3188 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -186,7 +186,6 @@ static int get_property(unsigned int cpu, unsigned long input,
 	if (property == GET_FREQ)
 		level = descend ? input : (max_level - input -1);
 
-
 	for (i = 0, j = 0; table[i].frequency != CPUFREQ_TABLE_END; i++) {
 		/* ignore invalid entry */
 		if (table[i].frequency == CPUFREQ_ENTRY_INVALID)
-- 
1.8.2.1.342.gfa7285d


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

* [PATCH 12/30] thermal: cpu_cooling: document cpufreq_get_cooling_level
       [not found] <1366218743-20841-1-git-send-email-eduardo.valentin@ti.com>
                   ` (10 preceding siblings ...)
  2013-04-17 17:12 ` [PATCH 11/30] thermal: cpu_cooling: remove trailing blank line Eduardo Valentin
@ 2013-04-17 17:12 ` Eduardo Valentin
  2013-04-17 17:12 ` [PATCH 13/30] thermal: cpu_cooling: remove checkpatch.pl warning Eduardo Valentin
                   ` (18 subsequent siblings)
  30 siblings, 0 replies; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-17 17:12 UTC (permalink / raw)
  To: amit.kachhap; +Cc: Eduardo Valentin, Zhang Rui, linux-pm, linux-kernel

Add documentation for cpufreq_get_cooling_level. As this
is an exported function, it has to be documented.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/cpu_cooling.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index 8ba3188..d046cd5 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -214,6 +214,17 @@ static int get_property(unsigned int cpu, unsigned long input,
 	return -EINVAL;
 }
 
+/**
+ * cpufreq_cooling_get_level - for a give cpu, return the cooling level.
+ * @cpu: cpu for which the level is required
+ * @freq: the frequency of interest
+ *
+ * This function will match the cooling level corresponding to the
+ * requested @freq and return it.
+ *
+ * Return: The matched cooling level on success or THERMAL_CSTATE_INVALID
+ * otherwise.
+ */
 unsigned long cpufreq_cooling_get_level(unsigned int cpu, unsigned int freq)
 {
 	unsigned int val;
-- 
1.8.2.1.342.gfa7285d


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

* [PATCH 13/30] thermal: cpu_cooling: remove checkpatch.pl warning
       [not found] <1366218743-20841-1-git-send-email-eduardo.valentin@ti.com>
                   ` (11 preceding siblings ...)
  2013-04-17 17:12 ` [PATCH 12/30] thermal: cpu_cooling: document cpufreq_get_cooling_level Eduardo Valentin
@ 2013-04-17 17:12 ` Eduardo Valentin
  2013-04-17 17:12 ` [PATCH 14/30] thermal: cpu_cooling: improve documentation for get_cpu_frequency Eduardo Valentin
                   ` (17 subsequent siblings)
  30 siblings, 0 replies; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-17 17:12 UTC (permalink / raw)
  To: amit.kachhap; +Cc: Eduardo Valentin, Zhang Rui, linux-pm, linux-kernel

Simple code style fix.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/cpu_cooling.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index d046cd5..1ddfb15 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -184,7 +184,7 @@ static int get_property(unsigned int cpu, unsigned long input,
 	}
 
 	if (property == GET_FREQ)
-		level = descend ? input : (max_level - input -1);
+		level = descend ? input : (max_level - input - 1);
 
 	for (i = 0, j = 0; table[i].frequency != CPUFREQ_TABLE_END; i++) {
 		/* ignore invalid entry */
-- 
1.8.2.1.342.gfa7285d


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

* [PATCH 14/30] thermal: cpu_cooling: improve documentation for get_cpu_frequency
       [not found] <1366218743-20841-1-git-send-email-eduardo.valentin@ti.com>
                   ` (12 preceding siblings ...)
  2013-04-17 17:12 ` [PATCH 13/30] thermal: cpu_cooling: remove checkpatch.pl warning Eduardo Valentin
@ 2013-04-17 17:12 ` Eduardo Valentin
  2013-04-17 17:12 ` [PATCH 15/30] thermal: cpu_cooling: update documentation for cpufreq_apply_cooling Eduardo Valentin
                   ` (16 subsequent siblings)
  30 siblings, 0 replies; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-17 17:12 UTC (permalink / raw)
  To: amit.kachhap; +Cc: Eduardo Valentin, Zhang Rui, linux-pm, linux-kernel

Fix kernel-doc warning on get_cpu_frequency and improve
documentation comments.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/cpu_cooling.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index 1ddfb15..593da29 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -239,8 +239,14 @@ EXPORT_SYMBOL_GPL(cpufreq_cooling_get_level);
 /**
  * get_cpu_frequency - get the absolute value of frequency from level.
  * @cpu: cpu for which frequency is fetched.
- * @level: level of frequency, equals cooling state of cpu cooling device
+ * @level: cooling level
+ *
+ * This function matches cooling level with frequency. Based on a cooling level
+ * of frequency, equals cooling state of cpu cooling device, it will return
+ * the corresponding frequency.
  *	e.g level=0 --> 1st MAX FREQ, level=1 ---> 2nd MAX FREQ, .... etc
+ *
+ * Return: 0 on error, the corresponding frequency otherwise.
  */
 static unsigned int get_cpu_frequency(unsigned int cpu, unsigned long level)
 {
-- 
1.8.2.1.342.gfa7285d


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

* [PATCH 15/30] thermal: cpu_cooling: update documentation for cpufreq_apply_cooling
       [not found] <1366218743-20841-1-git-send-email-eduardo.valentin@ti.com>
                   ` (13 preceding siblings ...)
  2013-04-17 17:12 ` [PATCH 14/30] thermal: cpu_cooling: improve documentation for get_cpu_frequency Eduardo Valentin
@ 2013-04-17 17:12 ` Eduardo Valentin
  2013-04-17 17:12 ` [PATCH 16/30] thermal: cpu_cooling: update documentation for cpufreq_thermal_notifier Eduardo Valentin
                   ` (15 subsequent siblings)
  30 siblings, 0 replies; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-17 17:12 UTC (permalink / raw)
  To: amit.kachhap; +Cc: Eduardo Valentin, Zhang Rui, linux-pm, linux-kernel

Update kernel-doc comments for cpufreq_apply_cooling function.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/cpu_cooling.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index 593da29..934c0b0 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -265,6 +265,12 @@ static unsigned int get_cpu_frequency(unsigned int cpu, unsigned long level)
  * @cpufreq_device: cpufreq_cooling_device pointer containing frequency
  *	clipping data.
  * @cooling_state: value of the cooling state.
+ *
+ * Function used to make sure the cpufreq layer is aware of current thermal
+ * limits. The limits are applied by updating the cpufreq policy.
+ *
+ * Return: 0 on success, an error code otherwise (-EINVAL in case wrong
+ * cooling state).
  */
 static int cpufreq_apply_cooling(struct cpufreq_cooling_device *cpufreq_device,
 				unsigned long cooling_state)
-- 
1.8.2.1.342.gfa7285d


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

* [PATCH 16/30] thermal: cpu_cooling: update documentation for cpufreq_thermal_notifier
       [not found] <1366218743-20841-1-git-send-email-eduardo.valentin@ti.com>
                   ` (14 preceding siblings ...)
  2013-04-17 17:12 ` [PATCH 15/30] thermal: cpu_cooling: update documentation for cpufreq_apply_cooling Eduardo Valentin
@ 2013-04-17 17:12 ` Eduardo Valentin
  2013-04-17 17:12 ` [PATCH 17/30] thermal: cpu_cooling: update Kconfig entry Eduardo Valentin
                   ` (14 subsequent siblings)
  30 siblings, 0 replies; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-17 17:12 UTC (permalink / raw)
  To: amit.kachhap; +Cc: Eduardo Valentin, Zhang Rui, linux-pm, linux-kernel

Update kernel-doc comment and documentation for cpufreq_thermal_notifier.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/cpu_cooling.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index 934c0b0..b5de9d4 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -307,6 +307,12 @@ static int cpufreq_apply_cooling(struct cpufreq_cooling_device *cpufreq_device,
  * @nb:	struct notifier_block * with callback info.
  * @event: value showing cpufreq event for which this function invoked.
  * @data: callback-specific data
+ *
+ * Callback to highjack the notification on cpufreq policy transition.
+ * Every time there is a change in policy, we will intercept and
+ * update the cpufreq policy with thermal constraints.
+ *
+ * Return: 0 (success)
  */
 static int cpufreq_thermal_notifier(struct notifier_block *nb,
 					unsigned long event, void *data)
-- 
1.8.2.1.342.gfa7285d


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

* [PATCH 17/30] thermal: cpu_cooling: update Kconfig entry
       [not found] <1366218743-20841-1-git-send-email-eduardo.valentin@ti.com>
                   ` (15 preceding siblings ...)
  2013-04-17 17:12 ` [PATCH 16/30] thermal: cpu_cooling: update documentation for cpufreq_thermal_notifier Eduardo Valentin
@ 2013-04-17 17:12 ` Eduardo Valentin
  2013-04-17 17:12 ` [PATCH 18/30] thermal: cpu_cooling: alignment improvements Eduardo Valentin
                   ` (13 subsequent siblings)
  30 siblings, 0 replies; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-17 17:12 UTC (permalink / raw)
  To: amit.kachhap; +Cc: Eduardo Valentin, Zhang Rui, linux-pm, linux-kernel

There is no support for hotplug or any other means of reducing
temperature. So, this patch removes these references from Kconfig.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/Kconfig | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
index d1c2160..5e3c025 100644
--- a/drivers/thermal/Kconfig
+++ b/drivers/thermal/Kconfig
@@ -72,10 +72,11 @@ config CPU_THERMAL
 	select CPU_FREQ_TABLE
 	help
 	  This implements the generic cpu cooling mechanism through frequency
-	  reduction, cpu hotplug and any other ways of reducing temperature. An
-	  ACPI version of this already exists(drivers/acpi/processor_thermal.c).
+	  reduction. An ACPI version of this already exists
+	  (drivers/acpi/processor_thermal.c).
 	  This will be useful for platforms using the generic thermal interface
 	  and not the ACPI interface.
+
 	  If you want this support, you should say Y here.
 
 config THERMAL_EMULATION
-- 
1.8.2.1.342.gfa7285d


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

* [PATCH 18/30] thermal: cpu_cooling: alignment improvements
       [not found] <1366218743-20841-1-git-send-email-eduardo.valentin@ti.com>
                   ` (16 preceding siblings ...)
  2013-04-17 17:12 ` [PATCH 17/30] thermal: cpu_cooling: update Kconfig entry Eduardo Valentin
@ 2013-04-17 17:12 ` Eduardo Valentin
  2013-04-17 17:12 ` [PATCH 19/30] thermal: cpu_cooling: update documentation for cpufreq_get_max_state Eduardo Valentin
                   ` (12 subsequent siblings)
  30 siblings, 0 replies; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-17 17:12 UTC (permalink / raw)
  To: amit.kachhap; +Cc: Eduardo Valentin, Zhang Rui, linux-pm, linux-kernel

Improve code readiness by changing alignments so that
they match open parenthesis, like checkpatch.pl --strict
suggests.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/cpu_cooling.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index b5de9d4..35b5835 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -273,7 +273,7 @@ static unsigned int get_cpu_frequency(unsigned int cpu, unsigned long level)
  * cooling state).
  */
 static int cpufreq_apply_cooling(struct cpufreq_cooling_device *cpufreq_device,
-				unsigned long cooling_state)
+				 unsigned long cooling_state)
 {
 	unsigned int cpuid, clip_freq;
 	struct cpumask *mask = &cpufreq_device->allowed_cpus;
@@ -315,7 +315,7 @@ static int cpufreq_apply_cooling(struct cpufreq_cooling_device *cpufreq_device,
  * Return: 0 (success)
  */
 static int cpufreq_thermal_notifier(struct notifier_block *nb,
-					unsigned long event, void *data)
+				    unsigned long event, void *data)
 {
 	struct cpufreq_policy *policy = data;
 	unsigned long max_freq = 0;
@@ -406,8 +406,8 @@ static struct notifier_block thermal_cpufreq_notifier_block = {
  * cpufreq_cooling_register - function to create cpufreq cooling device.
  * @clip_cpus: cpumask of cpus where the frequency constraints will happen.
  */
-struct thermal_cooling_device *cpufreq_cooling_register(
-	const struct cpumask *clip_cpus)
+struct thermal_cooling_device *
+cpufreq_cooling_register(const struct cpumask *clip_cpus)
 {
 	struct thermal_cooling_device *cool_dev;
 	struct cpufreq_cooling_device *cpufreq_dev = NULL;
@@ -426,12 +426,12 @@ struct thermal_cooling_device *cpufreq_cooling_register(
 			max = policy.cpuinfo.max_freq;
 		} else {
 			if (min != policy.cpuinfo.min_freq ||
-				max != policy.cpuinfo.max_freq)
+			    max != policy.cpuinfo.max_freq)
 				return ERR_PTR(-EINVAL);
 		}
 	}
 	cpufreq_dev = kzalloc(sizeof(struct cpufreq_cooling_device),
-			GFP_KERNEL);
+			      GFP_KERNEL);
 	if (!cpufreq_dev)
 		return ERR_PTR(-ENOMEM);
 
@@ -446,7 +446,7 @@ struct thermal_cooling_device *cpufreq_cooling_register(
 	sprintf(dev_name, "thermal-cpufreq-%d", cpufreq_dev->id);
 
 	cool_dev = thermal_cooling_device_register(dev_name, cpufreq_dev,
-						&cpufreq_cooling_ops);
+						   &cpufreq_cooling_ops);
 	if (!cool_dev) {
 		release_idr(&cpufreq_idr, cpufreq_dev->id);
 		kfree(cpufreq_dev);
@@ -459,7 +459,7 @@ struct thermal_cooling_device *cpufreq_cooling_register(
 	/* Register the notifier for first cpufreq cooling device */
 	if (cpufreq_dev_count == 0)
 		cpufreq_register_notifier(&thermal_cpufreq_notifier_block,
-						CPUFREQ_POLICY_NOTIFIER);
+					  CPUFREQ_POLICY_NOTIFIER);
 	cpufreq_dev_count++;
 
 	mutex_unlock(&cooling_cpufreq_lock);
@@ -482,7 +482,7 @@ void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev)
 	/* Unregister the notifier for the last cpufreq cooling device */
 	if (cpufreq_dev_count == 0) {
 		cpufreq_unregister_notifier(&thermal_cpufreq_notifier_block,
-					CPUFREQ_POLICY_NOTIFIER);
+					    CPUFREQ_POLICY_NOTIFIER);
 	}
 	mutex_unlock(&cooling_cpufreq_lock);
 
-- 
1.8.2.1.342.gfa7285d


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

* [PATCH 19/30] thermal: cpu_cooling: update documentation for cpufreq_get_max_state
       [not found] <1366218743-20841-1-git-send-email-eduardo.valentin@ti.com>
                   ` (17 preceding siblings ...)
  2013-04-17 17:12 ` [PATCH 18/30] thermal: cpu_cooling: alignment improvements Eduardo Valentin
@ 2013-04-17 17:12 ` Eduardo Valentin
  2013-04-17 17:12 ` [PATCH 20/30] thermal: cpu_cooling: update documentation for cpufreq_get_cur_state Eduardo Valentin
                   ` (11 subsequent siblings)
  30 siblings, 0 replies; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-17 17:12 UTC (permalink / raw)
  To: amit.kachhap; +Cc: Eduardo Valentin, Zhang Rui, linux-pm, linux-kernel

Update documentation for cpufreq_get_max_state callback.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/cpu_cooling.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index 35b5835..490084b 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -342,6 +342,11 @@ static int cpufreq_thermal_notifier(struct notifier_block *nb,
  * cpufreq_get_max_state - callback function to get the max cooling state.
  * @cdev: thermal cooling device pointer.
  * @state: fill this variable with the max cooling state.
+ *
+ * Callback for the thermal cooling device to return the cpufreq
+ * max cooling state.
+ *
+ * Return: 0 on success, an error code otherwise.
  */
 static int cpufreq_get_max_state(struct thermal_cooling_device *cdev,
 				 unsigned long *state)
-- 
1.8.2.1.342.gfa7285d


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

* [PATCH 20/30] thermal: cpu_cooling: update documentation for cpufreq_get_cur_state
       [not found] <1366218743-20841-1-git-send-email-eduardo.valentin@ti.com>
                   ` (18 preceding siblings ...)
  2013-04-17 17:12 ` [PATCH 19/30] thermal: cpu_cooling: update documentation for cpufreq_get_max_state Eduardo Valentin
@ 2013-04-17 17:12 ` Eduardo Valentin
  2013-04-17 17:12 ` [PATCH 21/30] thermal: cpu_cooling: update documentation for cpufreq_set_cur_state Eduardo Valentin
                   ` (10 subsequent siblings)
  30 siblings, 0 replies; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-17 17:12 UTC (permalink / raw)
  To: amit.kachhap; +Cc: Eduardo Valentin, Zhang Rui, linux-pm, linux-kernel

Update documentation for cpufreq_get_cur_state callback.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/cpu_cooling.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index 490084b..9f7009b 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -371,6 +371,11 @@ static int cpufreq_get_max_state(struct thermal_cooling_device *cdev,
  * cpufreq_get_cur_state - callback function to get the current cooling state.
  * @cdev: thermal cooling device pointer.
  * @state: fill this variable with the current cooling state.
+ *
+ * Callback for the thermal cooling device to return the cpufreq
+ * current cooling state.
+ *
+ * Return: 0 on success, an error code otherwise.
  */
 static int cpufreq_get_cur_state(struct thermal_cooling_device *cdev,
 				 unsigned long *state)
-- 
1.8.2.1.342.gfa7285d


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

* [PATCH 21/30] thermal: cpu_cooling: update documentation for cpufreq_set_cur_state
       [not found] <1366218743-20841-1-git-send-email-eduardo.valentin@ti.com>
                   ` (19 preceding siblings ...)
  2013-04-17 17:12 ` [PATCH 20/30] thermal: cpu_cooling: update documentation for cpufreq_get_cur_state Eduardo Valentin
@ 2013-04-17 17:12 ` Eduardo Valentin
  2013-04-17 17:12 ` [PATCH 22/30] thermal: cpu_cooling: update kernel-doc for cpufreq_cooling_register Eduardo Valentin
                   ` (9 subsequent siblings)
  30 siblings, 0 replies; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-17 17:12 UTC (permalink / raw)
  To: amit.kachhap; +Cc: Eduardo Valentin, Zhang Rui, linux-pm, linux-kernel

Update documentation for cpufreq_set_cur_state callback.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/cpu_cooling.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index 9f7009b..708cff6 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -391,6 +391,11 @@ static int cpufreq_get_cur_state(struct thermal_cooling_device *cdev,
  * cpufreq_set_cur_state - callback function to set the current cooling state.
  * @cdev: thermal cooling device pointer.
  * @state: set this variable to the current cooling state.
+ *
+ * Callback for the thermal cooling device to change the cpufreq
+ * current cooling state.
+ *
+ * Return: 0 on success, an error code otherwise.
  */
 static int cpufreq_set_cur_state(struct thermal_cooling_device *cdev,
 				 unsigned long state)
-- 
1.8.2.1.342.gfa7285d


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

* [PATCH 22/30] thermal: cpu_cooling: update kernel-doc for cpufreq_cooling_register
       [not found] <1366218743-20841-1-git-send-email-eduardo.valentin@ti.com>
                   ` (20 preceding siblings ...)
  2013-04-17 17:12 ` [PATCH 21/30] thermal: cpu_cooling: update documentation for cpufreq_set_cur_state Eduardo Valentin
@ 2013-04-17 17:12 ` Eduardo Valentin
  2013-04-17 17:12 ` [PATCH 23/30] thermal: cpu_cooling: update kernel-doc comment for cpufreq_cooling_unregister Eduardo Valentin
                   ` (8 subsequent siblings)
  30 siblings, 0 replies; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-17 17:12 UTC (permalink / raw)
  To: amit.kachhap; +Cc: Eduardo Valentin, Zhang Rui, linux-pm, linux-kernel

Add proper documentation for exported function cpufreq_cooling_register.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/cpu_cooling.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index 708cff6..560692b 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -420,6 +420,13 @@ static struct notifier_block thermal_cpufreq_notifier_block = {
 /**
  * cpufreq_cooling_register - function to create cpufreq cooling device.
  * @clip_cpus: cpumask of cpus where the frequency constraints will happen.
+ *
+ * This interface function registers the cpufreq cooling device with the name
+ * "thermal-cpufreq-%x". This api can support multiple instances of cpufreq
+ * cooling devices.
+ *
+ * Return: a valid struct thermal_cooling_device pointer on success,
+ * on failure, it returns a corresponding ERR_PTR().
  */
 struct thermal_cooling_device *
 cpufreq_cooling_register(const struct cpumask *clip_cpus)
-- 
1.8.2.1.342.gfa7285d


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

* [PATCH 23/30] thermal: cpu_cooling: update kernel-doc comment for cpufreq_cooling_unregister
       [not found] <1366218743-20841-1-git-send-email-eduardo.valentin@ti.com>
                   ` (21 preceding siblings ...)
  2013-04-17 17:12 ` [PATCH 22/30] thermal: cpu_cooling: update kernel-doc for cpufreq_cooling_register Eduardo Valentin
@ 2013-04-17 17:12 ` Eduardo Valentin
  2013-04-17 17:12 ` [PATCH 24/30] thermal: cpu_cooling: use snprintf instead of sprintf Eduardo Valentin
                   ` (7 subsequent siblings)
  30 siblings, 0 replies; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-17 17:12 UTC (permalink / raw)
  To: amit.kachhap; +Cc: Eduardo Valentin, Zhang Rui, linux-pm, linux-kernel

Update comments for this exported function.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/cpu_cooling.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index 560692b..b55cfc2 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -493,6 +493,8 @@ EXPORT_SYMBOL_GPL(cpufreq_cooling_register);
 /**
  * cpufreq_cooling_unregister - function to remove cpufreq cooling device.
  * @cdev: thermal cooling device pointer.
+ *
+ * This interface function unregisters the "thermal-cpufreq-%x" cooling device.
  */
 void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev)
 {
-- 
1.8.2.1.342.gfa7285d


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

* [PATCH 24/30] thermal: cpu_cooling: use snprintf instead of sprintf
       [not found] <1366218743-20841-1-git-send-email-eduardo.valentin@ti.com>
                   ` (22 preceding siblings ...)
  2013-04-17 17:12 ` [PATCH 23/30] thermal: cpu_cooling: update kernel-doc comment for cpufreq_cooling_unregister Eduardo Valentin
@ 2013-04-17 17:12 ` Eduardo Valentin
  2013-04-17 17:12 ` [PATCH 25/30] thermal: cpu_cooling: remove not needed curl brackets Eduardo Valentin
                   ` (6 subsequent siblings)
  30 siblings, 0 replies; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-17 17:12 UTC (permalink / raw)
  To: amit.kachhap; +Cc: Eduardo Valentin, Zhang Rui, linux-pm, linux-kernel

Limit the amount of bytes written to dev_name by
secure writing with snprintf.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/cpu_cooling.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index b55cfc2..b1f9a4d 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -465,7 +465,8 @@ cpufreq_cooling_register(const struct cpumask *clip_cpus)
 		return ERR_PTR(-EINVAL);
 	}
 
-	sprintf(dev_name, "thermal-cpufreq-%d", cpufreq_dev->id);
+	snprintf(dev_name, sizeof(dev_name), "thermal-cpufreq-%d",
+		 cpufreq_dev->id);
 
 	cool_dev = thermal_cooling_device_register(dev_name, cpufreq_dev,
 						   &cpufreq_cooling_ops);
-- 
1.8.2.1.342.gfa7285d


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

* [PATCH 25/30] thermal: cpu_cooling: remove not needed curl brackets
       [not found] <1366218743-20841-1-git-send-email-eduardo.valentin@ti.com>
                   ` (23 preceding siblings ...)
  2013-04-17 17:12 ` [PATCH 24/30] thermal: cpu_cooling: use snprintf instead of sprintf Eduardo Valentin
@ 2013-04-17 17:12 ` Eduardo Valentin
  2013-04-17 17:12 ` [PATCH 26/30] thermal: cpu_cooling: remove unused symbols Eduardo Valentin
                   ` (5 subsequent siblings)
  30 siblings, 0 replies; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-17 17:12 UTC (permalink / raw)
  To: amit.kachhap; +Cc: Eduardo Valentin, Zhang Rui, linux-pm, linux-kernel

Just for style purposes, remove extra curl brackets.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/cpu_cooling.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index b1f9a4d..3709274 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -505,10 +505,9 @@ void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev)
 	cpufreq_dev_count--;
 
 	/* Unregister the notifier for the last cpufreq cooling device */
-	if (cpufreq_dev_count == 0) {
+	if (cpufreq_dev_count == 0)
 		cpufreq_unregister_notifier(&thermal_cpufreq_notifier_block,
 					    CPUFREQ_POLICY_NOTIFIER);
-	}
 	mutex_unlock(&cooling_cpufreq_lock);
 
 	thermal_cooling_device_unregister(cpufreq_dev->cool_dev);
-- 
1.8.2.1.342.gfa7285d


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

* [PATCH 26/30] thermal: cpu_cooling: remove unused symbols
       [not found] <1366218743-20841-1-git-send-email-eduardo.valentin@ti.com>
                   ` (24 preceding siblings ...)
  2013-04-17 17:12 ` [PATCH 25/30] thermal: cpu_cooling: remove not needed curl brackets Eduardo Valentin
@ 2013-04-17 17:12 ` Eduardo Valentin
  2013-04-24 14:52   ` Zhang, Rui
  2013-04-17 17:12 ` [PATCH 27/30] thermal: cpu_cooling: add needed header for cpu_cooling.h Eduardo Valentin
                   ` (4 subsequent siblings)
  30 siblings, 1 reply; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-17 17:12 UTC (permalink / raw)
  To: amit.kachhap; +Cc: Eduardo Valentin, Zhang Rui, linux-pm, linux-kernel

The list is needed so far. Thus removing it.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/cpu_cooling.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index 3709274..825231f 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -38,11 +38,9 @@
  * @cpufreq_val: integer value representing the absolute value of the clipped
  *	frequency.
  * @allowed_cpus: all the cpus involved for this cpufreq_cooling_device.
- * @node: list_head to link all cpufreq_cooling_device together.
  *
  * This structure is required for keeping information of each
- * cpufreq_cooling_device registered as a list whose head is represented by
- * cooling_cpufreq_list. In order to prevent corruption of this list a
+ * cpufreq_cooling_device registered. In order to prevent corruption of this a
  * mutex lock cooling_cpufreq_lock is used.
  */
 struct cpufreq_cooling_device {
@@ -51,9 +49,7 @@ struct cpufreq_cooling_device {
 	unsigned int cpufreq_state;
 	unsigned int cpufreq_val;
 	struct cpumask allowed_cpus;
-	struct list_head node;
 };
-static LIST_HEAD(cooling_cpufreq_list);
 static DEFINE_IDR(cpufreq_idr);
 static DEFINE_MUTEX(cooling_cpufreq_lock);
 
-- 
1.8.2.1.342.gfa7285d


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

* [PATCH 27/30] thermal: cpu_cooling: add needed header for cpu_cooling.h
       [not found] <1366218743-20841-1-git-send-email-eduardo.valentin@ti.com>
                   ` (25 preceding siblings ...)
  2013-04-17 17:12 ` [PATCH 26/30] thermal: cpu_cooling: remove unused symbols Eduardo Valentin
@ 2013-04-17 17:12 ` Eduardo Valentin
  2013-04-17 17:12 ` [PATCH 28/30] MAINTAINERS: update thermal entry by adding file cpu_cooling.h Eduardo Valentin
                   ` (3 subsequent siblings)
  30 siblings, 0 replies; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-17 17:12 UTC (permalink / raw)
  To: amit.kachhap
  Cc: Eduardo Valentin, Zhang Rui, Durgadoss R, Andrew Morton, linux-kernel

Update header list for cpu_cooling.h. Missing definition
of cpumask.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Durgadoss R <durgadoss.r@intel.com>
Cc: Amit Daniel Kachhap <amit.kachhap@linaro.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 include/linux/cpu_cooling.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/cpu_cooling.h b/include/linux/cpu_cooling.h
index 77c87c9..75ef931 100644
--- a/include/linux/cpu_cooling.h
+++ b/include/linux/cpu_cooling.h
@@ -25,6 +25,7 @@
 #define __CPU_COOLING_H__
 
 #include <linux/thermal.h>
+#include <linux/cpumask.h>
 
 #define CPUFREQ_COOLING_START		0
 #define CPUFREQ_COOLING_STOP		1
-- 
1.8.2.1.342.gfa7285d


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

* [PATCH 28/30] MAINTAINERS: update thermal entry by adding file cpu_cooling.h
       [not found] <1366218743-20841-1-git-send-email-eduardo.valentin@ti.com>
                   ` (26 preceding siblings ...)
  2013-04-17 17:12 ` [PATCH 27/30] thermal: cpu_cooling: add needed header for cpu_cooling.h Eduardo Valentin
@ 2013-04-17 17:12 ` Eduardo Valentin
  2013-04-24 17:34   ` Eduardo Valentin
  2013-04-17 17:12 ` [PATCH 29/30] thermal: cpu_cooling: remove unused symbols on cpu_cooling.h Eduardo Valentin
                   ` (2 subsequent siblings)
  30 siblings, 1 reply; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-17 17:12 UTC (permalink / raw)
  To: amit.kachhap; +Cc: Eduardo Valentin, Zhang Rui, linux-pm, linux-kernel

Add cpu_cooling.h to thermal entry in MAINTAINERS.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 05dd187..3e075dc 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -8011,6 +8011,7 @@ T:      git git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux.git
 S:      Supported
 F:      drivers/thermal/
 F:      include/linux/thermal.h
+F:      include/linux/cpu_cooling.h
 
 THINGM BLINK(1) USB RGB LED DRIVER
 M:	Vivien Didelot <vivien.didelot@savoirfairelinux.com>
-- 
1.8.2.1.342.gfa7285d


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

* [PATCH 29/30] thermal: cpu_cooling: remove unused symbols on cpu_cooling.h
       [not found] <1366218743-20841-1-git-send-email-eduardo.valentin@ti.com>
                   ` (27 preceding siblings ...)
  2013-04-17 17:12 ` [PATCH 28/30] MAINTAINERS: update thermal entry by adding file cpu_cooling.h Eduardo Valentin
@ 2013-04-17 17:12 ` Eduardo Valentin
  2013-04-17 17:12 ` [PATCH 30/30] thermal: cpu_cooling: improve line breaking Eduardo Valentin
  2013-04-17 20:32 ` [PATCH 00/30] thermal: cpu_cooling: code improvements Eduardo Valentin
  30 siblings, 0 replies; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-17 17:12 UTC (permalink / raw)
  To: amit.kachhap; +Cc: Eduardo Valentin, Zhang Rui, linux-pm, linux-kernel

Remove defines that are not in used.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 include/linux/cpu_cooling.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/include/linux/cpu_cooling.h b/include/linux/cpu_cooling.h
index 75ef931..f48f6fb 100644
--- a/include/linux/cpu_cooling.h
+++ b/include/linux/cpu_cooling.h
@@ -27,9 +27,6 @@
 #include <linux/thermal.h>
 #include <linux/cpumask.h>
 
-#define CPUFREQ_COOLING_START		0
-#define CPUFREQ_COOLING_STOP		1
-
 #ifdef CONFIG_CPU_THERMAL
 /**
  * cpufreq_cooling_register - function to create cpufreq cooling device.
-- 
1.8.2.1.342.gfa7285d


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

* [PATCH 30/30] thermal: cpu_cooling: improve line breaking
       [not found] <1366218743-20841-1-git-send-email-eduardo.valentin@ti.com>
                   ` (28 preceding siblings ...)
  2013-04-17 17:12 ` [PATCH 29/30] thermal: cpu_cooling: remove unused symbols on cpu_cooling.h Eduardo Valentin
@ 2013-04-17 17:12 ` Eduardo Valentin
  2013-04-17 20:32 ` [PATCH 00/30] thermal: cpu_cooling: code improvements Eduardo Valentin
  30 siblings, 0 replies; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-17 17:12 UTC (permalink / raw)
  To: amit.kachhap; +Cc: Eduardo Valentin, Zhang Rui, linux-pm, linux-kernel

To improve code readiness, change the way the lines
are broken in this file.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 include/linux/cpu_cooling.h | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/include/linux/cpu_cooling.h b/include/linux/cpu_cooling.h
index f48f6fb..282e270 100644
--- a/include/linux/cpu_cooling.h
+++ b/include/linux/cpu_cooling.h
@@ -32,8 +32,8 @@
  * cpufreq_cooling_register - function to create cpufreq cooling device.
  * @clip_cpus: cpumask of cpus where the frequency constraints will happen
  */
-struct thermal_cooling_device *cpufreq_cooling_register(
-		const struct cpumask *clip_cpus);
+struct thermal_cooling_device *
+cpufreq_cooling_register(const struct cpumask *clip_cpus);
 
 /**
  * cpufreq_cooling_unregister - function to remove cpufreq cooling device.
@@ -43,18 +43,18 @@ void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev);
 
 unsigned long cpufreq_cooling_get_level(unsigned int, unsigned int);
 #else /* !CONFIG_CPU_THERMAL */
-static inline struct thermal_cooling_device *cpufreq_cooling_register(
-	const struct cpumask *clip_cpus)
+static inline struct thermal_cooling_device *
+cpufreq_cooling_register(const struct cpumask *clip_cpus)
 {
 	return NULL;
 }
-static inline void cpufreq_cooling_unregister(
-		struct thermal_cooling_device *cdev)
+static inline
+void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev)
 {
 	return;
 }
-static inline unsigned long cpufreq_cooling_get_level(unsigned int,
-						 unsigned int)
+static inline
+unsigned long cpufreq_cooling_get_level(unsigned int, unsigned int)
 {
 	return THERMAL_CSTATE_INVALID;
 }
-- 
1.8.2.1.342.gfa7285d


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

* Re: [PATCH 00/30] thermal: cpu_cooling: code improvements
       [not found] <1366218743-20841-1-git-send-email-eduardo.valentin@ti.com>
                   ` (29 preceding siblings ...)
  2013-04-17 17:12 ` [PATCH 30/30] thermal: cpu_cooling: improve line breaking Eduardo Valentin
@ 2013-04-17 20:32 ` Eduardo Valentin
  2013-04-22  2:34   ` amit daniel kachhap
  30 siblings, 1 reply; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-17 20:32 UTC (permalink / raw)
  To: Zhang, Rui
  Cc: eduardo.valentin, Amit Daniel Kachhap, linux-pm,
	linux-kernel@vger.kernel.org >>
	"linux-kernel@vger.kernel.org"

On 17-04-2013 13:11, Eduardo Valentin wrote:
> Rui,


Looks like I forgot to add the lists on patch 00. Doing so..
>
> This is a series of patches to improve the code for cpu_cooling.
> Majority of these changes are actually kernel-doc updates, as
> they required to be revised. A part from these, there are some
> changes regarding code style and readiness.
>
> Some may complain that these are a matter of taste, indeed.
> But I tried to just be unbiased and just keep the changes related
> to kernel-doc and checkpatch.pl. After this series, theses
> tools should be generating decent output ;-).
>
> The remaining changes are actually a couple of fixes for defensive
> coding. A part from updating the MAINTAINERS entry to cover cpu_cooling.
>
> This series has been tested on TI OMAP4430, together with the
> thermal driver under staging tree.
>
> All these patches are based on current linux-next/master.
>
> They are also available here:
>
> All best,
>
> Eduardo Valentin (30):
>    thermal: cpu_cooling: remove unused headers
>    thermal: cpu_cooling: remove trailing white spaces
>    thermal: cpu_cooling: fix kernel_doc for cpufreq_cooling_device
>    thermal: cpu_cooling: use EXPORT_SYMBOL_GPL
>    thermal: cpu_cooling: remove compiler warning
>    thermal: cpu_cooling: standardize end of function
>    thermal: cpu_cooling: fix kernel doc for is_cpufreq_valid
>    thermal: cpu_cooling: add documentation for get_property
>    thermal: cpu_cooling: standardize comment style
>    thermal: cpu_cooling: align on open parenthesis
>    thermal: cpu_cooling: remove trailing blank line
>    thermal: cpu_cooling: document cpufreq_get_cooling_level
>    thermal: cpu_cooling: remove checkpatch.pl warning
>    thermal: cpu_cooling: improve documentation for get_cpu_frequency
>    thermal: cpu_cooling: update documentation for cpufreq_apply_cooling
>    thermal: cpu_cooling: update documentation for
>      cpufreq_thermal_notifier
>    thermal: cpu_cooling: update Kconfig entry
>    thermal: cpu_cooling: alignment improvements
>    thermal: cpu_cooling: update documentation for cpufreq_get_max_state
>    thermal: cpu_cooling: update documentation for cpufreq_get_cur_state
>    thermal: cpu_cooling: update documentation for cpufreq_set_cur_state
>    thermal: cpu_cooling: update kernel-doc for cpufreq_cooling_register
>    thermal: cpu_cooling: update kernel-doc comment for
>      cpufreq_cooling_unregister
>    thermal: cpu_cooling: use snprintf instead of sprintf
>    thermal: cpu_cooling: remove not needed curl brackets
>    thermal: cpu_cooling: remove unused symbols
>    thermal: cpu_cooling: add needed header for cpu_cooling.h
>    MAINTAINERS: update thermal entry by adding file cpu_cooling.h
>    thermal: cpu_cooling: remove unused symbols on cpu_cooling.h
>    thermal: cpu_cooling: improve line breaking
>
>   MAINTAINERS                   |   1 +
>   drivers/thermal/Kconfig       |   5 +-
>   drivers/thermal/cpu_cooling.c | 156 ++++++++++++++++++++++++++++++------------
>   include/linux/cpu_cooling.h   |  20 +++---
>   4 files changed, 125 insertions(+), 57 deletions(-)
>


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

* Re: [PATCH 01/30] thermal: cpu_cooling: remove unused headers
  2013-04-17 17:11 ` [PATCH 01/30] thermal: cpu_cooling: remove unused headers Eduardo Valentin
@ 2013-04-22  2:16   ` amit daniel kachhap
  2013-04-24 14:44   ` Zhang, Rui
  2013-04-24 16:31   ` Zhang, Rui
  2 siblings, 0 replies; 47+ messages in thread
From: amit daniel kachhap @ 2013-04-22  2:16 UTC (permalink / raw)
  To: Eduardo Valentin; +Cc: Zhang Rui, linux-pm, linux-kernel

Hi,

On Wed, Apr 17, 2013 at 10:41 PM, Eduardo Valentin
<eduardo.valentin@ti.com> wrote:
> As this code is not a module nor a platform device driver,
> this patch removes some unused header files.
>
> Cc: Zhang Rui <rui.zhang@intel.com>
> Cc: linux-pm@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>

Reviewed-by: Amit Daniel Kachhap<amit.daniel@samsung.com>

Thanks,
Amit Daniel
> ---
>  drivers/thermal/cpu_cooling.c | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
> index 5f5c780..778c43d 100644
> --- a/drivers/thermal/cpu_cooling.c
> +++ b/drivers/thermal/cpu_cooling.c
> @@ -20,10 +20,7 @@
>   *
>   * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   */
> -#include <linux/kernel.h>
> -#include <linux/module.h>
>  #include <linux/thermal.h>
> -#include <linux/platform_device.h>
>  #include <linux/cpufreq.h>
>  #include <linux/err.h>
>  #include <linux/slab.h>
> --
> 1.8.2.1.342.gfa7285d
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [PATCH 03/30] thermal: cpu_cooling: fix kernel_doc for cpufreq_cooling_device
  2013-04-17 17:11 ` [PATCH 03/30] thermal: cpu_cooling: fix kernel_doc for cpufreq_cooling_device Eduardo Valentin
@ 2013-04-22  2:18   ` amit kachhap
  2013-04-24 14:49   ` Zhang, Rui
  1 sibling, 0 replies; 47+ messages in thread
From: amit kachhap @ 2013-04-22  2:18 UTC (permalink / raw)
  To: Eduardo Valentin; +Cc: Zhang Rui, linux-pm, linux-kernel

On Wed, Apr 17, 2013 at 10:41 PM, Eduardo Valentin
<eduardo.valentin@ti.com> wrote:
> Simple fixes for making kernel_doc happy about
> struct cpufreq_cooling_device. Includes also a minor
> spelling fix.
>
> Cc: Zhang Rui <rui.zhang@intel.com>
> Cc: linux-pm@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>

Reviewed-by: Amit Daniel Kachhap<amit.daniel@samsung.com>

Thanks,
Amit Daniel
> ---
>  drivers/thermal/cpu_cooling.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
> index d0d6a0c..7c0c05b 100644
> --- a/drivers/thermal/cpu_cooling.c
> +++ b/drivers/thermal/cpu_cooling.c
> @@ -28,11 +28,11 @@
>  #include <linux/cpu_cooling.h>
>
>  /**
> - * struct cpufreq_cooling_device
> + * struct cpufreq_cooling_device - data for cooling device with cpufreq
>   * @id: unique integer value corresponding to each cpufreq_cooling_device
>   *     registered.
> - * @cool_dev: thermal_cooling_device pointer to keep track of the the
> - *     egistered cooling device.
> + * @cool_dev: thermal_cooling_device pointer to keep track of the
> + *     registered cooling device.
>   * @cpufreq_state: integer value representing the current state of cpufreq
>   *     cooling devices.
>   * @cpufreq_val: integer value representing the absolute value of the clipped
> --
> 1.8.2.1.342.gfa7285d
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [PATCH 00/30] thermal: cpu_cooling: code improvements
  2013-04-17 20:32 ` [PATCH 00/30] thermal: cpu_cooling: code improvements Eduardo Valentin
@ 2013-04-22  2:34   ` amit daniel kachhap
  2013-04-22 13:07     ` Eduardo Valentin
  0 siblings, 1 reply; 47+ messages in thread
From: amit daniel kachhap @ 2013-04-22  2:34 UTC (permalink / raw)
  To: Eduardo Valentin
  Cc: Zhang, Rui, linux-pm,
	linux-kernel@vger.kernel.org >>
	"linux-kernel@vger.kernel.org"

Hi Eduardo,

I looked at your whole series and they certainly looks useful, so for
the entire series,
Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com>

Thanks,
Amit Daniel Kachhap

On Thu, Apr 18, 2013 at 2:02 AM, Eduardo Valentin
<eduardo.valentin@ti.com> wrote:
> On 17-04-2013 13:11, Eduardo Valentin wrote:
>>
>> Rui,
>
>
>
> Looks like I forgot to add the lists on patch 00. Doing so..
>>
>>
>> This is a series of patches to improve the code for cpu_cooling.
>> Majority of these changes are actually kernel-doc updates, as
>> they required to be revised. A part from these, there are some
>> changes regarding code style and readiness.
>>
>> Some may complain that these are a matter of taste, indeed.
>> But I tried to just be unbiased and just keep the changes related
>> to kernel-doc and checkpatch.pl. After this series, theses
>> tools should be generating decent output ;-).
>>
>> The remaining changes are actually a couple of fixes for defensive
>> coding. A part from updating the MAINTAINERS entry to cover cpu_cooling.
>>
>> This series has been tested on TI OMAP4430, together with the
>> thermal driver under staging tree.
>>
>> All these patches are based on current linux-next/master.
>>
>> They are also available here:
>>
>> All best,
>>
>> Eduardo Valentin (30):
>>    thermal: cpu_cooling: remove unused headers
>>    thermal: cpu_cooling: remove trailing white spaces
>>    thermal: cpu_cooling: fix kernel_doc for cpufreq_cooling_device
>>    thermal: cpu_cooling: use EXPORT_SYMBOL_GPL
>>    thermal: cpu_cooling: remove compiler warning
>>    thermal: cpu_cooling: standardize end of function
>>    thermal: cpu_cooling: fix kernel doc for is_cpufreq_valid
>>    thermal: cpu_cooling: add documentation for get_property
>>    thermal: cpu_cooling: standardize comment style
>>    thermal: cpu_cooling: align on open parenthesis
>>    thermal: cpu_cooling: remove trailing blank line
>>    thermal: cpu_cooling: document cpufreq_get_cooling_level
>>    thermal: cpu_cooling: remove checkpatch.pl warning
>>    thermal: cpu_cooling: improve documentation for get_cpu_frequency
>>    thermal: cpu_cooling: update documentation for cpufreq_apply_cooling
>>    thermal: cpu_cooling: update documentation for
>>      cpufreq_thermal_notifier
>>    thermal: cpu_cooling: update Kconfig entry
>>    thermal: cpu_cooling: alignment improvements
>>    thermal: cpu_cooling: update documentation for cpufreq_get_max_state
>>    thermal: cpu_cooling: update documentation for cpufreq_get_cur_state
>>    thermal: cpu_cooling: update documentation for cpufreq_set_cur_state
>>    thermal: cpu_cooling: update kernel-doc for cpufreq_cooling_register
>>    thermal: cpu_cooling: update kernel-doc comment for
>>      cpufreq_cooling_unregister
>>    thermal: cpu_cooling: use snprintf instead of sprintf
>>    thermal: cpu_cooling: remove not needed curl brackets
>>    thermal: cpu_cooling: remove unused symbols
>>    thermal: cpu_cooling: add needed header for cpu_cooling.h
>>    MAINTAINERS: update thermal entry by adding file cpu_cooling.h
>>    thermal: cpu_cooling: remove unused symbols on cpu_cooling.h
>>    thermal: cpu_cooling: improve line breaking
>>
>>   MAINTAINERS                   |   1 +
>>   drivers/thermal/Kconfig       |   5 +-
>>   drivers/thermal/cpu_cooling.c | 156
>> ++++++++++++++++++++++++++++++------------
>>   include/linux/cpu_cooling.h   |  20 +++---
>>   4 files changed, 125 insertions(+), 57 deletions(-)
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [PATCH 00/30] thermal: cpu_cooling: code improvements
  2013-04-22  2:34   ` amit daniel kachhap
@ 2013-04-22 13:07     ` Eduardo Valentin
  0 siblings, 0 replies; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-22 13:07 UTC (permalink / raw)
  To: amit daniel kachhap
  Cc: Eduardo Valentin, Zhang, Rui, linux-pm,
	linux-kernel@vger.kernel.org >>
	"linux-kernel@vger.kernel.org"

Amit,

On 21-04-2013 22:34, amit daniel kachhap wrote:
> Hi Eduardo,
>
> I looked at your whole series and they certainly looks useful, so for
> the entire series,
> Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
>

Ok, thanks.

Side note: Your Linaro email address is bouncing. Could you please send 
a patch updating the files you have signed?

> Thanks,
> Amit Daniel Kachhap
>
> On Thu, Apr 18, 2013 at 2:02 AM, Eduardo Valentin
> <eduardo.valentin@ti.com> wrote:
>> On 17-04-2013 13:11, Eduardo Valentin wrote:
>>>
>>> Rui,
>>
>>
>>
>> Looks like I forgot to add the lists on patch 00. Doing so..
>>>
>>>
>>> This is a series of patches to improve the code for cpu_cooling.
>>> Majority of these changes are actually kernel-doc updates, as
>>> they required to be revised. A part from these, there are some
>>> changes regarding code style and readiness.
>>>
>>> Some may complain that these are a matter of taste, indeed.
>>> But I tried to just be unbiased and just keep the changes related
>>> to kernel-doc and checkpatch.pl. After this series, theses
>>> tools should be generating decent output ;-).
>>>
>>> The remaining changes are actually a couple of fixes for defensive
>>> coding. A part from updating the MAINTAINERS entry to cover cpu_cooling.
>>>
>>> This series has been tested on TI OMAP4430, together with the
>>> thermal driver under staging tree.
>>>
>>> All these patches are based on current linux-next/master.
>>>
>>> They are also available here:
>>>
>>> All best,
>>>
>>> Eduardo Valentin (30):
>>>     thermal: cpu_cooling: remove unused headers
>>>     thermal: cpu_cooling: remove trailing white spaces
>>>     thermal: cpu_cooling: fix kernel_doc for cpufreq_cooling_device
>>>     thermal: cpu_cooling: use EXPORT_SYMBOL_GPL
>>>     thermal: cpu_cooling: remove compiler warning
>>>     thermal: cpu_cooling: standardize end of function
>>>     thermal: cpu_cooling: fix kernel doc for is_cpufreq_valid
>>>     thermal: cpu_cooling: add documentation for get_property
>>>     thermal: cpu_cooling: standardize comment style
>>>     thermal: cpu_cooling: align on open parenthesis
>>>     thermal: cpu_cooling: remove trailing blank line
>>>     thermal: cpu_cooling: document cpufreq_get_cooling_level
>>>     thermal: cpu_cooling: remove checkpatch.pl warning
>>>     thermal: cpu_cooling: improve documentation for get_cpu_frequency
>>>     thermal: cpu_cooling: update documentation for cpufreq_apply_cooling
>>>     thermal: cpu_cooling: update documentation for
>>>       cpufreq_thermal_notifier
>>>     thermal: cpu_cooling: update Kconfig entry
>>>     thermal: cpu_cooling: alignment improvements
>>>     thermal: cpu_cooling: update documentation for cpufreq_get_max_state
>>>     thermal: cpu_cooling: update documentation for cpufreq_get_cur_state
>>>     thermal: cpu_cooling: update documentation for cpufreq_set_cur_state
>>>     thermal: cpu_cooling: update kernel-doc for cpufreq_cooling_register
>>>     thermal: cpu_cooling: update kernel-doc comment for
>>>       cpufreq_cooling_unregister
>>>     thermal: cpu_cooling: use snprintf instead of sprintf
>>>     thermal: cpu_cooling: remove not needed curl brackets
>>>     thermal: cpu_cooling: remove unused symbols
>>>     thermal: cpu_cooling: add needed header for cpu_cooling.h
>>>     MAINTAINERS: update thermal entry by adding file cpu_cooling.h
>>>     thermal: cpu_cooling: remove unused symbols on cpu_cooling.h
>>>     thermal: cpu_cooling: improve line breaking
>>>
>>>    MAINTAINERS                   |   1 +
>>>    drivers/thermal/Kconfig       |   5 +-
>>>    drivers/thermal/cpu_cooling.c | 156
>>> ++++++++++++++++++++++++++++++------------
>>>    include/linux/cpu_cooling.h   |  20 +++---
>>>    4 files changed, 125 insertions(+), 57 deletions(-)
>>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at  http://www.tux.org/lkml/
>
>


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

* RE: [PATCH 01/30] thermal: cpu_cooling: remove unused headers
  2013-04-17 17:11 ` [PATCH 01/30] thermal: cpu_cooling: remove unused headers Eduardo Valentin
  2013-04-22  2:16   ` amit daniel kachhap
@ 2013-04-24 14:44   ` Zhang, Rui
  2013-04-24 16:31   ` Zhang, Rui
  2 siblings, 0 replies; 47+ messages in thread
From: Zhang, Rui @ 2013-04-24 14:44 UTC (permalink / raw)
  To: Eduardo Valentin, amit.kachhap; +Cc: linux-pm, linux-kernel



> -----Original Message-----
> From: linux-pm-owner@vger.kernel.org [mailto:linux-pm-
> owner@vger.kernel.org] On Behalf Of Eduardo Valentin
> Sent: Thursday, April 18, 2013 1:12 AM
> To: amit.kachhap@linaro.org
> Cc: Eduardo Valentin; Zhang, Rui; linux-pm@vger.kernel.org; linux-
> kernel@vger.kernel.org
> Subject: [PATCH 01/30] thermal: cpu_cooling: remove unused headers
> Importance: High
> 
> As this code is not a module nor a platform device driver, this patch
> removes some unused header files.
> 
> Cc: Zhang Rui <rui.zhang@intel.com>
> Cc: linux-pm@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>

Applied.

Thanks,
rui
> ---
>  drivers/thermal/cpu_cooling.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/thermal/cpu_cooling.c
> b/drivers/thermal/cpu_cooling.c index 5f5c780..778c43d 100644
> --- a/drivers/thermal/cpu_cooling.c
> +++ b/drivers/thermal/cpu_cooling.c
> @@ -20,10 +20,7 @@
>   *
>   *
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ~~~
>   */
> -#include <linux/kernel.h>
> -#include <linux/module.h>
>  #include <linux/thermal.h>
> -#include <linux/platform_device.h>
>  #include <linux/cpufreq.h>
>  #include <linux/err.h>
>  #include <linux/slab.h>
> --
> 1.8.2.1.342.gfa7285d
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo@vger.kernel.org More majordomo info
> at  http://vger.kernel.org/majordomo-info.html

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

* RE: [PATCH 02/30] thermal: cpu_cooling: remove trailing white spaces
  2013-04-17 17:11 ` [PATCH 02/30] thermal: cpu_cooling: remove trailing white spaces Eduardo Valentin
@ 2013-04-24 14:48   ` Zhang, Rui
  2013-04-24 15:13     ` Zhang, Rui
  2013-04-24 17:44     ` Eduardo Valentin
  0 siblings, 2 replies; 47+ messages in thread
From: Zhang, Rui @ 2013-04-24 14:48 UTC (permalink / raw)
  To: Eduardo Valentin, amit.kachhap; +Cc: linux-pm, linux-kernel



> -----Original Message-----
> From: Eduardo Valentin [mailto:eduardo.valentin@ti.com]
> Sent: Thursday, April 18, 2013 1:12 AM
> To: amit.kachhap@linaro.org
> Cc: Eduardo Valentin; Zhang, Rui; linux-pm@vger.kernel.org; linux-
> kernel@vger.kernel.org
> Subject: [PATCH 02/30] thermal: cpu_cooling: remove trailing white
> spaces
> Importance: High
> 
> Remove unnecessary white spaces.
> 
The same comments for patch 02, 06, 09, 10, 11, 13, 18, and 30.

Can we run Lindent to fix all the coding style problem in one patch?

Thanks,
rui
> Cc: Zhang Rui <rui.zhang@intel.com>
> Cc: linux-pm@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
> ---
>  drivers/thermal/cpu_cooling.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/thermal/cpu_cooling.c
> b/drivers/thermal/cpu_cooling.c index 778c43d..d0d6a0c 100644
> --- a/drivers/thermal/cpu_cooling.c
> +++ b/drivers/thermal/cpu_cooling.c
> @@ -131,14 +131,13 @@ static int get_property(unsigned int cpu,
> unsigned long input,
>  	int descend = -1;
>  	struct cpufreq_frequency_table *table =
>  					cpufreq_frequency_get_table(cpu);
> -
> +
>  	if (!output)
>  		return -EINVAL;
> 
>  	if (!table)
>  		return -EINVAL;
> 
> -
>  	for (i = 0; table[i].frequency != CPUFREQ_TABLE_END; i++) {
>  		/* ignore invalid entries */
>  		if (table[i].frequency == CPUFREQ_ENTRY_INVALID)
> --
> 1.8.2.1.342.gfa7285d


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

* RE: [PATCH 03/30] thermal: cpu_cooling: fix kernel_doc for cpufreq_cooling_device
  2013-04-17 17:11 ` [PATCH 03/30] thermal: cpu_cooling: fix kernel_doc for cpufreq_cooling_device Eduardo Valentin
  2013-04-22  2:18   ` amit kachhap
@ 2013-04-24 14:49   ` Zhang, Rui
  1 sibling, 0 replies; 47+ messages in thread
From: Zhang, Rui @ 2013-04-24 14:49 UTC (permalink / raw)
  To: Eduardo Valentin, amit.kachhap; +Cc: linux-pm, linux-kernel



> -----Original Message-----
> From: Eduardo Valentin [mailto:eduardo.valentin@ti.com]
> Sent: Thursday, April 18, 2013 1:12 AM
> To: amit.kachhap@linaro.org
> Cc: Eduardo Valentin; Zhang, Rui; linux-pm@vger.kernel.org; linux-
> kernel@vger.kernel.org
> Subject: [PATCH 03/30] thermal: cpu_cooling: fix kernel_doc for
> cpufreq_cooling_device
> Importance: High
> 
> Simple fixes for making kernel_doc happy about struct
> cpufreq_cooling_device. Includes also a minor spelling fix.
> 
> Cc: Zhang Rui <rui.zhang@intel.com>
> Cc: linux-pm@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>

Applied.

Thanks,
rui
> ---
>  drivers/thermal/cpu_cooling.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/thermal/cpu_cooling.c
> b/drivers/thermal/cpu_cooling.c index d0d6a0c..7c0c05b 100644
> --- a/drivers/thermal/cpu_cooling.c
> +++ b/drivers/thermal/cpu_cooling.c
> @@ -28,11 +28,11 @@
>  #include <linux/cpu_cooling.h>
> 
>  /**
> - * struct cpufreq_cooling_device
> + * struct cpufreq_cooling_device - data for cooling device with
> cpufreq
>   * @id: unique integer value corresponding to each
> cpufreq_cooling_device
>   *	registered.
> - * @cool_dev: thermal_cooling_device pointer to keep track of the the
> - *	egistered cooling device.
> + * @cool_dev: thermal_cooling_device pointer to keep track of the
> + *	registered cooling device.
>   * @cpufreq_state: integer value representing the current state of
> cpufreq
>   *	cooling	devices.
>   * @cpufreq_val: integer value representing the absolute value of the
> clipped
> --
> 1.8.2.1.342.gfa7285d


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

* RE: [PATCH 04/30] thermal: cpu_cooling: use EXPORT_SYMBOL_GPL
  2013-04-17 17:11 ` [PATCH 04/30] thermal: cpu_cooling: use EXPORT_SYMBOL_GPL Eduardo Valentin
@ 2013-04-24 14:50   ` Zhang, Rui
  0 siblings, 0 replies; 47+ messages in thread
From: Zhang, Rui @ 2013-04-24 14:50 UTC (permalink / raw)
  To: Eduardo Valentin, amit.kachhap; +Cc: linux-pm, linux-kernel

Applied.

Thanks,
rui

> -----Original Message-----
> From: Eduardo Valentin [mailto:eduardo.valentin@ti.com]
> Sent: Thursday, April 18, 2013 1:12 AM
> To: amit.kachhap@linaro.org
> Cc: Eduardo Valentin; Zhang, Rui; linux-pm@vger.kernel.org; linux-
> kernel@vger.kernel.org
> Subject: [PATCH 04/30] thermal: cpu_cooling: use EXPORT_SYMBOL_GPL
> Importance: High
> 
> Restrict the usage to GPL modules.
> 
> Cc: Zhang Rui <rui.zhang@intel.com>
> Cc: linux-pm@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
> ---
>  drivers/thermal/cpu_cooling.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/thermal/cpu_cooling.c
> b/drivers/thermal/cpu_cooling.c index 7c0c05b..64dc4dd 100644
> --- a/drivers/thermal/cpu_cooling.c
> +++ b/drivers/thermal/cpu_cooling.c
> @@ -200,8 +200,7 @@ unsigned long cpufreq_cooling_get_level(unsigned
> int cpu, unsigned int freq)
>  		return THERMAL_CSTATE_INVALID;
>  	return (unsigned long)val;
>  }
> -
> -EXPORT_SYMBOL(cpufreq_cooling_get_level);
> +EXPORT_SYMBOL_GPL(cpufreq_cooling_get_level);
> 
>  /**
>   * get_cpu_frequency - get the absolute value of frequency from level.
> @@ -414,7 +413,7 @@ struct thermal_cooling_device
> *cpufreq_cooling_register(
>  	mutex_unlock(&cooling_cpufreq_lock);
>  	return cool_dev;
>  }
> -EXPORT_SYMBOL(cpufreq_cooling_register);
> +EXPORT_SYMBOL_GPL(cpufreq_cooling_register);
> 
>  /**
>   * cpufreq_cooling_unregister - function to remove cpufreq cooling
> device.
> @@ -438,4 +437,4 @@ void cpufreq_cooling_unregister(struct
> thermal_cooling_device *cdev)
>  	release_idr(&cpufreq_idr, cpufreq_dev->id);
>  	kfree(cpufreq_dev);
>  }
> -EXPORT_SYMBOL(cpufreq_cooling_unregister);
> +EXPORT_SYMBOL_GPL(cpufreq_cooling_unregister);
> --
> 1.8.2.1.342.gfa7285d


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

* RE: [PATCH 26/30] thermal: cpu_cooling: remove unused symbols
  2013-04-17 17:12 ` [PATCH 26/30] thermal: cpu_cooling: remove unused symbols Eduardo Valentin
@ 2013-04-24 14:52   ` Zhang, Rui
  2013-04-24 17:33     ` Eduardo Valentin
  0 siblings, 1 reply; 47+ messages in thread
From: Zhang, Rui @ 2013-04-24 14:52 UTC (permalink / raw)
  To: Eduardo Valentin, amit.kachhap; +Cc: linux-pm, linux-kernel



> -----Original Message-----
> From: Eduardo Valentin [mailto:eduardo.valentin@ti.com]
> Sent: Thursday, April 18, 2013 1:12 AM
> To: amit.kachhap@linaro.org
> Cc: Eduardo Valentin; Zhang, Rui; linux-pm@vger.kernel.org; linux-
> kernel@vger.kernel.org
> Subject: [PATCH 26/30] thermal: cpu_cooling: remove unused symbols
> Importance: High
> 
> The list is needed so far. Thus removing it.
> 
s/needed/not needed?

Thanks,
rui
> Cc: Zhang Rui <rui.zhang@intel.com>
> Cc: linux-pm@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
> ---
>  drivers/thermal/cpu_cooling.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/thermal/cpu_cooling.c
> b/drivers/thermal/cpu_cooling.c index 3709274..825231f 100644
> --- a/drivers/thermal/cpu_cooling.c
> +++ b/drivers/thermal/cpu_cooling.c
> @@ -38,11 +38,9 @@
>   * @cpufreq_val: integer value representing the absolute value of the
> clipped
>   *	frequency.
>   * @allowed_cpus: all the cpus involved for this
> cpufreq_cooling_device.
> - * @node: list_head to link all cpufreq_cooling_device together.
>   *
>   * This structure is required for keeping information of each
> - * cpufreq_cooling_device registered as a list whose head is
> represented by
> - * cooling_cpufreq_list. In order to prevent corruption of this list a
> + * cpufreq_cooling_device registered. In order to prevent corruption
> of
> + this a
>   * mutex lock cooling_cpufreq_lock is used.
>   */
>  struct cpufreq_cooling_device {
> @@ -51,9 +49,7 @@ struct cpufreq_cooling_device {
>  	unsigned int cpufreq_state;
>  	unsigned int cpufreq_val;
>  	struct cpumask allowed_cpus;
> -	struct list_head node;
>  };
> -static LIST_HEAD(cooling_cpufreq_list);  static
> DEFINE_IDR(cpufreq_idr);  static DEFINE_MUTEX(cooling_cpufreq_lock);
> 
> --
> 1.8.2.1.342.gfa7285d


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

* RE: [PATCH 02/30] thermal: cpu_cooling: remove trailing white spaces
  2013-04-24 14:48   ` Zhang, Rui
@ 2013-04-24 15:13     ` Zhang, Rui
  2013-04-24 17:44     ` Eduardo Valentin
  1 sibling, 0 replies; 47+ messages in thread
From: Zhang, Rui @ 2013-04-24 15:13 UTC (permalink / raw)
  To: Zhang, Rui, Eduardo Valentin, amit.kachhap; +Cc: linux-pm, linux-kernel



> -----Original Message-----
> From: linux-pm-owner@vger.kernel.org [mailto:linux-pm-
> owner@vger.kernel.org] On Behalf Of Zhang, Rui
> Sent: Wednesday, April 24, 2013 10:49 PM
> To: Eduardo Valentin; amit.kachhap@linaro.org
> Cc: linux-pm@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: RE: [PATCH 02/30] thermal: cpu_cooling: remove trailing white
> spaces
> 
> 
> 
> > -----Original Message-----
> > From: Eduardo Valentin [mailto:eduardo.valentin@ti.com]
> > Sent: Thursday, April 18, 2013 1:12 AM
> > To: amit.kachhap@linaro.org
> > Cc: Eduardo Valentin; Zhang, Rui; linux-pm@vger.kernel.org; linux-
> > kernel@vger.kernel.org
> > Subject: [PATCH 02/30] thermal: cpu_cooling: remove trailing white
> > spaces
> > Importance: High
> >
> > Remove unnecessary white spaces.
> >
> The same comments for patch 02, 06, 09, 10, 11, 13, 18, and 30.
> 
All the other patches applied.

Thanks,
rui
> Can we run Lindent to fix all the coding style problem in one patch?
> 
> Thanks,
> rui
> > Cc: Zhang Rui <rui.zhang@intel.com>
> > Cc: linux-pm@vger.kernel.org
> > Cc: linux-kernel@vger.kernel.org
> > Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
> > ---
> >  drivers/thermal/cpu_cooling.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/thermal/cpu_cooling.c
> > b/drivers/thermal/cpu_cooling.c index 778c43d..d0d6a0c 100644
> > --- a/drivers/thermal/cpu_cooling.c
> > +++ b/drivers/thermal/cpu_cooling.c
> > @@ -131,14 +131,13 @@ static int get_property(unsigned int cpu,
> > unsigned long input,
> >  	int descend = -1;
> >  	struct cpufreq_frequency_table *table =
> >  					cpufreq_frequency_get_table(cpu);
> > -
> > +
> >  	if (!output)
> >  		return -EINVAL;
> >
> >  	if (!table)
> >  		return -EINVAL;
> >
> > -
> >  	for (i = 0; table[i].frequency != CPUFREQ_TABLE_END; i++) {
> >  		/* ignore invalid entries */
> >  		if (table[i].frequency == CPUFREQ_ENTRY_INVALID)
> > --
> > 1.8.2.1.342.gfa7285d
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo@vger.kernel.org More majordomo info
> at  http://vger.kernel.org/majordomo-info.html

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

* RE: [PATCH 01/30] thermal: cpu_cooling: remove unused headers
  2013-04-17 17:11 ` [PATCH 01/30] thermal: cpu_cooling: remove unused headers Eduardo Valentin
  2013-04-22  2:16   ` amit daniel kachhap
  2013-04-24 14:44   ` Zhang, Rui
@ 2013-04-24 16:31   ` Zhang, Rui
  2013-04-24 16:38     ` Zhang, Rui
  2 siblings, 1 reply; 47+ messages in thread
From: Zhang, Rui @ 2013-04-24 16:31 UTC (permalink / raw)
  To: Eduardo Valentin, amit.kachhap; +Cc: linux-pm, linux-kernel



> -----Original Message-----
> From: linux-pm-owner@vger.kernel.org [mailto:linux-pm-
> owner@vger.kernel.org] On Behalf Of Eduardo Valentin
> Sent: Thursday, April 18, 2013 1:12 AM
> To: amit.kachhap@linaro.org
> Cc: Eduardo Valentin; Zhang, Rui; linux-pm@vger.kernel.org; linux-
> kernel@vger.kernel.org
> Subject: [PATCH 01/30] thermal: cpu_cooling: remove unused headers
> Importance: High
> 
> As this code is not a module nor a platform device driver, this patch
> removes some unused header files.
> 
> Cc: Zhang Rui <rui.zhang@intel.com>
> Cc: linux-pm@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
> ---
>  drivers/thermal/cpu_cooling.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/thermal/cpu_cooling.c
> b/drivers/thermal/cpu_cooling.c index 5f5c780..778c43d 100644
> --- a/drivers/thermal/cpu_cooling.c
> +++ b/drivers/thermal/cpu_cooling.c
> @@ -20,10 +20,7 @@
>   *
>   *
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ~~~
>   */
> -#include <linux/kernel.h>
> -#include <linux/module.h>

This is still needed because of EXPORT_SYMBOL.
Or else, I get:
drivers/thermal/cpu_cooling.c:225:1: warning: data definition has no type or storage class [enabled by default]
drivers/thermal/cpu_cooling.c:225:1: warning: type defaults to int in declaration of EXPORT_SYMBOL_GPL [-Wimplicit-int]
drivers/thermal/cpu_cooling.c:225:1: warning: parameter names (without types) in function declaration [enabled by default]
drivers/thermal/cpu_cooling.c:479:1: warning: data definition has no type or storage class [enabled by default]
drivers/thermal/cpu_cooling.c:479:1: warning: type defaults to int in declaration of EXPORT_SYMBOL_GPL [-Wimplicit-int]
drivers/thermal/cpu_cooling.c:479:1: warning: parameter names (without types) in function declaration [enabled by default]
drivers/thermal/cpu_cooling.c:505:1: warning: data definition has no type or storage class [enabled by default]
drivers/thermal/cpu_cooling.c:505:1: warning: type defaults to int in declaration of EXPORT_SYMBOL_GPL [-Wimplicit-int]
drivers/thermal/cpu_cooling.c:505:1: warning: parameter names (without types) in function declaration [enabled by default]

thanks,
rui

>  #include <linux/thermal.h>
> -#include <linux/platform_device.h>
>  #include <linux/cpufreq.h>
>  #include <linux/err.h>
>  #include <linux/slab.h>
> --
> 1.8.2.1.342.gfa7285d
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo@vger.kernel.org More majordomo info
> at  http://vger.kernel.org/majordomo-info.html

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

* RE: [PATCH 01/30] thermal: cpu_cooling: remove unused headers
  2013-04-24 16:31   ` Zhang, Rui
@ 2013-04-24 16:38     ` Zhang, Rui
  0 siblings, 0 replies; 47+ messages in thread
From: Zhang, Rui @ 2013-04-24 16:38 UTC (permalink / raw)
  To: Zhang, Rui, Eduardo Valentin, amit.kachhap; +Cc: linux-pm, linux-kernel



> -----Original Message-----
> From: linux-pm-owner@vger.kernel.org [mailto:linux-pm-
> owner@vger.kernel.org] On Behalf Of Zhang, Rui
> Sent: Thursday, April 25, 2013 12:32 AM
> To: Eduardo Valentin; amit.kachhap@linaro.org
> Cc: linux-pm@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: RE: [PATCH 01/30] thermal: cpu_cooling: remove unused headers
> 
> 
> 
> > -----Original Message-----
> > From: linux-pm-owner@vger.kernel.org [mailto:linux-pm-
> > owner@vger.kernel.org] On Behalf Of Eduardo Valentin
> > Sent: Thursday, April 18, 2013 1:12 AM
> > To: amit.kachhap@linaro.org
> > Cc: Eduardo Valentin; Zhang, Rui; linux-pm@vger.kernel.org; linux-
> > kernel@vger.kernel.org
> > Subject: [PATCH 01/30] thermal: cpu_cooling: remove unused headers
> > Importance: High
> >
> > As this code is not a module nor a platform device driver, this patch
> > removes some unused header files.
> >
> > Cc: Zhang Rui <rui.zhang@intel.com>
> > Cc: linux-pm@vger.kernel.org
> > Cc: linux-kernel@vger.kernel.org
> > Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
> > ---
> >  drivers/thermal/cpu_cooling.c | 3 ---
> >  1 file changed, 3 deletions(-)
> >
> > diff --git a/drivers/thermal/cpu_cooling.c
> > b/drivers/thermal/cpu_cooling.c index 5f5c780..778c43d 100644
> > --- a/drivers/thermal/cpu_cooling.c
> > +++ b/drivers/thermal/cpu_cooling.c
> > @@ -20,10 +20,7 @@
> >   *
> >   *
> >
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > ~
> > ~~~
> >   */
> > -#include <linux/kernel.h>
> > -#include <linux/module.h>
> 
> This is still needed because of EXPORT_SYMBOL.
> Or else, I get:
> drivers/thermal/cpu_cooling.c:225:1: warning: data definition has no
> type or storage class [enabled by default]
> drivers/thermal/cpu_cooling.c:225:1: warning: type defaults to int in
> declaration of EXPORT_SYMBOL_GPL [-Wimplicit-int]
> drivers/thermal/cpu_cooling.c:225:1: warning: parameter names (without
> types) in function declaration [enabled by default]
> drivers/thermal/cpu_cooling.c:479:1: warning: data definition has no
> type or storage class [enabled by default]
> drivers/thermal/cpu_cooling.c:479:1: warning: type defaults to int in
> declaration of EXPORT_SYMBOL_GPL [-Wimplicit-int]
> drivers/thermal/cpu_cooling.c:479:1: warning: parameter names (without
> types) in function declaration [enabled by default]
> drivers/thermal/cpu_cooling.c:505:1: warning: data definition has no
> type or storage class [enabled by default]
> drivers/thermal/cpu_cooling.c:505:1: warning: type defaults to int in
> declaration of EXPORT_SYMBOL_GPL [-Wimplicit-int]
> drivers/thermal/cpu_cooling.c:505:1: warning: parameter names (without
> types) in function declaration [enabled by default]
> 
Patch refreshed with keeping "#include <linux/module.h>" and applied.

> thanks,
> rui
> 
> >  #include <linux/thermal.h>
> > -#include <linux/platform_device.h>
> >  #include <linux/cpufreq.h>
> >  #include <linux/err.h>
> >  #include <linux/slab.h>
> > --
> > 1.8.2.1.342.gfa7285d
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-pm"
> in
> > the body of a message to majordomo@vger.kernel.org More majordomo
> info
> > at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo@vger.kernel.org More majordomo info
> at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 26/30] thermal: cpu_cooling: remove unused symbols
  2013-04-24 14:52   ` Zhang, Rui
@ 2013-04-24 17:33     ` Eduardo Valentin
  0 siblings, 0 replies; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-24 17:33 UTC (permalink / raw)
  To: Zhang, Rui; +Cc: Eduardo Valentin, amit.kachhap, linux-pm, linux-kernel

On 24-04-2013 10:52, Zhang, Rui wrote:
>
>
>> -----Original Message-----
>> From: Eduardo Valentin [mailto:eduardo.valentin@ti.com]
>> Sent: Thursday, April 18, 2013 1:12 AM
>> To: amit.kachhap@linaro.org
>> Cc: Eduardo Valentin; Zhang, Rui; linux-pm@vger.kernel.org; linux-
>> kernel@vger.kernel.org
>> Subject: [PATCH 26/30] thermal: cpu_cooling: remove unused symbols
>> Importance: High
>>
>> The list is needed so far. Thus removing it.
>>
> s/needed/not needed?
>

yes, thanks.

> Thanks,
> rui
>> Cc: Zhang Rui <rui.zhang@intel.com>
>> Cc: linux-pm@vger.kernel.org
>> Cc: linux-kernel@vger.kernel.org
>> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
>> ---
>>   drivers/thermal/cpu_cooling.c | 6 +-----
>>   1 file changed, 1 insertion(+), 5 deletions(-)
>>
>> diff --git a/drivers/thermal/cpu_cooling.c
>> b/drivers/thermal/cpu_cooling.c index 3709274..825231f 100644
>> --- a/drivers/thermal/cpu_cooling.c
>> +++ b/drivers/thermal/cpu_cooling.c
>> @@ -38,11 +38,9 @@
>>    * @cpufreq_val: integer value representing the absolute value of the
>> clipped
>>    *	frequency.
>>    * @allowed_cpus: all the cpus involved for this
>> cpufreq_cooling_device.
>> - * @node: list_head to link all cpufreq_cooling_device together.
>>    *
>>    * This structure is required for keeping information of each
>> - * cpufreq_cooling_device registered as a list whose head is
>> represented by
>> - * cooling_cpufreq_list. In order to prevent corruption of this list a
>> + * cpufreq_cooling_device registered. In order to prevent corruption
>> of
>> + this a
>>    * mutex lock cooling_cpufreq_lock is used.
>>    */
>>   struct cpufreq_cooling_device {
>> @@ -51,9 +49,7 @@ struct cpufreq_cooling_device {
>>   	unsigned int cpufreq_state;
>>   	unsigned int cpufreq_val;
>>   	struct cpumask allowed_cpus;
>> -	struct list_head node;
>>   };
>> -static LIST_HEAD(cooling_cpufreq_list);  static
>> DEFINE_IDR(cpufreq_idr);  static DEFINE_MUTEX(cooling_cpufreq_lock);
>>
>> --
>> 1.8.2.1.342.gfa7285d
>
>
>


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

* Re: [PATCH 28/30] MAINTAINERS: update thermal entry by adding file cpu_cooling.h
  2013-04-17 17:12 ` [PATCH 28/30] MAINTAINERS: update thermal entry by adding file cpu_cooling.h Eduardo Valentin
@ 2013-04-24 17:34   ` Eduardo Valentin
  2013-04-24 23:40     ` Zhang Rui
  0 siblings, 1 reply; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-24 17:34 UTC (permalink / raw)
  To: Eduardo Valentin; +Cc: amit.kachhap, Zhang Rui, linux-pm, linux-kernel

Rui,

On 17-04-2013 13:12, Eduardo Valentin wrote:
> Add cpu_cooling.h to thermal entry in MAINTAINERS.
>
> Cc: Zhang Rui <rui.zhang@intel.com>
> Cc: linux-pm@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
> ---
>   MAINTAINERS | 1 +
>   1 file changed, 1 insertion(+)
>

This one didnt get in. Does it need to go in a different tree?

> diff --git a/MAINTAINERS b/MAINTAINERS
> index 05dd187..3e075dc 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -8011,6 +8011,7 @@ T:      git git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux.git
>   S:      Supported
>   F:      drivers/thermal/
>   F:      include/linux/thermal.h
> +F:      include/linux/cpu_cooling.h
>
>   THINGM BLINK(1) USB RGB LED DRIVER
>   M:	Vivien Didelot <vivien.didelot@savoirfairelinux.com>
>


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

* Re: [PATCH 02/30] thermal: cpu_cooling: remove trailing white spaces
  2013-04-24 14:48   ` Zhang, Rui
  2013-04-24 15:13     ` Zhang, Rui
@ 2013-04-24 17:44     ` Eduardo Valentin
  1 sibling, 0 replies; 47+ messages in thread
From: Eduardo Valentin @ 2013-04-24 17:44 UTC (permalink / raw)
  To: Zhang, Rui; +Cc: Eduardo Valentin, amit.kachhap, linux-pm, linux-kernel

On 24-04-2013 10:48, Zhang, Rui wrote:
>
>
>> -----Original Message-----
>> From: Eduardo Valentin [mailto:eduardo.valentin@ti.com]
>> Sent: Thursday, April 18, 2013 1:12 AM
>> To: amit.kachhap@linaro.org
>> Cc: Eduardo Valentin; Zhang, Rui; linux-pm@vger.kernel.org; linux-
>> kernel@vger.kernel.org
>> Subject: [PATCH 02/30] thermal: cpu_cooling: remove trailing white
>> spaces
>> Importance: High
>>
>> Remove unnecessary white spaces.
>>
> The same comments for patch 02, 06, 09, 10, 11, 13, 18, and 30.
>
> Can we run Lindent to fix all the coding style problem in one patch?


Well, yes. The thing about Lindent is that it sometimes changes the code 
in a way we do not want. It will change cpu-cooling in slightly 
different way, but it will include most of the changes on the patches 
above. It misses some of the changes and also does some other that are 
not so nice.

I obviously would prefer to keep these patches, as, the patches are 
already there. Let me know what is your call.

>
> Thanks,
> rui
>> Cc: Zhang Rui <rui.zhang@intel.com>
>> Cc: linux-pm@vger.kernel.org
>> Cc: linux-kernel@vger.kernel.org
>> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
>> ---
>>   drivers/thermal/cpu_cooling.c | 3 +--
>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/thermal/cpu_cooling.c
>> b/drivers/thermal/cpu_cooling.c index 778c43d..d0d6a0c 100644
>> --- a/drivers/thermal/cpu_cooling.c
>> +++ b/drivers/thermal/cpu_cooling.c
>> @@ -131,14 +131,13 @@ static int get_property(unsigned int cpu,
>> unsigned long input,
>>   	int descend = -1;
>>   	struct cpufreq_frequency_table *table =
>>   					cpufreq_frequency_get_table(cpu);
>> -
>> +
>>   	if (!output)
>>   		return -EINVAL;
>>
>>   	if (!table)
>>   		return -EINVAL;
>>
>> -
>>   	for (i = 0; table[i].frequency != CPUFREQ_TABLE_END; i++) {
>>   		/* ignore invalid entries */
>>   		if (table[i].frequency == CPUFREQ_ENTRY_INVALID)
>> --
>> 1.8.2.1.342.gfa7285d
>
>
>


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

* Re: [PATCH 28/30] MAINTAINERS: update thermal entry by adding file cpu_cooling.h
  2013-04-24 17:34   ` Eduardo Valentin
@ 2013-04-24 23:40     ` Zhang Rui
  0 siblings, 0 replies; 47+ messages in thread
From: Zhang Rui @ 2013-04-24 23:40 UTC (permalink / raw)
  To: Eduardo Valentin; +Cc: amit.kachhap, linux-pm, linux-kernel

On Wed, 2013-04-24 at 13:34 -0400, Eduardo Valentin wrote:
> Rui,
> 
> On 17-04-2013 13:12, Eduardo Valentin wrote:
> > Add cpu_cooling.h to thermal entry in MAINTAINERS.
> >
> > Cc: Zhang Rui <rui.zhang@intel.com>
> > Cc: linux-pm@vger.kernel.org
> > Cc: linux-kernel@vger.kernel.org
> > Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
> > ---
> >   MAINTAINERS | 1 +
> >   1 file changed, 1 insertion(+)
> >
> 
> This one didnt get in. Does it need to go in a different tree?
> 
I have a separate branch which contains all the three patches that
changes MAINTAINERS file.
I'm not sure if I should take them or not at the moment.

thanks,
rui
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index 05dd187..3e075dc 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -8011,6 +8011,7 @@ T:      git git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux.git
> >   S:      Supported
> >   F:      drivers/thermal/
> >   F:      include/linux/thermal.h
> > +F:      include/linux/cpu_cooling.h
> >
> >   THINGM BLINK(1) USB RGB LED DRIVER
> >   M:	Vivien Didelot <vivien.didelot@savoirfairelinux.com>
> >
> 



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

end of thread, other threads:[~2013-04-24 23:40 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1366218743-20841-1-git-send-email-eduardo.valentin@ti.com>
2013-04-17 17:11 ` [PATCH 01/30] thermal: cpu_cooling: remove unused headers Eduardo Valentin
2013-04-22  2:16   ` amit daniel kachhap
2013-04-24 14:44   ` Zhang, Rui
2013-04-24 16:31   ` Zhang, Rui
2013-04-24 16:38     ` Zhang, Rui
2013-04-17 17:11 ` [PATCH 02/30] thermal: cpu_cooling: remove trailing white spaces Eduardo Valentin
2013-04-24 14:48   ` Zhang, Rui
2013-04-24 15:13     ` Zhang, Rui
2013-04-24 17:44     ` Eduardo Valentin
2013-04-17 17:11 ` [PATCH 03/30] thermal: cpu_cooling: fix kernel_doc for cpufreq_cooling_device Eduardo Valentin
2013-04-22  2:18   ` amit kachhap
2013-04-24 14:49   ` Zhang, Rui
2013-04-17 17:11 ` [PATCH 04/30] thermal: cpu_cooling: use EXPORT_SYMBOL_GPL Eduardo Valentin
2013-04-24 14:50   ` Zhang, Rui
2013-04-17 17:11 ` [PATCH 05/30] thermal: cpu_cooling: remove compiler warning Eduardo Valentin
2013-04-17 17:11 ` [PATCH 06/30] thermal: cpu_cooling: standardize end of function Eduardo Valentin
2013-04-17 17:12 ` [PATCH 07/30] thermal: cpu_cooling: fix kernel doc for is_cpufreq_valid Eduardo Valentin
2013-04-17 17:12 ` [PATCH 08/30] thermal: cpu_cooling: add documentation for get_property Eduardo Valentin
2013-04-17 17:12 ` [PATCH 09/30] thermal: cpu_cooling: standardize comment style Eduardo Valentin
2013-04-17 17:12 ` [PATCH 10/30] thermal: cpu_cooling: align on open parenthesis Eduardo Valentin
2013-04-17 17:12 ` [PATCH 11/30] thermal: cpu_cooling: remove trailing blank line Eduardo Valentin
2013-04-17 17:12 ` [PATCH 12/30] thermal: cpu_cooling: document cpufreq_get_cooling_level Eduardo Valentin
2013-04-17 17:12 ` [PATCH 13/30] thermal: cpu_cooling: remove checkpatch.pl warning Eduardo Valentin
2013-04-17 17:12 ` [PATCH 14/30] thermal: cpu_cooling: improve documentation for get_cpu_frequency Eduardo Valentin
2013-04-17 17:12 ` [PATCH 15/30] thermal: cpu_cooling: update documentation for cpufreq_apply_cooling Eduardo Valentin
2013-04-17 17:12 ` [PATCH 16/30] thermal: cpu_cooling: update documentation for cpufreq_thermal_notifier Eduardo Valentin
2013-04-17 17:12 ` [PATCH 17/30] thermal: cpu_cooling: update Kconfig entry Eduardo Valentin
2013-04-17 17:12 ` [PATCH 18/30] thermal: cpu_cooling: alignment improvements Eduardo Valentin
2013-04-17 17:12 ` [PATCH 19/30] thermal: cpu_cooling: update documentation for cpufreq_get_max_state Eduardo Valentin
2013-04-17 17:12 ` [PATCH 20/30] thermal: cpu_cooling: update documentation for cpufreq_get_cur_state Eduardo Valentin
2013-04-17 17:12 ` [PATCH 21/30] thermal: cpu_cooling: update documentation for cpufreq_set_cur_state Eduardo Valentin
2013-04-17 17:12 ` [PATCH 22/30] thermal: cpu_cooling: update kernel-doc for cpufreq_cooling_register Eduardo Valentin
2013-04-17 17:12 ` [PATCH 23/30] thermal: cpu_cooling: update kernel-doc comment for cpufreq_cooling_unregister Eduardo Valentin
2013-04-17 17:12 ` [PATCH 24/30] thermal: cpu_cooling: use snprintf instead of sprintf Eduardo Valentin
2013-04-17 17:12 ` [PATCH 25/30] thermal: cpu_cooling: remove not needed curl brackets Eduardo Valentin
2013-04-17 17:12 ` [PATCH 26/30] thermal: cpu_cooling: remove unused symbols Eduardo Valentin
2013-04-24 14:52   ` Zhang, Rui
2013-04-24 17:33     ` Eduardo Valentin
2013-04-17 17:12 ` [PATCH 27/30] thermal: cpu_cooling: add needed header for cpu_cooling.h Eduardo Valentin
2013-04-17 17:12 ` [PATCH 28/30] MAINTAINERS: update thermal entry by adding file cpu_cooling.h Eduardo Valentin
2013-04-24 17:34   ` Eduardo Valentin
2013-04-24 23:40     ` Zhang Rui
2013-04-17 17:12 ` [PATCH 29/30] thermal: cpu_cooling: remove unused symbols on cpu_cooling.h Eduardo Valentin
2013-04-17 17:12 ` [PATCH 30/30] thermal: cpu_cooling: improve line breaking Eduardo Valentin
2013-04-17 20:32 ` [PATCH 00/30] thermal: cpu_cooling: code improvements Eduardo Valentin
2013-04-22  2:34   ` amit daniel kachhap
2013-04-22 13:07     ` Eduardo Valentin

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).