linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* From: Eduardo Valentin <eduardo.valentin@ti.com>
@ 2013-04-08 16:07 Eduardo Valentin
  2013-04-08 16:07 ` [PATCH RESEND 01/11] thermal: use strlcpy instead of strcpy Eduardo Valentin
                   ` (11 more replies)
  0 siblings, 12 replies; 31+ messages in thread
From: Eduardo Valentin @ 2013-04-08 16:07 UTC (permalink / raw)
  To: rui.zhang; +Cc: linux-pm, linux-kernel



Here is a sequence of fixes and documentation improvements
thermal code base. This should be first of a series of changes
I am planing to send out.

On this very first there is no change in functionality, as
the patches only change symbol names and updates kernel-doc
comments and their formants.



Eduardo Valentin (11):
  thermal: use strlcpy instead of strcpy
  thermal: update driver license
  thermal: rename notify_thermal_framework to thermal_notify_framework
  thermal: rename get_thermal_instance to thermal_instance_get
  thermal: rename get_tz_trend to thermal_zone_trend_get
  thermal: use EXPORT_SYMBOL_GPL
  thermal: update kernel-doc for thermal_zone_bind_cooling_device
  thermal: update kernel-doc for thermal_zone_unbind_cooling_device
  thermal: update kernel-doc for thermal_cooling_device_register
  thermal: update kernel-doc for create_trip_attrs
  thermal: update kernel-doc for thermal_zone_device_register

 Documentation/thermal/sysfs-api.txt |    6 +-
 drivers/thermal/fair_share.c        |    2 +-
 drivers/thermal/step_wise.c         |    2 +-
 drivers/thermal/thermal_sys.c       |   90 ++++++++++++++++++++++++-----------
 include/linux/thermal.h             |    6 +-
 5 files changed, 70 insertions(+), 36 deletions(-)

-- 
1.7.7.1.488.ge8e1c


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

* [PATCH RESEND 01/11] thermal: use strlcpy instead of strcpy
  2013-04-08 16:07 From: Eduardo Valentin <eduardo.valentin@ti.com> Eduardo Valentin
@ 2013-04-08 16:07 ` Eduardo Valentin
  2013-04-17 15:36   ` Zhang Rui
  2013-04-08 16:07 ` [PATCH RESEND 02/11] thermal: update driver license Eduardo Valentin
                   ` (10 subsequent siblings)
  11 siblings, 1 reply; 31+ messages in thread
From: Eduardo Valentin @ 2013-04-08 16:07 UTC (permalink / raw)
  To: rui.zhang; +Cc: linux-pm, linux-kernel, Eduardo Valentin

For memory boundaries safety, use strlcpy instead of strcpy.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/thermal_sys.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
index 5b7863a..7875607 100644
--- a/drivers/thermal/thermal_sys.c
+++ b/drivers/thermal/thermal_sys.c
@@ -1289,7 +1289,7 @@ thermal_cooling_device_register(char *type, void *devdata,
 		return ERR_PTR(result);
 	}
 
-	strcpy(cdev->type, type ? : "");
+	strlcpy(cdev->type, type ? : "", sizeof(cdev->type));
 	mutex_init(&cdev->lock);
 	INIT_LIST_HEAD(&cdev->thermal_instances);
 	cdev->ops = ops;
@@ -1594,7 +1594,7 @@ struct thermal_zone_device *thermal_zone_device_register(const char *type,
 		return ERR_PTR(result);
 	}
 
-	strcpy(tz->type, type ? : "");
+	strlcpy(tz->type, type ? : "", sizeof(tz->type));
 	tz->ops = ops;
 	tz->tzp = tzp;
 	tz->device.class = &thermal_class;
-- 
1.7.7.1.488.ge8e1c


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

* [PATCH RESEND 02/11] thermal: update driver license
  2013-04-08 16:07 From: Eduardo Valentin <eduardo.valentin@ti.com> Eduardo Valentin
  2013-04-08 16:07 ` [PATCH RESEND 01/11] thermal: use strlcpy instead of strcpy Eduardo Valentin
@ 2013-04-08 16:07 ` Eduardo Valentin
  2013-04-08 16:07 ` [PATCH RESEND 03/11] thermal: rename notify_thermal_framework to thermal_notify_framework Eduardo Valentin
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 31+ messages in thread
From: Eduardo Valentin @ 2013-04-08 16:07 UTC (permalink / raw)
  To: rui.zhang; +Cc: linux-pm, linux-kernel, Eduardo Valentin

As per the comment at the top of this file, this is a GPLv2 driver.
This patch updates the driver license accordingly.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/thermal_sys.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
index 7875607..9542600 100644
--- a/drivers/thermal/thermal_sys.c
+++ b/drivers/thermal/thermal_sys.c
@@ -40,7 +40,7 @@
 
 MODULE_AUTHOR("Zhang Rui");
 MODULE_DESCRIPTION("Generic thermal management sysfs support");
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("GPL v2");
 
 static DEFINE_IDR(thermal_tz_idr);
 static DEFINE_IDR(thermal_cdev_idr);
-- 
1.7.7.1.488.ge8e1c


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

* [PATCH RESEND 03/11] thermal: rename notify_thermal_framework to thermal_notify_framework
  2013-04-08 16:07 From: Eduardo Valentin <eduardo.valentin@ti.com> Eduardo Valentin
  2013-04-08 16:07 ` [PATCH RESEND 01/11] thermal: use strlcpy instead of strcpy Eduardo Valentin
  2013-04-08 16:07 ` [PATCH RESEND 02/11] thermal: update driver license Eduardo Valentin
@ 2013-04-08 16:07 ` Eduardo Valentin
  2013-04-17 15:37   ` Zhang Rui
  2013-04-08 16:07 ` [PATCH RESEND 04/11] thermal: rename get_thermal_instance to thermal_instance_get Eduardo Valentin
                   ` (8 subsequent siblings)
  11 siblings, 1 reply; 31+ messages in thread
From: Eduardo Valentin @ 2013-04-08 16:07 UTC (permalink / raw)
  To: rui.zhang; +Cc: linux-pm, linux-kernel, Eduardo Valentin

To follow the prefix names used by the thermal exported functions,
this patch renames notify_thermal_framework to thermal_notify_framework.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 Documentation/thermal/sysfs-api.txt |    2 +-
 drivers/thermal/thermal_sys.c       |    6 +++---
 include/linux/thermal.h             |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Documentation/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt
index 6859661..4b23190 100644
--- a/Documentation/thermal/sysfs-api.txt
+++ b/Documentation/thermal/sysfs-api.txt
@@ -363,7 +363,7 @@ This function returns the thermal_instance corresponding to a given
 {thermal_zone, cooling_device, trip_point} combination. Returns NULL
 if such an instance does not exist.
 
-5.3:notify_thermal_framework:
+5.3:thermal_notify_framework:
 This function handles the trip events from sensor drivers. It starts
 throttling the cooling devices according to the policy configured.
 For CRITICAL and HOT trip points, this notifies the respective drivers,
diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
index 9542600..ffaf6d3 100644
--- a/drivers/thermal/thermal_sys.c
+++ b/drivers/thermal/thermal_sys.c
@@ -1420,7 +1420,7 @@ void thermal_cdev_update(struct thermal_cooling_device *cdev)
 EXPORT_SYMBOL(thermal_cdev_update);
 
 /**
- * notify_thermal_framework - Sensor drivers use this API to notify framework
+ * thermal_notify_framework - Sensor drivers use this API to notify framework
  * @tz:		thermal zone device
  * @trip:	indicates which trip point has been crossed
  *
@@ -1431,11 +1431,11 @@ EXPORT_SYMBOL(thermal_cdev_update);
  * The throttling policy is based on the configured platform data; if no
  * platform data is provided, this uses the step_wise throttling policy.
  */
-void notify_thermal_framework(struct thermal_zone_device *tz, int trip)
+void thermal_notify_framework(struct thermal_zone_device *tz, int trip)
 {
 	handle_thermal_trip(tz, trip);
 }
-EXPORT_SYMBOL(notify_thermal_framework);
+EXPORT_SYMBOL(thermal_notify_framework);
 
 /**
  * create_trip_attrs - create attributes for trip points
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index f0bd7f9..e8ec9d8 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -242,7 +242,7 @@ int get_tz_trend(struct thermal_zone_device *, int);
 struct thermal_instance *get_thermal_instance(struct thermal_zone_device *,
 		struct thermal_cooling_device *, int);
 void thermal_cdev_update(struct thermal_cooling_device *);
-void notify_thermal_framework(struct thermal_zone_device *, int);
+void thermal_notify_framework(struct thermal_zone_device *, int);
 
 int thermal_register_governor(struct thermal_governor *);
 void thermal_unregister_governor(struct thermal_governor *);
-- 
1.7.7.1.488.ge8e1c


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

* [PATCH RESEND 04/11] thermal: rename get_thermal_instance to thermal_instance_get
  2013-04-08 16:07 From: Eduardo Valentin <eduardo.valentin@ti.com> Eduardo Valentin
                   ` (2 preceding siblings ...)
  2013-04-08 16:07 ` [PATCH RESEND 03/11] thermal: rename notify_thermal_framework to thermal_notify_framework Eduardo Valentin
@ 2013-04-08 16:07 ` Eduardo Valentin
  2013-04-17 15:09   ` Zhang Rui
  2013-04-08 16:07 ` [PATCH RESEND 05/11] thermal: rename get_tz_trend to thermal_zone_trend_get Eduardo Valentin
                   ` (7 subsequent siblings)
  11 siblings, 1 reply; 31+ messages in thread
From: Eduardo Valentin @ 2013-04-08 16:07 UTC (permalink / raw)
  To: rui.zhang; +Cc: linux-pm, linux-kernel, Eduardo Valentin

To follow the prefix names used by the thermal exported functions,
this patch renames get_thermal_instance to thermal_instance_get.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 Documentation/thermal/sysfs-api.txt |    2 +-
 drivers/thermal/fair_share.c        |    2 +-
 drivers/thermal/thermal_sys.c       |    4 ++--
 include/linux/thermal.h             |    2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Documentation/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt
index 4b23190..059b3bf 100644
--- a/Documentation/thermal/sysfs-api.txt
+++ b/Documentation/thermal/sysfs-api.txt
@@ -358,7 +358,7 @@ are supposed to implement the callback. If they don't, the thermal
 framework calculated the trend by comparing the previous and the current
 temperature values.
 
-5.2:get_thermal_instance:
+5.2:thermal_instance_get:
 This function returns the thermal_instance corresponding to a given
 {thermal_zone, cooling_device, trip_point} combination. Returns NULL
 if such an instance does not exist.
diff --git a/drivers/thermal/fair_share.c b/drivers/thermal/fair_share.c
index 792479f..f629446 100644
--- a/drivers/thermal/fair_share.c
+++ b/drivers/thermal/fair_share.c
@@ -95,7 +95,7 @@ static int fair_share_throttle(struct thermal_zone_device *tz, int trip)
 			continue;
 
 		cdev = tzp->tbp[i].cdev;
-		instance = get_thermal_instance(tz, cdev, trip);
+		instance = thermal_instance_get(tz, cdev, trip);
 		if (!instance)
 			continue;
 
diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
index ffaf6d3..44e89c0 100644
--- a/drivers/thermal/thermal_sys.c
+++ b/drivers/thermal/thermal_sys.c
@@ -170,7 +170,7 @@ int get_tz_trend(struct thermal_zone_device *tz, int trip)
 }
 EXPORT_SYMBOL(get_tz_trend);
 
-struct thermal_instance *get_thermal_instance(struct thermal_zone_device *tz,
+struct thermal_instance *thermal_instance_get(struct thermal_zone_device *tz,
 			struct thermal_cooling_device *cdev, int trip)
 {
 	struct thermal_instance *pos = NULL;
@@ -191,7 +191,7 @@ struct thermal_instance *get_thermal_instance(struct thermal_zone_device *tz,
 
 	return target_instance;
 }
-EXPORT_SYMBOL(get_thermal_instance);
+EXPORT_SYMBOL(thermal_instance_get);
 
 static void print_bind_err_msg(struct thermal_zone_device *tz,
 			struct thermal_cooling_device *cdev, int ret)
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index e8ec9d8..e2a49e1 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -239,7 +239,7 @@ struct thermal_cooling_device *thermal_cooling_device_register(char *, void *,
 void thermal_cooling_device_unregister(struct thermal_cooling_device *);
 
 int get_tz_trend(struct thermal_zone_device *, int);
-struct thermal_instance *get_thermal_instance(struct thermal_zone_device *,
+struct thermal_instance *thermal_instance_get(struct thermal_zone_device *,
 		struct thermal_cooling_device *, int);
 void thermal_cdev_update(struct thermal_cooling_device *);
 void thermal_notify_framework(struct thermal_zone_device *, int);
-- 
1.7.7.1.488.ge8e1c


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

* [PATCH RESEND 05/11] thermal: rename get_tz_trend to thermal_zone_trend_get
  2013-04-08 16:07 From: Eduardo Valentin <eduardo.valentin@ti.com> Eduardo Valentin
                   ` (3 preceding siblings ...)
  2013-04-08 16:07 ` [PATCH RESEND 04/11] thermal: rename get_thermal_instance to thermal_instance_get Eduardo Valentin
@ 2013-04-08 16:07 ` Eduardo Valentin
  2013-04-17 15:10   ` Zhang Rui
  2013-04-08 16:07 ` [PATCH RESEND 06/11] thermal: use EXPORT_SYMBOL_GPL Eduardo Valentin
                   ` (6 subsequent siblings)
  11 siblings, 1 reply; 31+ messages in thread
From: Eduardo Valentin @ 2013-04-08 16:07 UTC (permalink / raw)
  To: rui.zhang; +Cc: linux-pm, linux-kernel, Eduardo Valentin

To follow the prefix names used by the thermal exported functions,
this patch renames get_tz_trend to thermal_zone_trend_get.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 Documentation/thermal/sysfs-api.txt |    2 +-
 drivers/thermal/step_wise.c         |    2 +-
 drivers/thermal/thermal_sys.c       |    4 ++--
 include/linux/thermal.h             |    2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Documentation/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt
index 059b3bf..a9abb84 100644
--- a/Documentation/thermal/sysfs-api.txt
+++ b/Documentation/thermal/sysfs-api.txt
@@ -351,7 +351,7 @@ crosses any of the configured thresholds.
 
 5. Export Symbol APIs:
 
-5.1: get_tz_trend:
+5.1: thermal_zone_trend_get:
 This function returns the trend of a thermal zone, i.e the rate of change
 of temperature of the thermal zone. Ideally, the thermal sensor drivers
 are supposed to implement the callback. If they don't, the thermal
diff --git a/drivers/thermal/step_wise.c b/drivers/thermal/step_wise.c
index 407cde3..a640e2b 100644
--- a/drivers/thermal/step_wise.c
+++ b/drivers/thermal/step_wise.c
@@ -116,7 +116,7 @@ static void thermal_zone_trip_update(struct thermal_zone_device *tz, int trip)
 		tz->ops->get_trip_type(tz, trip, &trip_type);
 	}
 
-	trend = get_tz_trend(tz, trip);
+	trend = thermal_zone_trend_get(tz, trip);
 
 	if (tz->temperature >= trip_temp)
 		throttle = true;
diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
index 44e89c0..242c82a 100644
--- a/drivers/thermal/thermal_sys.c
+++ b/drivers/thermal/thermal_sys.c
@@ -153,7 +153,7 @@ static void release_idr(struct idr *idr, struct mutex *lock, int id)
 		mutex_unlock(lock);
 }
 
-int get_tz_trend(struct thermal_zone_device *tz, int trip)
+int thermal_zone_trend_get(struct thermal_zone_device *tz, int trip)
 {
 	enum thermal_trend trend;
 
@@ -168,7 +168,7 @@ int get_tz_trend(struct thermal_zone_device *tz, int trip)
 
 	return trend;
 }
-EXPORT_SYMBOL(get_tz_trend);
+EXPORT_SYMBOL(thermal_zone_trend_get);
 
 struct thermal_instance *thermal_instance_get(struct thermal_zone_device *tz,
 			struct thermal_cooling_device *cdev, int trip)
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index e2a49e1..542a39c 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -238,7 +238,7 @@ struct thermal_cooling_device *thermal_cooling_device_register(char *, void *,
 		const struct thermal_cooling_device_ops *);
 void thermal_cooling_device_unregister(struct thermal_cooling_device *);
 
-int get_tz_trend(struct thermal_zone_device *, int);
+int thermal_zone_trend_get(struct thermal_zone_device *, int);
 struct thermal_instance *thermal_instance_get(struct thermal_zone_device *,
 		struct thermal_cooling_device *, int);
 void thermal_cdev_update(struct thermal_cooling_device *);
-- 
1.7.7.1.488.ge8e1c


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

* [PATCH RESEND 06/11] thermal: use EXPORT_SYMBOL_GPL
  2013-04-08 16:07 From: Eduardo Valentin <eduardo.valentin@ti.com> Eduardo Valentin
                   ` (4 preceding siblings ...)
  2013-04-08 16:07 ` [PATCH RESEND 05/11] thermal: rename get_tz_trend to thermal_zone_trend_get Eduardo Valentin
@ 2013-04-08 16:07 ` Eduardo Valentin
  2013-04-17 15:20   ` Zhang Rui
  2013-04-08 16:07 ` [PATCH RESEND 07/11] thermal: update kernel-doc for thermal_zone_bind_cooling_device Eduardo Valentin
                   ` (5 subsequent siblings)
  11 siblings, 1 reply; 31+ messages in thread
From: Eduardo Valentin @ 2013-04-08 16:07 UTC (permalink / raw)
  To: rui.zhang; +Cc: linux-pm, linux-kernel, Eduardo Valentin

Restrict usage of GPL modules.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/thermal_sys.c |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
index 242c82a..602596e 100644
--- a/drivers/thermal/thermal_sys.c
+++ b/drivers/thermal/thermal_sys.c
@@ -168,7 +168,7 @@ int thermal_zone_trend_get(struct thermal_zone_device *tz, int trip)
 
 	return trend;
 }
-EXPORT_SYMBOL(thermal_zone_trend_get);
+EXPORT_SYMBOL_GPL(thermal_zone_trend_get);
 
 struct thermal_instance *thermal_instance_get(struct thermal_zone_device *tz,
 			struct thermal_cooling_device *cdev, int trip)
@@ -191,7 +191,7 @@ struct thermal_instance *thermal_instance_get(struct thermal_zone_device *tz,
 
 	return target_instance;
 }
-EXPORT_SYMBOL(thermal_instance_get);
+EXPORT_SYMBOL_GPL(thermal_instance_get);
 
 static void print_bind_err_msg(struct thermal_zone_device *tz,
 			struct thermal_cooling_device *cdev, int ret)
@@ -434,7 +434,7 @@ void thermal_zone_device_update(struct thermal_zone_device *tz)
 	for (count = 0; count < tz->trips; count++)
 		handle_thermal_trip(tz, count);
 }
-EXPORT_SYMBOL(thermal_zone_device_update);
+EXPORT_SYMBOL_GPL(thermal_zone_device_update);
 
 static void thermal_zone_device_check(struct work_struct *work)
 {
@@ -1197,7 +1197,7 @@ free_mem:
 	kfree(dev);
 	return result;
 }
-EXPORT_SYMBOL(thermal_zone_bind_cooling_device);
+EXPORT_SYMBOL_GPL(thermal_zone_bind_cooling_device);
 
 /**
  * thermal_zone_unbind_cooling_device - unbind a cooling device from a thermal zone
@@ -1237,7 +1237,7 @@ unbind:
 	kfree(pos);
 	return 0;
 }
-EXPORT_SYMBOL(thermal_zone_unbind_cooling_device);
+EXPORT_SYMBOL_GPL(thermal_zone_unbind_cooling_device);
 
 static void thermal_release(struct device *dev)
 {
@@ -1334,7 +1334,7 @@ unregister:
 	device_unregister(&cdev->device);
 	return ERR_PTR(result);
 }
-EXPORT_SYMBOL(thermal_cooling_device_register);
+EXPORT_SYMBOL_GPL(thermal_cooling_device_register);
 
 /**
  * thermal_cooling_device_unregister - removes the registered thermal cooling device
@@ -1394,7 +1394,7 @@ void thermal_cooling_device_unregister(struct thermal_cooling_device *cdev)
 	device_unregister(&cdev->device);
 	return;
 }
-EXPORT_SYMBOL(thermal_cooling_device_unregister);
+EXPORT_SYMBOL_GPL(thermal_cooling_device_unregister);
 
 void thermal_cdev_update(struct thermal_cooling_device *cdev)
 {
@@ -1417,7 +1417,7 @@ void thermal_cdev_update(struct thermal_cooling_device *cdev)
 	cdev->ops->set_cur_state(cdev, target);
 	cdev->updated = true;
 }
-EXPORT_SYMBOL(thermal_cdev_update);
+EXPORT_SYMBOL_GPL(thermal_cdev_update);
 
 /**
  * thermal_notify_framework - Sensor drivers use this API to notify framework
@@ -1435,7 +1435,7 @@ void thermal_notify_framework(struct thermal_zone_device *tz, int trip)
 {
 	handle_thermal_trip(tz, trip);
 }
-EXPORT_SYMBOL(thermal_notify_framework);
+EXPORT_SYMBOL_GPL(thermal_notify_framework);
 
 /**
  * create_trip_attrs - create attributes for trip points
@@ -1687,7 +1687,7 @@ unregister:
 	device_unregister(&tz->device);
 	return ERR_PTR(result);
 }
-EXPORT_SYMBOL(thermal_zone_device_register);
+EXPORT_SYMBOL_GPL(thermal_zone_device_register);
 
 /**
  * thermal_device_unregister - removes the registered thermal zone device
@@ -1754,7 +1754,7 @@ void thermal_zone_device_unregister(struct thermal_zone_device *tz)
 	device_unregister(&tz->device);
 	return;
 }
-EXPORT_SYMBOL(thermal_zone_device_unregister);
+EXPORT_SYMBOL_GPL(thermal_zone_device_unregister);
 
 #ifdef CONFIG_NET
 static struct genl_family thermal_event_genl_family = {
@@ -1832,7 +1832,7 @@ int thermal_generate_netlink_event(struct thermal_zone_device *tz,
 
 	return result;
 }
-EXPORT_SYMBOL(thermal_generate_netlink_event);
+EXPORT_SYMBOL_GPL(thermal_generate_netlink_event);
 
 static int genetlink_init(void)
 {
-- 
1.7.7.1.488.ge8e1c


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

* [PATCH RESEND 07/11] thermal: update kernel-doc for thermal_zone_bind_cooling_device
  2013-04-08 16:07 From: Eduardo Valentin <eduardo.valentin@ti.com> Eduardo Valentin
                   ` (5 preceding siblings ...)
  2013-04-08 16:07 ` [PATCH RESEND 06/11] thermal: use EXPORT_SYMBOL_GPL Eduardo Valentin
@ 2013-04-08 16:07 ` Eduardo Valentin
  2013-04-17 15:26   ` Zhang Rui
  2013-04-08 16:07 ` [PATCH RESEND 08/11] thermal: update kernel-doc for thermal_zone_unbind_cooling_device Eduardo Valentin
                   ` (4 subsequent siblings)
  11 siblings, 1 reply; 31+ messages in thread
From: Eduardo Valentin @ 2013-04-08 16:07 UTC (permalink / raw)
  To: rui.zhang; +Cc: linux-pm, linux-kernel, Eduardo Valentin

This patch updates the documentation for thermal_zone_bind_cooling_device
and removes the warnings generated by scripts/kernel-doc -v.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/thermal_sys.c |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
index 602596e..8acaab6 100644
--- a/drivers/thermal/thermal_sys.c
+++ b/drivers/thermal/thermal_sys.c
@@ -1097,13 +1097,23 @@ thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz)
 #endif
 
 /**
- * thermal_zone_bind_cooling_device - bind a cooling device to a thermal zone
- * @tz:		thermal zone device
+ * thermal_zone_bind_cooling_device() - bind a cooling device to a thermal zone
+ * @tz:		pointer to struct thermal_zone_device
  * @trip:	indicates which trip point the cooling devices is
  *		associated with in this thermal zone.
- * @cdev:	thermal cooling device
+ * @cdev:	pointer to struct thermal_cooling_device
+ * @upper:	the Maximum cooling state for this trip point.
+ *		THERMAL_NO_LIMIT means no upper limit,
+ *		and the cooling device can be in max_state.
+ * @lower:	the Minimum cooling state can be used for this trip point.
+ *		THERMAL_NO_LIMIT means no lower limit,
+ *		and the cooling device can be in cooling state 0.
  *
+ * This interface function bind a thermal cooling device to the certain trip
+ * point of a thermal zone device.
  * This function is usually called in the thermal zone device .bind callback.
+ *
+ * Return: 0 on success, the proper error value otherwise.
  */
 int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz,
 				     int trip,
-- 
1.7.7.1.488.ge8e1c


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

* [PATCH RESEND 08/11] thermal: update kernel-doc for thermal_zone_unbind_cooling_device
  2013-04-08 16:07 From: Eduardo Valentin <eduardo.valentin@ti.com> Eduardo Valentin
                   ` (6 preceding siblings ...)
  2013-04-08 16:07 ` [PATCH RESEND 07/11] thermal: update kernel-doc for thermal_zone_bind_cooling_device Eduardo Valentin
@ 2013-04-08 16:07 ` Eduardo Valentin
  2013-04-17 15:29   ` Zhang Rui
  2013-04-08 16:07 ` [PATCH RESEND 09/11] thermal: update kernel-doc for thermal_cooling_device_register Eduardo Valentin
                   ` (3 subsequent siblings)
  11 siblings, 1 reply; 31+ messages in thread
From: Eduardo Valentin @ 2013-04-08 16:07 UTC (permalink / raw)
  To: rui.zhang; +Cc: linux-pm, linux-kernel, Eduardo Valentin

This patch updates the documentation for thermal_zone_unbind_cooling_device
and removes the warnings generated by scripts/kernel-doc -v.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/thermal_sys.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
index 8acaab6..98d7d53 100644
--- a/drivers/thermal/thermal_sys.c
+++ b/drivers/thermal/thermal_sys.c
@@ -1210,13 +1210,18 @@ free_mem:
 EXPORT_SYMBOL_GPL(thermal_zone_bind_cooling_device);
 
 /**
- * thermal_zone_unbind_cooling_device - unbind a cooling device from a thermal zone
- * @tz:		thermal zone device
+ * thermal_zone_unbind_cooling_device() - unbind a cooling device from a
+ *					  thermal zone.
+ * @tz:		pointer to a struct thermal_zone_device.
  * @trip:	indicates which trip point the cooling devices is
  *		associated with in this thermal zone.
- * @cdev:	thermal cooling device
+ * @cdev:	pointer to a struct thermal_cooling_device.
  *
+ * This interface function unbind a thermal cooling device from the certain
+ * trip point of a thermal zone device.
  * This function is usually called in the thermal zone device .unbind callback.
+ *
+ * Return: 0 on success, the proper error value otherwise.
  */
 int thermal_zone_unbind_cooling_device(struct thermal_zone_device *tz,
 				       int trip,
-- 
1.7.7.1.488.ge8e1c


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

* [PATCH RESEND 09/11] thermal: update kernel-doc for thermal_cooling_device_register
  2013-04-08 16:07 From: Eduardo Valentin <eduardo.valentin@ti.com> Eduardo Valentin
                   ` (7 preceding siblings ...)
  2013-04-08 16:07 ` [PATCH RESEND 08/11] thermal: update kernel-doc for thermal_zone_unbind_cooling_device Eduardo Valentin
@ 2013-04-08 16:07 ` Eduardo Valentin
  2013-04-17 15:31   ` Zhang Rui
  2013-04-08 16:07 ` [PATCH RESEND 10/11] thermal: update kernel-doc for create_trip_attrs Eduardo Valentin
                   ` (2 subsequent siblings)
  11 siblings, 1 reply; 31+ messages in thread
From: Eduardo Valentin @ 2013-04-08 16:07 UTC (permalink / raw)
  To: rui.zhang; +Cc: linux-pm, linux-kernel, Eduardo Valentin

This patch updates the documentation for thermal_cooling_device_register
and removes the warnings generated by scripts/kernel-doc -v.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/thermal_sys.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
index 98d7d53..f3a4e17 100644
--- a/drivers/thermal/thermal_sys.c
+++ b/drivers/thermal/thermal_sys.c
@@ -1275,10 +1275,17 @@ static struct class thermal_class = {
 };
 
 /**
- * thermal_cooling_device_register - register a new thermal cooling device
+ * thermal_cooling_device_register() - register a new thermal cooling device
  * @type:	the thermal cooling device type.
  * @devdata:	device private data.
  * @ops:		standard thermal cooling devices callbacks.
+ *
+ * This interface function adds a new thermal cooling device (fan/processor/...)
+ * to /sys/class/thermal/ folder as cooling_device[0-*]. It tries to bind itself
+ * to all the thermal zone devices register at the same time.
+ *
+ * Return: a pointer to the created struct thermal_cooling_device or an
+ * ERR_PTR. Caller must check return value with IS_ERR*() helpers.
  */
 struct thermal_cooling_device *
 thermal_cooling_device_register(char *type, void *devdata,
-- 
1.7.7.1.488.ge8e1c


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

* [PATCH RESEND 10/11] thermal: update kernel-doc for create_trip_attrs
  2013-04-08 16:07 From: Eduardo Valentin <eduardo.valentin@ti.com> Eduardo Valentin
                   ` (8 preceding siblings ...)
  2013-04-08 16:07 ` [PATCH RESEND 09/11] thermal: update kernel-doc for thermal_cooling_device_register Eduardo Valentin
@ 2013-04-08 16:07 ` Eduardo Valentin
  2013-04-17 15:31   ` Zhang Rui
  2013-04-08 16:07 ` [PATCH RESEND 11/11] thermal: update kernel-doc for thermal_zone_device_register Eduardo Valentin
  2013-04-17 17:15 ` From: Eduardo Valentin <eduardo.valentin@ti.com> Eduardo Valentin
  11 siblings, 1 reply; 31+ messages in thread
From: Eduardo Valentin @ 2013-04-08 16:07 UTC (permalink / raw)
  To: rui.zhang; +Cc: linux-pm, linux-kernel, Eduardo Valentin

This patch updates the documentation for create_trip_attrs
and removes the warnings generated by scripts/kernel-doc -v.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/thermal_sys.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
index f3a4e17..4cff199 100644
--- a/drivers/thermal/thermal_sys.c
+++ b/drivers/thermal/thermal_sys.c
@@ -1460,9 +1460,14 @@ void thermal_notify_framework(struct thermal_zone_device *tz, int trip)
 EXPORT_SYMBOL_GPL(thermal_notify_framework);
 
 /**
- * create_trip_attrs - create attributes for trip points
+ * create_trip_attrs() - create attributes for trip points
  * @tz:		the thermal zone device
  * @mask:	Writeable trip point bitmap.
+ *
+ * helper function to instantiate sysfs entries for every trip
+ * point and its properties of a struct thermal_zone_device.
+ *
+ * Return: 0 on success, the proper error value otherwise.
  */
 static int create_trip_attrs(struct thermal_zone_device *tz, int mask)
 {
-- 
1.7.7.1.488.ge8e1c


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

* [PATCH RESEND 11/11] thermal: update kernel-doc for thermal_zone_device_register
  2013-04-08 16:07 From: Eduardo Valentin <eduardo.valentin@ti.com> Eduardo Valentin
                   ` (9 preceding siblings ...)
  2013-04-08 16:07 ` [PATCH RESEND 10/11] thermal: update kernel-doc for create_trip_attrs Eduardo Valentin
@ 2013-04-08 16:07 ` Eduardo Valentin
  2013-04-17 15:24   ` Zhang Rui
  2013-04-17 17:15 ` From: Eduardo Valentin <eduardo.valentin@ti.com> Eduardo Valentin
  11 siblings, 1 reply; 31+ messages in thread
From: Eduardo Valentin @ 2013-04-08 16:07 UTC (permalink / raw)
  To: rui.zhang; +Cc: linux-pm, linux-kernel, Eduardo Valentin

This patch updates the documentation for thermal_zone_device_register
and removes the warnings generated by scripts/kernel-doc -v.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
---
 drivers/thermal/thermal_sys.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
index 4cff199..5bd95d4 100644
--- a/drivers/thermal/thermal_sys.c
+++ b/drivers/thermal/thermal_sys.c
@@ -1568,7 +1568,7 @@ static void remove_trip_attrs(struct thermal_zone_device *tz)
 }
 
 /**
- * thermal_zone_device_register - register a new thermal zone device
+ * thermal_zone_device_register() - register a new thermal zone device
  * @type:	the thermal zone device type
  * @trips:	the number of trip points the thermal zone support
  * @mask:	a bit string indicating the writeablility of trip points
@@ -1581,8 +1581,15 @@ static void remove_trip_attrs(struct thermal_zone_device *tz)
  *		   whether trip points have been crossed (0 for interrupt
  *		   driven systems)
  *
+ * This interface function adds a new thermal zone device (sensor) to
+ * /sys/class/thermal folder as thermal_zone[0-*]. It tries to bind all the
+ * thermal cooling devices registered at the same time.
  * thermal_zone_device_unregister() must be called when the device is no
  * longer needed. The passive cooling depends on the .get_trend() return value.
+ *
+ * Return: a pointer to the created struct thermal_zone_device or an
+ * in case of error, an ERR_PTR. Caller must check return value with
+ * IS_ERR*() helpers.
  */
 struct thermal_zone_device *thermal_zone_device_register(const char *type,
 	int trips, int mask, void *devdata,
-- 
1.7.7.1.488.ge8e1c


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

* Re: [PATCH RESEND 04/11] thermal: rename get_thermal_instance to thermal_instance_get
  2013-04-08 16:07 ` [PATCH RESEND 04/11] thermal: rename get_thermal_instance to thermal_instance_get Eduardo Valentin
@ 2013-04-17 15:09   ` Zhang Rui
  2013-04-17 19:18     ` Eduardo Valentin
  0 siblings, 1 reply; 31+ messages in thread
From: Zhang Rui @ 2013-04-17 15:09 UTC (permalink / raw)
  To: Eduardo Valentin; +Cc: linux-pm, linux-kernel

On Mon, 2013-04-08 at 12:07 -0400, Eduardo Valentin wrote:
> To follow the prefix names used by the thermal exported functions,
> this patch renames get_thermal_instance to thermal_instance_get.
> 
> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>

NACK.

with the change of building all thermal governors into thermal_sys
module, get_thermal_instance becomes an internally helper function,
rather than external API.
thus I think it is okay to use the current name get_thermal_instance.
But you remind me a need a cleanup patch to remove these APIs. :)

thanks,
rui
> ---
>  Documentation/thermal/sysfs-api.txt |    2 +-
>  drivers/thermal/fair_share.c        |    2 +-
>  drivers/thermal/thermal_sys.c       |    4 ++--
>  include/linux/thermal.h             |    2 +-
>  4 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt
> index 4b23190..059b3bf 100644
> --- a/Documentation/thermal/sysfs-api.txt
> +++ b/Documentation/thermal/sysfs-api.txt
> @@ -358,7 +358,7 @@ are supposed to implement the callback. If they don't, the thermal
>  framework calculated the trend by comparing the previous and the current
>  temperature values.
>  
> -5.2:get_thermal_instance:
> +5.2:thermal_instance_get:
>  This function returns the thermal_instance corresponding to a given
>  {thermal_zone, cooling_device, trip_point} combination. Returns NULL
>  if such an instance does not exist.
> diff --git a/drivers/thermal/fair_share.c b/drivers/thermal/fair_share.c
> index 792479f..f629446 100644
> --- a/drivers/thermal/fair_share.c
> +++ b/drivers/thermal/fair_share.c
> @@ -95,7 +95,7 @@ static int fair_share_throttle(struct thermal_zone_device *tz, int trip)
>  			continue;
>  
>  		cdev = tzp->tbp[i].cdev;
> -		instance = get_thermal_instance(tz, cdev, trip);
> +		instance = thermal_instance_get(tz, cdev, trip);
>  		if (!instance)
>  			continue;
>  
> diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
> index ffaf6d3..44e89c0 100644
> --- a/drivers/thermal/thermal_sys.c
> +++ b/drivers/thermal/thermal_sys.c
> @@ -170,7 +170,7 @@ int get_tz_trend(struct thermal_zone_device *tz, int trip)
>  }
>  EXPORT_SYMBOL(get_tz_trend);
>  
> -struct thermal_instance *get_thermal_instance(struct thermal_zone_device *tz,
> +struct thermal_instance *thermal_instance_get(struct thermal_zone_device *tz,
>  			struct thermal_cooling_device *cdev, int trip)
>  {
>  	struct thermal_instance *pos = NULL;
> @@ -191,7 +191,7 @@ struct thermal_instance *get_thermal_instance(struct thermal_zone_device *tz,
>  
>  	return target_instance;
>  }
> -EXPORT_SYMBOL(get_thermal_instance);
> +EXPORT_SYMBOL(thermal_instance_get);
>  
>  static void print_bind_err_msg(struct thermal_zone_device *tz,
>  			struct thermal_cooling_device *cdev, int ret)
> diff --git a/include/linux/thermal.h b/include/linux/thermal.h
> index e8ec9d8..e2a49e1 100644
> --- a/include/linux/thermal.h
> +++ b/include/linux/thermal.h
> @@ -239,7 +239,7 @@ struct thermal_cooling_device *thermal_cooling_device_register(char *, void *,
>  void thermal_cooling_device_unregister(struct thermal_cooling_device *);
>  
>  int get_tz_trend(struct thermal_zone_device *, int);
> -struct thermal_instance *get_thermal_instance(struct thermal_zone_device *,
> +struct thermal_instance *thermal_instance_get(struct thermal_zone_device *,
>  		struct thermal_cooling_device *, int);
>  void thermal_cdev_update(struct thermal_cooling_device *);
>  void thermal_notify_framework(struct thermal_zone_device *, int);



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

* Re: [PATCH RESEND 05/11] thermal: rename get_tz_trend to thermal_zone_trend_get
  2013-04-08 16:07 ` [PATCH RESEND 05/11] thermal: rename get_tz_trend to thermal_zone_trend_get Eduardo Valentin
@ 2013-04-17 15:10   ` Zhang Rui
  2013-04-17 19:20     ` Eduardo Valentin
  0 siblings, 1 reply; 31+ messages in thread
From: Zhang Rui @ 2013-04-17 15:10 UTC (permalink / raw)
  To: Eduardo Valentin; +Cc: linux-pm, linux-kernel

On Mon, 2013-04-08 at 12:07 -0400, Eduardo Valentin wrote:
> To follow the prefix names used by the thermal exported functions,
> this patch renames get_tz_trend to thermal_zone_trend_get.
> 
> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>

NACK.

get_tz_trend will not be exported as API any more.

thanks,
rui
> ---
>  Documentation/thermal/sysfs-api.txt |    2 +-
>  drivers/thermal/step_wise.c         |    2 +-
>  drivers/thermal/thermal_sys.c       |    4 ++--
>  include/linux/thermal.h             |    2 +-
>  4 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt
> index 059b3bf..a9abb84 100644
> --- a/Documentation/thermal/sysfs-api.txt
> +++ b/Documentation/thermal/sysfs-api.txt
> @@ -351,7 +351,7 @@ crosses any of the configured thresholds.
>  
>  5. Export Symbol APIs:
>  
> -5.1: get_tz_trend:
> +5.1: thermal_zone_trend_get:
>  This function returns the trend of a thermal zone, i.e the rate of change
>  of temperature of the thermal zone. Ideally, the thermal sensor drivers
>  are supposed to implement the callback. If they don't, the thermal
> diff --git a/drivers/thermal/step_wise.c b/drivers/thermal/step_wise.c
> index 407cde3..a640e2b 100644
> --- a/drivers/thermal/step_wise.c
> +++ b/drivers/thermal/step_wise.c
> @@ -116,7 +116,7 @@ static void thermal_zone_trip_update(struct thermal_zone_device *tz, int trip)
>  		tz->ops->get_trip_type(tz, trip, &trip_type);
>  	}
>  
> -	trend = get_tz_trend(tz, trip);
> +	trend = thermal_zone_trend_get(tz, trip);
>  
>  	if (tz->temperature >= trip_temp)
>  		throttle = true;
> diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
> index 44e89c0..242c82a 100644
> --- a/drivers/thermal/thermal_sys.c
> +++ b/drivers/thermal/thermal_sys.c
> @@ -153,7 +153,7 @@ static void release_idr(struct idr *idr, struct mutex *lock, int id)
>  		mutex_unlock(lock);
>  }
>  
> -int get_tz_trend(struct thermal_zone_device *tz, int trip)
> +int thermal_zone_trend_get(struct thermal_zone_device *tz, int trip)
>  {
>  	enum thermal_trend trend;
>  
> @@ -168,7 +168,7 @@ int get_tz_trend(struct thermal_zone_device *tz, int trip)
>  
>  	return trend;
>  }
> -EXPORT_SYMBOL(get_tz_trend);
> +EXPORT_SYMBOL(thermal_zone_trend_get);
>  
>  struct thermal_instance *thermal_instance_get(struct thermal_zone_device *tz,
>  			struct thermal_cooling_device *cdev, int trip)
> diff --git a/include/linux/thermal.h b/include/linux/thermal.h
> index e2a49e1..542a39c 100644
> --- a/include/linux/thermal.h
> +++ b/include/linux/thermal.h
> @@ -238,7 +238,7 @@ struct thermal_cooling_device *thermal_cooling_device_register(char *, void *,
>  		const struct thermal_cooling_device_ops *);
>  void thermal_cooling_device_unregister(struct thermal_cooling_device *);
>  
> -int get_tz_trend(struct thermal_zone_device *, int);
> +int thermal_zone_trend_get(struct thermal_zone_device *, int);
>  struct thermal_instance *thermal_instance_get(struct thermal_zone_device *,
>  		struct thermal_cooling_device *, int);
>  void thermal_cdev_update(struct thermal_cooling_device *);



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

* Re: [PATCH RESEND 06/11] thermal: use EXPORT_SYMBOL_GPL
  2013-04-08 16:07 ` [PATCH RESEND 06/11] thermal: use EXPORT_SYMBOL_GPL Eduardo Valentin
@ 2013-04-17 15:20   ` Zhang Rui
  2013-04-17 19:22     ` Eduardo Valentin
  0 siblings, 1 reply; 31+ messages in thread
From: Zhang Rui @ 2013-04-17 15:20 UTC (permalink / raw)
  To: Eduardo Valentin; +Cc: linux-pm, linux-kernel

On Mon, 2013-04-08 at 12:07 -0400, Eduardo Valentin wrote:
> Restrict usage of GPL modules.
> 
> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>

NACK for
thermal_zone_trend_get/thermal_instance_get/thermal_cdev_update, for the
reasons stated earlier.
ACK for the others.

thanks,
rui
> ---
>  drivers/thermal/thermal_sys.c |   24 ++++++++++++------------
>  1 files changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
> index 242c82a..602596e 100644
> --- a/drivers/thermal/thermal_sys.c
> +++ b/drivers/thermal/thermal_sys.c
> @@ -168,7 +168,7 @@ int thermal_zone_trend_get(struct thermal_zone_device *tz, int trip)
>  
>  	return trend;
>  }
> -EXPORT_SYMBOL(thermal_zone_trend_get);
> +EXPORT_SYMBOL_GPL(thermal_zone_trend_get);
>  
>  struct thermal_instance *thermal_instance_get(struct thermal_zone_device *tz,
>  			struct thermal_cooling_device *cdev, int trip)
> @@ -191,7 +191,7 @@ struct thermal_instance *thermal_instance_get(struct thermal_zone_device *tz,
>  
>  	return target_instance;
>  }
> -EXPORT_SYMBOL(thermal_instance_get);
> +EXPORT_SYMBOL_GPL(thermal_instance_get);
>  
>  static void print_bind_err_msg(struct thermal_zone_device *tz,
>  			struct thermal_cooling_device *cdev, int ret)
> @@ -434,7 +434,7 @@ void thermal_zone_device_update(struct thermal_zone_device *tz)
>  	for (count = 0; count < tz->trips; count++)
>  		handle_thermal_trip(tz, count);
>  }
> -EXPORT_SYMBOL(thermal_zone_device_update);
> +EXPORT_SYMBOL_GPL(thermal_zone_device_update);
>  
>  static void thermal_zone_device_check(struct work_struct *work)
>  {
> @@ -1197,7 +1197,7 @@ free_mem:
>  	kfree(dev);
>  	return result;
>  }
> -EXPORT_SYMBOL(thermal_zone_bind_cooling_device);
> +EXPORT_SYMBOL_GPL(thermal_zone_bind_cooling_device);
>  
>  /**
>   * thermal_zone_unbind_cooling_device - unbind a cooling device from a thermal zone
> @@ -1237,7 +1237,7 @@ unbind:
>  	kfree(pos);
>  	return 0;
>  }
> -EXPORT_SYMBOL(thermal_zone_unbind_cooling_device);
> +EXPORT_SYMBOL_GPL(thermal_zone_unbind_cooling_device);
>  
>  static void thermal_release(struct device *dev)
>  {
> @@ -1334,7 +1334,7 @@ unregister:
>  	device_unregister(&cdev->device);
>  	return ERR_PTR(result);
>  }
> -EXPORT_SYMBOL(thermal_cooling_device_register);
> +EXPORT_SYMBOL_GPL(thermal_cooling_device_register);
>  
>  /**
>   * thermal_cooling_device_unregister - removes the registered thermal cooling device
> @@ -1394,7 +1394,7 @@ void thermal_cooling_device_unregister(struct thermal_cooling_device *cdev)
>  	device_unregister(&cdev->device);
>  	return;
>  }
> -EXPORT_SYMBOL(thermal_cooling_device_unregister);
> +EXPORT_SYMBOL_GPL(thermal_cooling_device_unregister);
>  
>  void thermal_cdev_update(struct thermal_cooling_device *cdev)
>  {
> @@ -1417,7 +1417,7 @@ void thermal_cdev_update(struct thermal_cooling_device *cdev)
>  	cdev->ops->set_cur_state(cdev, target);
>  	cdev->updated = true;
>  }
> -EXPORT_SYMBOL(thermal_cdev_update);
> +EXPORT_SYMBOL_GPL(thermal_cdev_update);
>  
>  /**
>   * thermal_notify_framework - Sensor drivers use this API to notify framework
> @@ -1435,7 +1435,7 @@ void thermal_notify_framework(struct thermal_zone_device *tz, int trip)
>  {
>  	handle_thermal_trip(tz, trip);
>  }
> -EXPORT_SYMBOL(thermal_notify_framework);
> +EXPORT_SYMBOL_GPL(thermal_notify_framework);
>  
>  /**
>   * create_trip_attrs - create attributes for trip points
> @@ -1687,7 +1687,7 @@ unregister:
>  	device_unregister(&tz->device);
>  	return ERR_PTR(result);
>  }
> -EXPORT_SYMBOL(thermal_zone_device_register);
> +EXPORT_SYMBOL_GPL(thermal_zone_device_register);
>  
>  /**
>   * thermal_device_unregister - removes the registered thermal zone device
> @@ -1754,7 +1754,7 @@ void thermal_zone_device_unregister(struct thermal_zone_device *tz)
>  	device_unregister(&tz->device);
>  	return;
>  }
> -EXPORT_SYMBOL(thermal_zone_device_unregister);
> +EXPORT_SYMBOL_GPL(thermal_zone_device_unregister);
>  
>  #ifdef CONFIG_NET
>  static struct genl_family thermal_event_genl_family = {
> @@ -1832,7 +1832,7 @@ int thermal_generate_netlink_event(struct thermal_zone_device *tz,
>  
>  	return result;
>  }
> -EXPORT_SYMBOL(thermal_generate_netlink_event);
> +EXPORT_SYMBOL_GPL(thermal_generate_netlink_event);
>  
>  static int genetlink_init(void)
>  {



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

* Re: [PATCH RESEND 11/11] thermal: update kernel-doc for thermal_zone_device_register
  2013-04-08 16:07 ` [PATCH RESEND 11/11] thermal: update kernel-doc for thermal_zone_device_register Eduardo Valentin
@ 2013-04-17 15:24   ` Zhang Rui
  2013-04-17 19:30     ` Eduardo Valentin
  0 siblings, 1 reply; 31+ messages in thread
From: Zhang Rui @ 2013-04-17 15:24 UTC (permalink / raw)
  To: Eduardo Valentin; +Cc: linux-pm, linux-kernel

On Mon, 2013-04-08 at 12:07 -0400, Eduardo Valentin wrote:
> This patch updates the documentation for thermal_zone_device_register

it is not enough.
parameters including const struct thermal_zone_params *tzp,
int passive_delay, and int polling_delay are missing in the
documentation.

thanks,
rui
> and removes the warnings generated by scripts/kernel-doc -v.
> 
> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>


> ---
>  drivers/thermal/thermal_sys.c |    9 ++++++++-
>  1 files changed, 8 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
> index 4cff199..5bd95d4 100644
> --- a/drivers/thermal/thermal_sys.c
> +++ b/drivers/thermal/thermal_sys.c
> @@ -1568,7 +1568,7 @@ static void remove_trip_attrs(struct thermal_zone_device *tz)
>  }
>  
>  /**
> - * thermal_zone_device_register - register a new thermal zone device
> + * thermal_zone_device_register() - register a new thermal zone device
>   * @type:	the thermal zone device type
>   * @trips:	the number of trip points the thermal zone support
>   * @mask:	a bit string indicating the writeablility of trip points
> @@ -1581,8 +1581,15 @@ static void remove_trip_attrs(struct thermal_zone_device *tz)
>   *		   whether trip points have been crossed (0 for interrupt
>   *		   driven systems)
>   *
> + * This interface function adds a new thermal zone device (sensor) to
> + * /sys/class/thermal folder as thermal_zone[0-*]. It tries to bind all the
> + * thermal cooling devices registered at the same time.
>   * thermal_zone_device_unregister() must be called when the device is no
>   * longer needed. The passive cooling depends on the .get_trend() return value.
> + *
> + * Return: a pointer to the created struct thermal_zone_device or an
> + * in case of error, an ERR_PTR. Caller must check return value with
> + * IS_ERR*() helpers.
>   */
>  struct thermal_zone_device *thermal_zone_device_register(const char *type,
>  	int trips, int mask, void *devdata,



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

* Re: [PATCH RESEND 07/11] thermal: update kernel-doc for thermal_zone_bind_cooling_device
  2013-04-08 16:07 ` [PATCH RESEND 07/11] thermal: update kernel-doc for thermal_zone_bind_cooling_device Eduardo Valentin
@ 2013-04-17 15:26   ` Zhang Rui
  2013-04-17 15:28     ` Zhang Rui
  0 siblings, 1 reply; 31+ messages in thread
From: Zhang Rui @ 2013-04-17 15:26 UTC (permalink / raw)
  To: Eduardo Valentin; +Cc: linux-pm, linux-kernel

On Mon, 2013-04-08 at 12:07 -0400, Eduardo Valentin wrote:
> This patch updates the documentation for thermal_zone_bind_cooling_device
> and removes the warnings generated by scripts/kernel-doc -v.
> 
> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
> ---
>  drivers/thermal/thermal_sys.c |   16 +++++++++++++---
>  1 files changed, 13 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
> index 602596e..8acaab6 100644
> --- a/drivers/thermal/thermal_sys.c
> +++ b/drivers/thermal/thermal_sys.c
> @@ -1097,13 +1097,23 @@ thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz)
>  #endif
>  
>  /**
> - * thermal_zone_bind_cooling_device - bind a cooling device to a thermal zone
> - * @tz:		thermal zone device
> + * thermal_zone_bind_cooling_device() - bind a cooling device to a thermal zone
> + * @tz:		pointer to struct thermal_zone_device
>   * @trip:	indicates which trip point the cooling devices is
>   *		associated with in this thermal zone.
> - * @cdev:	thermal cooling device
> + * @cdev:	pointer to struct thermal_cooling_device
> + * @upper:	the Maximum cooling state for this trip point.
> + *		THERMAL_NO_LIMIT means no upper limit,
> + *		and the cooling device can be in max_state.
> + * @lower:	the Minimum cooling state can be used for this trip point.
> + *		THERMAL_NO_LIMIT means no lower limit,
> + *		and the cooling device can be in cooling state 0.
>   *
good catch.
But we miss this in the comments in drivers/thermal/thermal_core.c as
well.

thanks,
rui
> + * This interface function bind a thermal cooling device to the certain trip
> + * point of a thermal zone device.
>   * This function is usually called in the thermal zone device .bind callback.
> + *
> + * Return: 0 on success, the proper error value otherwise.
>   */
>  int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz,
>  				     int trip,



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

* Re: [PATCH RESEND 07/11] thermal: update kernel-doc for thermal_zone_bind_cooling_device
  2013-04-17 15:26   ` Zhang Rui
@ 2013-04-17 15:28     ` Zhang Rui
  2013-04-17 19:24       ` Eduardo Valentin
  0 siblings, 1 reply; 31+ messages in thread
From: Zhang Rui @ 2013-04-17 15:28 UTC (permalink / raw)
  To: Eduardo Valentin; +Cc: linux-pm, linux-kernel

On Wed, 2013-04-17 at 23:26 +0800, Zhang Rui wrote:
> On Mon, 2013-04-08 at 12:07 -0400, Eduardo Valentin wrote:
> > This patch updates the documentation for thermal_zone_bind_cooling_device
> > and removes the warnings generated by scripts/kernel-doc -v.
> > 
> > Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
> > ---
> >  drivers/thermal/thermal_sys.c |   16 +++++++++++++---
> >  1 files changed, 13 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
> > index 602596e..8acaab6 100644
> > --- a/drivers/thermal/thermal_sys.c
> > +++ b/drivers/thermal/thermal_sys.c
> > @@ -1097,13 +1097,23 @@ thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz)
> >  #endif
> >  
> >  /**
> > - * thermal_zone_bind_cooling_device - bind a cooling device to a thermal zone
> > - * @tz:		thermal zone device
> > + * thermal_zone_bind_cooling_device() - bind a cooling device to a thermal zone
> > + * @tz:		pointer to struct thermal_zone_device
> >   * @trip:	indicates which trip point the cooling devices is
> >   *		associated with in this thermal zone.
> > - * @cdev:	thermal cooling device
> > + * @cdev:	pointer to struct thermal_cooling_device
> > + * @upper:	the Maximum cooling state for this trip point.
> > + *		THERMAL_NO_LIMIT means no upper limit,
> > + *		and the cooling device can be in max_state.
> > + * @lower:	the Minimum cooling state can be used for this trip point.
> > + *		THERMAL_NO_LIMIT means no lower limit,
> > + *		and the cooling device can be in cooling state 0.
> >   *
> good catch.
> But we miss this in the comments in drivers/thermal/thermal_core.c as
> well.
> 
oops, I thought you were changing Documentation/thermal/sys-api.txt.
I must be too sleepy as it is already 11:30PM here.
sorry for the noise.

thanks,
rui
> thanks,
> rui
> > + * This interface function bind a thermal cooling device to the certain trip
> > + * point of a thermal zone device.
> >   * This function is usually called in the thermal zone device .bind callback.
> > + *
> > + * Return: 0 on success, the proper error value otherwise.
> >   */
> >  int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz,
> >  				     int trip,
> 



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

* Re: [PATCH RESEND 08/11] thermal: update kernel-doc for thermal_zone_unbind_cooling_device
  2013-04-08 16:07 ` [PATCH RESEND 08/11] thermal: update kernel-doc for thermal_zone_unbind_cooling_device Eduardo Valentin
@ 2013-04-17 15:29   ` Zhang Rui
  0 siblings, 0 replies; 31+ messages in thread
From: Zhang Rui @ 2013-04-17 15:29 UTC (permalink / raw)
  To: Eduardo Valentin; +Cc: linux-pm, linux-kernel

On Mon, 2013-04-08 at 12:07 -0400, Eduardo Valentin wrote:
> This patch updates the documentation for thermal_zone_unbind_cooling_device
> and removes the warnings generated by scripts/kernel-doc -v.
> 
> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>

I'm fine with this one.

thanks,
rui
> ---
>  drivers/thermal/thermal_sys.c |   11 ++++++++---
>  1 files changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
> index 8acaab6..98d7d53 100644
> --- a/drivers/thermal/thermal_sys.c
> +++ b/drivers/thermal/thermal_sys.c
> @@ -1210,13 +1210,18 @@ free_mem:
>  EXPORT_SYMBOL_GPL(thermal_zone_bind_cooling_device);
>  
>  /**
> - * thermal_zone_unbind_cooling_device - unbind a cooling device from a thermal zone
> - * @tz:		thermal zone device
> + * thermal_zone_unbind_cooling_device() - unbind a cooling device from a
> + *					  thermal zone.
> + * @tz:		pointer to a struct thermal_zone_device.
>   * @trip:	indicates which trip point the cooling devices is
>   *		associated with in this thermal zone.
> - * @cdev:	thermal cooling device
> + * @cdev:	pointer to a struct thermal_cooling_device.
>   *
> + * This interface function unbind a thermal cooling device from the certain
> + * trip point of a thermal zone device.
>   * This function is usually called in the thermal zone device .unbind callback.
> + *
> + * Return: 0 on success, the proper error value otherwise.
>   */
>  int thermal_zone_unbind_cooling_device(struct thermal_zone_device *tz,
>  				       int trip,



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

* Re: [PATCH RESEND 09/11] thermal: update kernel-doc for thermal_cooling_device_register
  2013-04-08 16:07 ` [PATCH RESEND 09/11] thermal: update kernel-doc for thermal_cooling_device_register Eduardo Valentin
@ 2013-04-17 15:31   ` Zhang Rui
  2013-04-17 19:25     ` Eduardo Valentin
  0 siblings, 1 reply; 31+ messages in thread
From: Zhang Rui @ 2013-04-17 15:31 UTC (permalink / raw)
  To: Eduardo Valentin; +Cc: linux-pm, linux-kernel

On Mon, 2013-04-08 at 12:07 -0400, Eduardo Valentin wrote:
> This patch updates the documentation for thermal_cooling_device_register
> and removes the warnings generated by scripts/kernel-doc -v.
> 
> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
> ---
>  drivers/thermal/thermal_sys.c |    9 ++++++++-
>  1 files changed, 8 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
> index 98d7d53..f3a4e17 100644
> --- a/drivers/thermal/thermal_sys.c
> +++ b/drivers/thermal/thermal_sys.c
> @@ -1275,10 +1275,17 @@ static struct class thermal_class = {
>  };
>  
>  /**
> - * thermal_cooling_device_register - register a new thermal cooling device
> + * thermal_cooling_device_register() - register a new thermal cooling device
>   * @type:	the thermal cooling device type.
>   * @devdata:	device private data.
>   * @ops:		standard thermal cooling devices callbacks.
> + *
> + * This interface function adds a new thermal cooling device (fan/processor/...)
> + * to /sys/class/thermal/ folder as cooling_device[0-*]. It tries to bind itself
> + * to all the thermal zone devices register at the same time.

s/register/registered ?

thanks,
rui
> + *
> + * Return: a pointer to the created struct thermal_cooling_device or an
> + * ERR_PTR. Caller must check return value with IS_ERR*() helpers.
>   */
>  struct thermal_cooling_device *
>  thermal_cooling_device_register(char *type, void *devdata,



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

* Re: [PATCH RESEND 10/11] thermal: update kernel-doc for create_trip_attrs
  2013-04-08 16:07 ` [PATCH RESEND 10/11] thermal: update kernel-doc for create_trip_attrs Eduardo Valentin
@ 2013-04-17 15:31   ` Zhang Rui
  0 siblings, 0 replies; 31+ messages in thread
From: Zhang Rui @ 2013-04-17 15:31 UTC (permalink / raw)
  To: Eduardo Valentin; +Cc: linux-pm, linux-kernel

On Mon, 2013-04-08 at 12:07 -0400, Eduardo Valentin wrote:
> This patch updates the documentation for create_trip_attrs
> and removes the warnings generated by scripts/kernel-doc -v.
> 
> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>

this one looks okay to me.

thanks,
rui
> ---
>  drivers/thermal/thermal_sys.c |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
> index f3a4e17..4cff199 100644
> --- a/drivers/thermal/thermal_sys.c
> +++ b/drivers/thermal/thermal_sys.c
> @@ -1460,9 +1460,14 @@ void thermal_notify_framework(struct thermal_zone_device *tz, int trip)
>  EXPORT_SYMBOL_GPL(thermal_notify_framework);
>  
>  /**
> - * create_trip_attrs - create attributes for trip points
> + * create_trip_attrs() - create attributes for trip points
>   * @tz:		the thermal zone device
>   * @mask:	Writeable trip point bitmap.
> + *
> + * helper function to instantiate sysfs entries for every trip
> + * point and its properties of a struct thermal_zone_device.
> + *
> + * Return: 0 on success, the proper error value otherwise.
>   */
>  static int create_trip_attrs(struct thermal_zone_device *tz, int mask)
>  {



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

* Re: [PATCH RESEND 01/11] thermal: use strlcpy instead of strcpy
  2013-04-08 16:07 ` [PATCH RESEND 01/11] thermal: use strlcpy instead of strcpy Eduardo Valentin
@ 2013-04-17 15:36   ` Zhang Rui
  0 siblings, 0 replies; 31+ messages in thread
From: Zhang Rui @ 2013-04-17 15:36 UTC (permalink / raw)
  To: Eduardo Valentin; +Cc: linux-pm, linux-kernel

On Mon, 2013-04-08 at 12:07 -0400, Eduardo Valentin wrote:
> For memory boundaries safety, use strlcpy instead of strcpy.
> 
> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>

ACK.

thanks,
rui
> ---
>  drivers/thermal/thermal_sys.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
> index 5b7863a..7875607 100644
> --- a/drivers/thermal/thermal_sys.c
> +++ b/drivers/thermal/thermal_sys.c
> @@ -1289,7 +1289,7 @@ thermal_cooling_device_register(char *type, void *devdata,
>  		return ERR_PTR(result);
>  	}
>  
> -	strcpy(cdev->type, type ? : "");
> +	strlcpy(cdev->type, type ? : "", sizeof(cdev->type));
>  	mutex_init(&cdev->lock);
>  	INIT_LIST_HEAD(&cdev->thermal_instances);
>  	cdev->ops = ops;
> @@ -1594,7 +1594,7 @@ struct thermal_zone_device *thermal_zone_device_register(const char *type,
>  		return ERR_PTR(result);
>  	}
>  
> -	strcpy(tz->type, type ? : "");
> +	strlcpy(tz->type, type ? : "", sizeof(tz->type));
>  	tz->ops = ops;
>  	tz->tzp = tzp;
>  	tz->device.class = &thermal_class;



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

* Re: [PATCH RESEND 03/11] thermal: rename notify_thermal_framework to thermal_notify_framework
  2013-04-08 16:07 ` [PATCH RESEND 03/11] thermal: rename notify_thermal_framework to thermal_notify_framework Eduardo Valentin
@ 2013-04-17 15:37   ` Zhang Rui
  0 siblings, 0 replies; 31+ messages in thread
From: Zhang Rui @ 2013-04-17 15:37 UTC (permalink / raw)
  To: Eduardo Valentin; +Cc: linux-pm, linux-kernel

On Mon, 2013-04-08 at 12:07 -0400, Eduardo Valentin wrote:
> To follow the prefix names used by the thermal exported functions,
> this patch renames notify_thermal_framework to thermal_notify_framework.
> 
> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>

Hmm, I'm okay with this one.

thanks,
rui
> ---
>  Documentation/thermal/sysfs-api.txt |    2 +-
>  drivers/thermal/thermal_sys.c       |    6 +++---
>  include/linux/thermal.h             |    2 +-
>  3 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt
> index 6859661..4b23190 100644
> --- a/Documentation/thermal/sysfs-api.txt
> +++ b/Documentation/thermal/sysfs-api.txt
> @@ -363,7 +363,7 @@ This function returns the thermal_instance corresponding to a given
>  {thermal_zone, cooling_device, trip_point} combination. Returns NULL
>  if such an instance does not exist.
>  
> -5.3:notify_thermal_framework:
> +5.3:thermal_notify_framework:
>  This function handles the trip events from sensor drivers. It starts
>  throttling the cooling devices according to the policy configured.
>  For CRITICAL and HOT trip points, this notifies the respective drivers,
> diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
> index 9542600..ffaf6d3 100644
> --- a/drivers/thermal/thermal_sys.c
> +++ b/drivers/thermal/thermal_sys.c
> @@ -1420,7 +1420,7 @@ void thermal_cdev_update(struct thermal_cooling_device *cdev)
>  EXPORT_SYMBOL(thermal_cdev_update);
>  
>  /**
> - * notify_thermal_framework - Sensor drivers use this API to notify framework
> + * thermal_notify_framework - Sensor drivers use this API to notify framework
>   * @tz:		thermal zone device
>   * @trip:	indicates which trip point has been crossed
>   *
> @@ -1431,11 +1431,11 @@ EXPORT_SYMBOL(thermal_cdev_update);
>   * The throttling policy is based on the configured platform data; if no
>   * platform data is provided, this uses the step_wise throttling policy.
>   */
> -void notify_thermal_framework(struct thermal_zone_device *tz, int trip)
> +void thermal_notify_framework(struct thermal_zone_device *tz, int trip)
>  {
>  	handle_thermal_trip(tz, trip);
>  }
> -EXPORT_SYMBOL(notify_thermal_framework);
> +EXPORT_SYMBOL(thermal_notify_framework);
>  
>  /**
>   * create_trip_attrs - create attributes for trip points
> diff --git a/include/linux/thermal.h b/include/linux/thermal.h
> index f0bd7f9..e8ec9d8 100644
> --- a/include/linux/thermal.h
> +++ b/include/linux/thermal.h
> @@ -242,7 +242,7 @@ int get_tz_trend(struct thermal_zone_device *, int);
>  struct thermal_instance *get_thermal_instance(struct thermal_zone_device *,
>  		struct thermal_cooling_device *, int);
>  void thermal_cdev_update(struct thermal_cooling_device *);
> -void notify_thermal_framework(struct thermal_zone_device *, int);
> +void thermal_notify_framework(struct thermal_zone_device *, int);
>  
>  int thermal_register_governor(struct thermal_governor *);
>  void thermal_unregister_governor(struct thermal_governor *);



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

* Re: From: Eduardo Valentin <eduardo.valentin@ti.com>
  2013-04-08 16:07 From: Eduardo Valentin <eduardo.valentin@ti.com> Eduardo Valentin
                   ` (10 preceding siblings ...)
  2013-04-08 16:07 ` [PATCH RESEND 11/11] thermal: update kernel-doc for thermal_zone_device_register Eduardo Valentin
@ 2013-04-17 17:15 ` Eduardo Valentin
  11 siblings, 0 replies; 31+ messages in thread
From: Eduardo Valentin @ 2013-04-17 17:15 UTC (permalink / raw)
  To: rui.zhang; +Cc: linux-pm, linux-kernel, eduardo.valentin

Rui,


On 08-04-2013 12:07, Eduardo Valentin wrote:
>
>
> Here is a sequence of fixes and documentation improvements
> thermal code base. This should be first of a series of changes
> I am planing to send out.
>
> On this very first there is no change in functionality, as
> the patches only change symbol names and updates kernel-doc
> comments and their formants.

I am going to rebase this series on top of your latest -next branch and 
resend with your comments.

I believe name standardization could be still be applied though.

>
>
>
> Eduardo Valentin (11):
>    thermal: use strlcpy instead of strcpy
>    thermal: update driver license
>    thermal: rename notify_thermal_framework to thermal_notify_framework
>    thermal: rename get_thermal_instance to thermal_instance_get
>    thermal: rename get_tz_trend to thermal_zone_trend_get
>    thermal: use EXPORT_SYMBOL_GPL
>    thermal: update kernel-doc for thermal_zone_bind_cooling_device
>    thermal: update kernel-doc for thermal_zone_unbind_cooling_device
>    thermal: update kernel-doc for thermal_cooling_device_register
>    thermal: update kernel-doc for create_trip_attrs
>    thermal: update kernel-doc for thermal_zone_device_register
>
>   Documentation/thermal/sysfs-api.txt |    6 +-
>   drivers/thermal/fair_share.c        |    2 +-
>   drivers/thermal/step_wise.c         |    2 +-
>   drivers/thermal/thermal_sys.c       |   90 ++++++++++++++++++++++++-----------
>   include/linux/thermal.h             |    6 +-
>   5 files changed, 70 insertions(+), 36 deletions(-)
>


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

* Re: [PATCH RESEND 04/11] thermal: rename get_thermal_instance to thermal_instance_get
  2013-04-17 15:09   ` Zhang Rui
@ 2013-04-17 19:18     ` Eduardo Valentin
  0 siblings, 0 replies; 31+ messages in thread
From: Eduardo Valentin @ 2013-04-17 19:18 UTC (permalink / raw)
  To: Zhang Rui; +Cc: Eduardo Valentin, linux-pm, linux-kernel

On 17-04-2013 11:09, Zhang Rui wrote:
> On Mon, 2013-04-08 at 12:07 -0400, Eduardo Valentin wrote:
>> To follow the prefix names used by the thermal exported functions,
>> this patch renames get_thermal_instance to thermal_instance_get.
>>
>> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
>
> NACK.
>
> with the change of building all thermal governors into thermal_sys
> module, get_thermal_instance becomes an internally helper function,
> rather than external API.
> thus I think it is okay to use the current name get_thermal_instance.
> But you remind me a need a cleanup patch to remove these APIs. :)

How about keeping this patch and resending with a better description? 
Something like:
To follow the prefix names used by the thermal functions,
this patch renames get_thermal_instance to thermal_instance_get.


>
> thanks,
> rui
>> ---
>>   Documentation/thermal/sysfs-api.txt |    2 +-
>>   drivers/thermal/fair_share.c        |    2 +-
>>   drivers/thermal/thermal_sys.c       |    4 ++--
>>   include/linux/thermal.h             |    2 +-
>>   4 files changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/Documentation/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt
>> index 4b23190..059b3bf 100644
>> --- a/Documentation/thermal/sysfs-api.txt
>> +++ b/Documentation/thermal/sysfs-api.txt
>> @@ -358,7 +358,7 @@ are supposed to implement the callback. If they don't, the thermal
>>   framework calculated the trend by comparing the previous and the current
>>   temperature values.
>>
>> -5.2:get_thermal_instance:
>> +5.2:thermal_instance_get:
>>   This function returns the thermal_instance corresponding to a given
>>   {thermal_zone, cooling_device, trip_point} combination. Returns NULL
>>   if such an instance does not exist.
>> diff --git a/drivers/thermal/fair_share.c b/drivers/thermal/fair_share.c
>> index 792479f..f629446 100644
>> --- a/drivers/thermal/fair_share.c
>> +++ b/drivers/thermal/fair_share.c
>> @@ -95,7 +95,7 @@ static int fair_share_throttle(struct thermal_zone_device *tz, int trip)
>>   			continue;
>>
>>   		cdev = tzp->tbp[i].cdev;
>> -		instance = get_thermal_instance(tz, cdev, trip);
>> +		instance = thermal_instance_get(tz, cdev, trip);
>>   		if (!instance)
>>   			continue;
>>
>> diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
>> index ffaf6d3..44e89c0 100644
>> --- a/drivers/thermal/thermal_sys.c
>> +++ b/drivers/thermal/thermal_sys.c
>> @@ -170,7 +170,7 @@ int get_tz_trend(struct thermal_zone_device *tz, int trip)
>>   }
>>   EXPORT_SYMBOL(get_tz_trend);
>>
>> -struct thermal_instance *get_thermal_instance(struct thermal_zone_device *tz,
>> +struct thermal_instance *thermal_instance_get(struct thermal_zone_device *tz,
>>   			struct thermal_cooling_device *cdev, int trip)
>>   {
>>   	struct thermal_instance *pos = NULL;
>> @@ -191,7 +191,7 @@ struct thermal_instance *get_thermal_instance(struct thermal_zone_device *tz,
>>
>>   	return target_instance;
>>   }
>> -EXPORT_SYMBOL(get_thermal_instance);
>> +EXPORT_SYMBOL(thermal_instance_get);
>>
>>   static void print_bind_err_msg(struct thermal_zone_device *tz,
>>   			struct thermal_cooling_device *cdev, int ret)
>> diff --git a/include/linux/thermal.h b/include/linux/thermal.h
>> index e8ec9d8..e2a49e1 100644
>> --- a/include/linux/thermal.h
>> +++ b/include/linux/thermal.h
>> @@ -239,7 +239,7 @@ struct thermal_cooling_device *thermal_cooling_device_register(char *, void *,
>>   void thermal_cooling_device_unregister(struct thermal_cooling_device *);
>>
>>   int get_tz_trend(struct thermal_zone_device *, int);
>> -struct thermal_instance *get_thermal_instance(struct thermal_zone_device *,
>> +struct thermal_instance *thermal_instance_get(struct thermal_zone_device *,
>>   		struct thermal_cooling_device *, int);
>>   void thermal_cdev_update(struct thermal_cooling_device *);
>>   void thermal_notify_framework(struct thermal_zone_device *, int);
>
>
>
>


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

* Re: [PATCH RESEND 05/11] thermal: rename get_tz_trend to thermal_zone_trend_get
  2013-04-17 15:10   ` Zhang Rui
@ 2013-04-17 19:20     ` Eduardo Valentin
  0 siblings, 0 replies; 31+ messages in thread
From: Eduardo Valentin @ 2013-04-17 19:20 UTC (permalink / raw)
  To: Zhang Rui; +Cc: Eduardo Valentin, linux-pm, linux-kernel

On 17-04-2013 11:10, Zhang Rui wrote:
> On Mon, 2013-04-08 at 12:07 -0400, Eduardo Valentin wrote:
>> To follow the prefix names used by the thermal exported functions,
>> this patch renames get_tz_trend to thermal_zone_trend_get.
>>
>> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
>
> NACK.
>
> get_tz_trend will not be exported as API any more.

Same comment as in patch 04. How about keeping this patch, but updating 
the commit description? I dont see why not keep one single nameing 
pattern in the file. it makes reading the code more pleasant.

>
> thanks,
> rui
>> ---
>>   Documentation/thermal/sysfs-api.txt |    2 +-
>>   drivers/thermal/step_wise.c         |    2 +-
>>   drivers/thermal/thermal_sys.c       |    4 ++--
>>   include/linux/thermal.h             |    2 +-
>>   4 files changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/Documentation/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt
>> index 059b3bf..a9abb84 100644
>> --- a/Documentation/thermal/sysfs-api.txt
>> +++ b/Documentation/thermal/sysfs-api.txt
>> @@ -351,7 +351,7 @@ crosses any of the configured thresholds.
>>
>>   5. Export Symbol APIs:
>>
>> -5.1: get_tz_trend:
>> +5.1: thermal_zone_trend_get:
>>   This function returns the trend of a thermal zone, i.e the rate of change
>>   of temperature of the thermal zone. Ideally, the thermal sensor drivers
>>   are supposed to implement the callback. If they don't, the thermal
>> diff --git a/drivers/thermal/step_wise.c b/drivers/thermal/step_wise.c
>> index 407cde3..a640e2b 100644
>> --- a/drivers/thermal/step_wise.c
>> +++ b/drivers/thermal/step_wise.c
>> @@ -116,7 +116,7 @@ static void thermal_zone_trip_update(struct thermal_zone_device *tz, int trip)
>>   		tz->ops->get_trip_type(tz, trip, &trip_type);
>>   	}
>>
>> -	trend = get_tz_trend(tz, trip);
>> +	trend = thermal_zone_trend_get(tz, trip);
>>
>>   	if (tz->temperature >= trip_temp)
>>   		throttle = true;
>> diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
>> index 44e89c0..242c82a 100644
>> --- a/drivers/thermal/thermal_sys.c
>> +++ b/drivers/thermal/thermal_sys.c
>> @@ -153,7 +153,7 @@ static void release_idr(struct idr *idr, struct mutex *lock, int id)
>>   		mutex_unlock(lock);
>>   }
>>
>> -int get_tz_trend(struct thermal_zone_device *tz, int trip)
>> +int thermal_zone_trend_get(struct thermal_zone_device *tz, int trip)
>>   {
>>   	enum thermal_trend trend;
>>
>> @@ -168,7 +168,7 @@ int get_tz_trend(struct thermal_zone_device *tz, int trip)
>>
>>   	return trend;
>>   }
>> -EXPORT_SYMBOL(get_tz_trend);
>> +EXPORT_SYMBOL(thermal_zone_trend_get);
>>
>>   struct thermal_instance *thermal_instance_get(struct thermal_zone_device *tz,
>>   			struct thermal_cooling_device *cdev, int trip)
>> diff --git a/include/linux/thermal.h b/include/linux/thermal.h
>> index e2a49e1..542a39c 100644
>> --- a/include/linux/thermal.h
>> +++ b/include/linux/thermal.h
>> @@ -238,7 +238,7 @@ struct thermal_cooling_device *thermal_cooling_device_register(char *, void *,
>>   		const struct thermal_cooling_device_ops *);
>>   void thermal_cooling_device_unregister(struct thermal_cooling_device *);
>>
>> -int get_tz_trend(struct thermal_zone_device *, int);
>> +int thermal_zone_trend_get(struct thermal_zone_device *, int);
>>   struct thermal_instance *thermal_instance_get(struct thermal_zone_device *,
>>   		struct thermal_cooling_device *, int);
>>   void thermal_cdev_update(struct thermal_cooling_device *);
>
>
> --
> 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] 31+ messages in thread

* Re: [PATCH RESEND 06/11] thermal: use EXPORT_SYMBOL_GPL
  2013-04-17 15:20   ` Zhang Rui
@ 2013-04-17 19:22     ` Eduardo Valentin
  0 siblings, 0 replies; 31+ messages in thread
From: Eduardo Valentin @ 2013-04-17 19:22 UTC (permalink / raw)
  To: Zhang Rui; +Cc: Eduardo Valentin, linux-pm, linux-kernel

On 17-04-2013 11:20, Zhang Rui wrote:
> On Mon, 2013-04-08 at 12:07 -0400, Eduardo Valentin wrote:
>> Restrict usage of GPL modules.
>>
>> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
>
> NACK for
> thermal_zone_trend_get/thermal_instance_get/thermal_cdev_update, for the
> reasons stated earlier.

I am not sure I get your point above on this patch. This one is about 
using EXPORT_SYMBOL_GPL. Why not using it?

> ACK for the others.

ok..

>
> thanks,
> rui
>> ---
>>   drivers/thermal/thermal_sys.c |   24 ++++++++++++------------
>>   1 files changed, 12 insertions(+), 12 deletions(-)
>>
>> diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
>> index 242c82a..602596e 100644
>> --- a/drivers/thermal/thermal_sys.c
>> +++ b/drivers/thermal/thermal_sys.c
>> @@ -168,7 +168,7 @@ int thermal_zone_trend_get(struct thermal_zone_device *tz, int trip)
>>
>>   	return trend;
>>   }
>> -EXPORT_SYMBOL(thermal_zone_trend_get);
>> +EXPORT_SYMBOL_GPL(thermal_zone_trend_get);
>>
>>   struct thermal_instance *thermal_instance_get(struct thermal_zone_device *tz,
>>   			struct thermal_cooling_device *cdev, int trip)
>> @@ -191,7 +191,7 @@ struct thermal_instance *thermal_instance_get(struct thermal_zone_device *tz,
>>
>>   	return target_instance;
>>   }
>> -EXPORT_SYMBOL(thermal_instance_get);
>> +EXPORT_SYMBOL_GPL(thermal_instance_get);
>>
>>   static void print_bind_err_msg(struct thermal_zone_device *tz,
>>   			struct thermal_cooling_device *cdev, int ret)
>> @@ -434,7 +434,7 @@ void thermal_zone_device_update(struct thermal_zone_device *tz)
>>   	for (count = 0; count < tz->trips; count++)
>>   		handle_thermal_trip(tz, count);
>>   }
>> -EXPORT_SYMBOL(thermal_zone_device_update);
>> +EXPORT_SYMBOL_GPL(thermal_zone_device_update);
>>
>>   static void thermal_zone_device_check(struct work_struct *work)
>>   {
>> @@ -1197,7 +1197,7 @@ free_mem:
>>   	kfree(dev);
>>   	return result;
>>   }
>> -EXPORT_SYMBOL(thermal_zone_bind_cooling_device);
>> +EXPORT_SYMBOL_GPL(thermal_zone_bind_cooling_device);
>>
>>   /**
>>    * thermal_zone_unbind_cooling_device - unbind a cooling device from a thermal zone
>> @@ -1237,7 +1237,7 @@ unbind:
>>   	kfree(pos);
>>   	return 0;
>>   }
>> -EXPORT_SYMBOL(thermal_zone_unbind_cooling_device);
>> +EXPORT_SYMBOL_GPL(thermal_zone_unbind_cooling_device);
>>
>>   static void thermal_release(struct device *dev)
>>   {
>> @@ -1334,7 +1334,7 @@ unregister:
>>   	device_unregister(&cdev->device);
>>   	return ERR_PTR(result);
>>   }
>> -EXPORT_SYMBOL(thermal_cooling_device_register);
>> +EXPORT_SYMBOL_GPL(thermal_cooling_device_register);
>>
>>   /**
>>    * thermal_cooling_device_unregister - removes the registered thermal cooling device
>> @@ -1394,7 +1394,7 @@ void thermal_cooling_device_unregister(struct thermal_cooling_device *cdev)
>>   	device_unregister(&cdev->device);
>>   	return;
>>   }
>> -EXPORT_SYMBOL(thermal_cooling_device_unregister);
>> +EXPORT_SYMBOL_GPL(thermal_cooling_device_unregister);
>>
>>   void thermal_cdev_update(struct thermal_cooling_device *cdev)
>>   {
>> @@ -1417,7 +1417,7 @@ void thermal_cdev_update(struct thermal_cooling_device *cdev)
>>   	cdev->ops->set_cur_state(cdev, target);
>>   	cdev->updated = true;
>>   }
>> -EXPORT_SYMBOL(thermal_cdev_update);
>> +EXPORT_SYMBOL_GPL(thermal_cdev_update);
>>
>>   /**
>>    * thermal_notify_framework - Sensor drivers use this API to notify framework
>> @@ -1435,7 +1435,7 @@ void thermal_notify_framework(struct thermal_zone_device *tz, int trip)
>>   {
>>   	handle_thermal_trip(tz, trip);
>>   }
>> -EXPORT_SYMBOL(thermal_notify_framework);
>> +EXPORT_SYMBOL_GPL(thermal_notify_framework);
>>
>>   /**
>>    * create_trip_attrs - create attributes for trip points
>> @@ -1687,7 +1687,7 @@ unregister:
>>   	device_unregister(&tz->device);
>>   	return ERR_PTR(result);
>>   }
>> -EXPORT_SYMBOL(thermal_zone_device_register);
>> +EXPORT_SYMBOL_GPL(thermal_zone_device_register);
>>
>>   /**
>>    * thermal_device_unregister - removes the registered thermal zone device
>> @@ -1754,7 +1754,7 @@ void thermal_zone_device_unregister(struct thermal_zone_device *tz)
>>   	device_unregister(&tz->device);
>>   	return;
>>   }
>> -EXPORT_SYMBOL(thermal_zone_device_unregister);
>> +EXPORT_SYMBOL_GPL(thermal_zone_device_unregister);
>>
>>   #ifdef CONFIG_NET
>>   static struct genl_family thermal_event_genl_family = {
>> @@ -1832,7 +1832,7 @@ int thermal_generate_netlink_event(struct thermal_zone_device *tz,
>>
>>   	return result;
>>   }
>> -EXPORT_SYMBOL(thermal_generate_netlink_event);
>> +EXPORT_SYMBOL_GPL(thermal_generate_netlink_event);
>>
>>   static int genetlink_init(void)
>>   {
>
>
>
>


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

* Re: [PATCH RESEND 07/11] thermal: update kernel-doc for thermal_zone_bind_cooling_device
  2013-04-17 15:28     ` Zhang Rui
@ 2013-04-17 19:24       ` Eduardo Valentin
  0 siblings, 0 replies; 31+ messages in thread
From: Eduardo Valentin @ 2013-04-17 19:24 UTC (permalink / raw)
  To: Zhang Rui; +Cc: Eduardo Valentin, linux-pm, linux-kernel

On 17-04-2013 11:28, Zhang Rui wrote:
> On Wed, 2013-04-17 at 23:26 +0800, Zhang Rui wrote:
>> On Mon, 2013-04-08 at 12:07 -0400, Eduardo Valentin wrote:
>>> This patch updates the documentation for thermal_zone_bind_cooling_device
>>> and removes the warnings generated by scripts/kernel-doc -v.
>>>
>>> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
>>> ---
>>>   drivers/thermal/thermal_sys.c |   16 +++++++++++++---
>>>   1 files changed, 13 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
>>> index 602596e..8acaab6 100644
>>> --- a/drivers/thermal/thermal_sys.c
>>> +++ b/drivers/thermal/thermal_sys.c
>>> @@ -1097,13 +1097,23 @@ thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz)
>>>   #endif
>>>
>>>   /**
>>> - * thermal_zone_bind_cooling_device - bind a cooling device to a thermal zone
>>> - * @tz:		thermal zone device
>>> + * thermal_zone_bind_cooling_device() - bind a cooling device to a thermal zone
>>> + * @tz:		pointer to struct thermal_zone_device
>>>    * @trip:	indicates which trip point the cooling devices is
>>>    *		associated with in this thermal zone.
>>> - * @cdev:	thermal cooling device
>>> + * @cdev:	pointer to struct thermal_cooling_device
>>> + * @upper:	the Maximum cooling state for this trip point.
>>> + *		THERMAL_NO_LIMIT means no upper limit,
>>> + *		and the cooling device can be in max_state.
>>> + * @lower:	the Minimum cooling state can be used for this trip point.
>>> + *		THERMAL_NO_LIMIT means no lower limit,
>>> + *		and the cooling device can be in cooling state 0.
>>>    *
>> good catch.
>> But we miss this in the comments in drivers/thermal/thermal_core.c as
>> well.
>>
> oops, I thought you were changing Documentation/thermal/sys-api.txt.
> I must be too sleepy as it is already 11:30PM here.
> sorry for the noise.

I believe this is an Ack then?
>
> thanks,
> rui
>> thanks,
>> rui
>>> + * This interface function bind a thermal cooling device to the certain trip
>>> + * point of a thermal zone device.
>>>    * This function is usually called in the thermal zone device .bind callback.
>>> + *
>>> + * Return: 0 on success, the proper error value otherwise.
>>>    */
>>>   int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz,
>>>   				     int trip,
>>
>
>
>
>


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

* Re: [PATCH RESEND 09/11] thermal: update kernel-doc for thermal_cooling_device_register
  2013-04-17 15:31   ` Zhang Rui
@ 2013-04-17 19:25     ` Eduardo Valentin
  0 siblings, 0 replies; 31+ messages in thread
From: Eduardo Valentin @ 2013-04-17 19:25 UTC (permalink / raw)
  To: Zhang Rui; +Cc: Eduardo Valentin, linux-pm, linux-kernel

On 17-04-2013 11:31, Zhang Rui wrote:
> On Mon, 2013-04-08 at 12:07 -0400, Eduardo Valentin wrote:
>> This patch updates the documentation for thermal_cooling_device_register
>> and removes the warnings generated by scripts/kernel-doc -v.
>>
>> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
>> ---
>>   drivers/thermal/thermal_sys.c |    9 ++++++++-
>>   1 files changed, 8 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
>> index 98d7d53..f3a4e17 100644
>> --- a/drivers/thermal/thermal_sys.c
>> +++ b/drivers/thermal/thermal_sys.c
>> @@ -1275,10 +1275,17 @@ static struct class thermal_class = {
>>   };
>>
>>   /**
>> - * thermal_cooling_device_register - register a new thermal cooling device
>> + * thermal_cooling_device_register() - register a new thermal cooling device
>>    * @type:	the thermal cooling device type.
>>    * @devdata:	device private data.
>>    * @ops:		standard thermal cooling devices callbacks.
>> + *
>> + * This interface function adds a new thermal cooling device (fan/processor/...)
>> + * to /sys/class/thermal/ folder as cooling_device[0-*]. It tries to bind itself
>> + * to all the thermal zone devices register at the same time.
>
> s/register/registered ?

Indeed, will add this and resend.

>
> thanks,
> rui
>> + *
>> + * Return: a pointer to the created struct thermal_cooling_device or an
>> + * ERR_PTR. Caller must check return value with IS_ERR*() helpers.
>>    */
>>   struct thermal_cooling_device *
>>   thermal_cooling_device_register(char *type, void *devdata,
>
>
> --
> 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] 31+ messages in thread

* Re: [PATCH RESEND 11/11] thermal: update kernel-doc for thermal_zone_device_register
  2013-04-17 15:24   ` Zhang Rui
@ 2013-04-17 19:30     ` Eduardo Valentin
  2013-04-24 16:50       ` Zhang, Rui
  0 siblings, 1 reply; 31+ messages in thread
From: Eduardo Valentin @ 2013-04-17 19:30 UTC (permalink / raw)
  To: Zhang Rui; +Cc: Eduardo Valentin, linux-pm, linux-kernel

On 17-04-2013 11:24, Zhang Rui wrote:
> On Mon, 2013-04-08 at 12:07 -0400, Eduardo Valentin wrote:
>> This patch updates the documentation for thermal_zone_device_register
>
> it is not enough.
> parameters including const struct thermal_zone_params *tzp,
> int passive_delay, and int polling_delay are missing in the
> documentation.
>

no Rui, I guess you were already too sleepy as you said. :-)

The patch is just an update. There are some entries already in the 
comment. The parameters you mentioned are already there, thats why you 
dont see in my patch..


> thanks,
> rui
>> and removes the warnings generated by scripts/kernel-doc -v.
>>
>> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
>
>
>> ---
>>   drivers/thermal/thermal_sys.c |    9 ++++++++-
>>   1 files changed, 8 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
>> index 4cff199..5bd95d4 100644
>> --- a/drivers/thermal/thermal_sys.c
>> +++ b/drivers/thermal/thermal_sys.c
>> @@ -1568,7 +1568,7 @@ static void remove_trip_attrs(struct thermal_zone_device *tz)
>>   }
>>
>>   /**
>> - * thermal_zone_device_register - register a new thermal zone device
>> + * thermal_zone_device_register() - register a new thermal zone device
>>    * @type:	the thermal zone device type
>>    * @trips:	the number of trip points the thermal zone support
>>    * @mask:	a bit string indicating the writeablility of trip points
>> @@ -1581,8 +1581,15 @@ static void remove_trip_attrs(struct thermal_zone_device *tz)
>>    *		   whether trip points have been crossed (0 for interrupt
>>    *		   driven systems)
>>    *
>> + * This interface function adds a new thermal zone device (sensor) to
>> + * /sys/class/thermal folder as thermal_zone[0-*]. It tries to bind all the
>> + * thermal cooling devices registered at the same time.
>>    * thermal_zone_device_unregister() must be called when the device is no
>>    * longer needed. The passive cooling depends on the .get_trend() return value.
>> + *
>> + * Return: a pointer to the created struct thermal_zone_device or an
>> + * in case of error, an ERR_PTR. Caller must check return value with
>> + * IS_ERR*() helpers.
>>    */
>>   struct thermal_zone_device *thermal_zone_device_register(const char *type,
>>   	int trips, int mask, void *devdata,
>
>
>
>


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

* RE: [PATCH RESEND 11/11] thermal: update kernel-doc for thermal_zone_device_register
  2013-04-17 19:30     ` Eduardo Valentin
@ 2013-04-24 16:50       ` Zhang, Rui
  0 siblings, 0 replies; 31+ messages in thread
From: Zhang, Rui @ 2013-04-24 16:50 UTC (permalink / raw)
  To: Eduardo Valentin; +Cc: linux-pm, linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 3176 bytes --]



> -----Original Message-----
> From: Eduardo Valentin [mailto:eduardo.valentin@ti.com]
> Sent: Thursday, April 18, 2013 3:30 AM
> To: Zhang, Rui
> Cc: Eduardo Valentin; linux-pm@vger.kernel.org; linux-
> kernel@vger.kernel.org
> Subject: Re: [PATCH RESEND 11/11] thermal: update kernel-doc for
> thermal_zone_device_register
> Importance: High
> 
> On 17-04-2013 11:24, Zhang Rui wrote:
> > On Mon, 2013-04-08 at 12:07 -0400, Eduardo Valentin wrote:
> >> This patch updates the documentation for
> thermal_zone_device_register
> >
> > it is not enough.
> > parameters including const struct thermal_zone_params *tzp, int
> > passive_delay, and int polling_delay are missing in the documentation.
> >
> 
> no Rui, I guess you were already too sleepy as you said. :-)
> 
> The patch is just an update. There are some entries already in the
> comment. The parameters you mentioned are already there, thats why you
> dont see in my patch..
> 


Sorry, I was not clear enough.
I mean we need to update Documentation/thermal/sysfs-api.txt as well,
for thermal_zone_device_register.
Patch will be sent out soon.

Thanks,
rui
> 
> > thanks,
> > rui
> >> and removes the warnings generated by scripts/kernel-doc -v.
> >>
> >> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
> >
> >
> >> ---
> >>   drivers/thermal/thermal_sys.c |    9 ++++++++-
> >>   1 files changed, 8 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/drivers/thermal/thermal_sys.c
> b/drivers/thermal/thermal_sys.c
> >> index 4cff199..5bd95d4 100644
> >> --- a/drivers/thermal/thermal_sys.c
> >> +++ b/drivers/thermal/thermal_sys.c
> >> @@ -1568,7 +1568,7 @@ static void remove_trip_attrs(struct
> thermal_zone_device *tz)
> >>   }
> >>
> >>   /**
> >> - * thermal_zone_device_register - register a new thermal zone
> device
> >> + * thermal_zone_device_register() - register a new thermal zone
> device
> >>    * @type:	the thermal zone device type
> >>    * @trips:	the number of trip points the thermal zone support
> >>    * @mask:	a bit string indicating the writeablility of trip
> points
> >> @@ -1581,8 +1581,15 @@ static void remove_trip_attrs(struct
> thermal_zone_device *tz)
> >>    *		   whether trip points have been crossed (0 for
> interrupt
> >>    *		   driven systems)
> >>    *
> >> + * This interface function adds a new thermal zone device (sensor)
> to
> >> + * /sys/class/thermal folder as thermal_zone[0-*]. It tries to bind
> all the
> >> + * thermal cooling devices registered at the same time.
> >>    * thermal_zone_device_unregister() must be called when the device
> is no
> >>    * longer needed. The passive cooling depends on the .get_trend()
> return value.
> >> + *
> >> + * Return: a pointer to the created struct thermal_zone_device or
> an
> >> + * in case of error, an ERR_PTR. Caller must check return value
> with
> >> + * IS_ERR*() helpers.
> >>    */
> >>   struct thermal_zone_device *thermal_zone_device_register(const
> char *type,
> >>   	int trips, int mask, void *devdata,
> >
> >
> >
> >

ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

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

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-08 16:07 From: Eduardo Valentin <eduardo.valentin@ti.com> Eduardo Valentin
2013-04-08 16:07 ` [PATCH RESEND 01/11] thermal: use strlcpy instead of strcpy Eduardo Valentin
2013-04-17 15:36   ` Zhang Rui
2013-04-08 16:07 ` [PATCH RESEND 02/11] thermal: update driver license Eduardo Valentin
2013-04-08 16:07 ` [PATCH RESEND 03/11] thermal: rename notify_thermal_framework to thermal_notify_framework Eduardo Valentin
2013-04-17 15:37   ` Zhang Rui
2013-04-08 16:07 ` [PATCH RESEND 04/11] thermal: rename get_thermal_instance to thermal_instance_get Eduardo Valentin
2013-04-17 15:09   ` Zhang Rui
2013-04-17 19:18     ` Eduardo Valentin
2013-04-08 16:07 ` [PATCH RESEND 05/11] thermal: rename get_tz_trend to thermal_zone_trend_get Eduardo Valentin
2013-04-17 15:10   ` Zhang Rui
2013-04-17 19:20     ` Eduardo Valentin
2013-04-08 16:07 ` [PATCH RESEND 06/11] thermal: use EXPORT_SYMBOL_GPL Eduardo Valentin
2013-04-17 15:20   ` Zhang Rui
2013-04-17 19:22     ` Eduardo Valentin
2013-04-08 16:07 ` [PATCH RESEND 07/11] thermal: update kernel-doc for thermal_zone_bind_cooling_device Eduardo Valentin
2013-04-17 15:26   ` Zhang Rui
2013-04-17 15:28     ` Zhang Rui
2013-04-17 19:24       ` Eduardo Valentin
2013-04-08 16:07 ` [PATCH RESEND 08/11] thermal: update kernel-doc for thermal_zone_unbind_cooling_device Eduardo Valentin
2013-04-17 15:29   ` Zhang Rui
2013-04-08 16:07 ` [PATCH RESEND 09/11] thermal: update kernel-doc for thermal_cooling_device_register Eduardo Valentin
2013-04-17 15:31   ` Zhang Rui
2013-04-17 19:25     ` Eduardo Valentin
2013-04-08 16:07 ` [PATCH RESEND 10/11] thermal: update kernel-doc for create_trip_attrs Eduardo Valentin
2013-04-17 15:31   ` Zhang Rui
2013-04-08 16:07 ` [PATCH RESEND 11/11] thermal: update kernel-doc for thermal_zone_device_register Eduardo Valentin
2013-04-17 15:24   ` Zhang Rui
2013-04-17 19:30     ` Eduardo Valentin
2013-04-24 16:50       ` Zhang, Rui
2013-04-17 17:15 ` From: Eduardo Valentin <eduardo.valentin@ti.com> 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).