[PATCHv3 21/48] thermal: core: match parenthesis on code alignment

2016-05-30 Thread Eduardo Valentin
Cosmetic change in the sysfs handling functions, as recommended by checkpatch.pl. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_core.c | 14 +++---

[PATCHv3 25/48] thermal: core: remove a couple of style issues on helpers

2016-05-30 Thread Eduardo Valentin
Reorganizing the code of helper functions to improve readability and style, as recommended by checkpatch.pl. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/th

[PATCHv3 21/48] thermal: core: match parenthesis on code alignment

2016-05-30 Thread Eduardo Valentin
Cosmetic change in the sysfs handling functions, as recommended by checkpatch.pl. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions

[PATCHv3 25/48] thermal: core: remove a couple of style issues on helpers

2016-05-30 Thread Eduardo Valentin
Reorganizing the code of helper functions to improve readability and style, as recommended by checkpatch.pl. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 9 + 1 file changed, 5

[PATCHv3 15/48] thermal: core: remove unnecessary device_remove() calls

2016-05-30 Thread Eduardo Valentin
Given that cdevs sysfs properties are already registered using the dev.groups, there is no need to explicitly call device_remove() for each property. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c

[PATCHv3 13/48] thermal: core: create tz->device.groups dynamically

2016-05-30 Thread Eduardo Valentin
linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_core.c | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_

[PATCHv3 14/48] thermal: core: move trips attributes to tz->device.groups

2016-05-30 Thread Eduardo Valentin
groups. As the removal of all attributes are handled by device core, the device remove calls are not needed anymore. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/t

[PATCHv3 11/48] thermal: core: fix style on remove_trip_attrs()

2016-05-30 Thread Eduardo Valentin
Align to parentheses, removing checkpatch warning. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_core.c | 2 +- 1 file changed, 1 insertion(+)

[PATCHv3 19/48] thermal: core: move to_thermal_zone() macro to header file

2016-05-30 Thread Eduardo Valentin
Simply making this macro available to other thermal core files. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_core.c | 3 --- drivers/thermal/therma

[PATCHv3 13/48] thermal: core: create tz->device.groups dynamically

2016-05-30 Thread Eduardo Valentin
-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 8f1a16e..7a30863 100644 --- a/drivers/thermal

[PATCHv3 14/48] thermal: core: move trips attributes to tz->device.groups

2016-05-30 Thread Eduardo Valentin
groups. As the removal of all attributes are handled by device core, the device remove calls are not needed anymore. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.

[PATCHv3 11/48] thermal: core: fix style on remove_trip_attrs()

2016-05-30 Thread Eduardo Valentin
Align to parentheses, removing checkpatch warning. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/thermal_core.c b

[PATCHv3 19/48] thermal: core: move to_thermal_zone() macro to header file

2016-05-30 Thread Eduardo Valentin
Simply making this macro available to other thermal core files. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 3 --- drivers/thermal/thermal_core.h | 3 +++ 2 files changed, 3 insertions(+), 3

[PATCHv3 20/48] thermal: core: treat correctly the return value of *scanf calls

2016-05-30 Thread Eduardo Valentin
.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_core.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/dri

[PATCHv3 23/48] thermal: core: move to_cooling_device macro to header file

2016-05-30 Thread Eduardo Valentin
Make the to_cooling_device() macro available across files in thermal core. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_core.c | 3 --- dri

[PATCHv3 22/48] thermal: core: move thermal_zone sysfs to thermal_sysfs.c

2016-05-30 Thread Eduardo Valentin
ed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/Makefile| 2 +- drivers/thermal/thermal_core.c | 590 -- drivers/thermal/thermal_core.h | 3 + drivers/thermal/thermal_sysfs.c | 614 4 f

[PATCHv3 26/48] thermal: core: introduce thermal_helpers.c

2016-05-30 Thread Eduardo Valentin
Here we have a simple code organization. This patch moves functions that do not need to handle thermal core internal data structure to thermal_helpers.c file. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin &

[PATCHv3 24/48] thermal: core: move cooling device sysfs to thermal_sysfs.c

2016-05-30 Thread Eduardo Valentin
This is a code reorganization, simply to concentrate the sysfs handling functions in thermal_sysfs.c. This patch moves the cooling device handling functions. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin &

[PATCHv3 20/48] thermal: core: treat correctly the return value of *scanf calls

2016-05-30 Thread Eduardo Valentin
...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index cfa74e6..98aa7d5 100644

[PATCHv3 23/48] thermal: core: move to_cooling_device macro to header file

2016-05-30 Thread Eduardo Valentin
Make the to_cooling_device() macro available across files in thermal core. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 3 --- drivers/thermal/thermal_core.h | 3 +++ 2 files changed, 3

[PATCHv3 22/48] thermal: core: move thermal_zone sysfs to thermal_sysfs.c

2016-05-30 Thread Eduardo Valentin
This is a code reorganization, simply to concentrate the code handling sysfs in a specific file: thermal_sysfs.c. Right now, moving only the sysfs entries of thermal_zone_device. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin

[PATCHv3 26/48] thermal: core: introduce thermal_helpers.c

2016-05-30 Thread Eduardo Valentin
Here we have a simple code organization. This patch moves functions that do not need to handle thermal core internal data structure to thermal_helpers.c file. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal

[PATCHv3 24/48] thermal: core: move cooling device sysfs to thermal_sysfs.c

2016-05-30 Thread Eduardo Valentin
This is a code reorganization, simply to concentrate the sysfs handling functions in thermal_sysfs.c. This patch moves the cooling device handling functions. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal

[PATCHv3 27/48] thermal: core: group functions related to governor handling

2016-05-30 Thread Eduardo Valentin
Organize thermal core code to group the functions handling with governor manipulation in one single section. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/th

[PATCHv3 29/48] thermal: core: small style fix on __unbind() helper

2016-05-30 Thread Eduardo Valentin
Simply aligning to parenthesis. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --g

[PATCHv3 37/48] thermal: core: add a comment describing the main update loop

2016-05-30 Thread Eduardo Valentin
Simply marking the main update loop section and adding a comment describing it. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_core.c | 11 +++

[PATCHv3 28/48] thermal: core: move idr handling to device management section

2016-05-30 Thread Eduardo Valentin
Given that idr is only used to get id for thermal devices (zones and cooling), makes sense to move the code closer. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- dri

[PATCHv3 30/48] thermal: core: move __unbind() helper to where it is used

2016-05-30 Thread Eduardo Valentin
Simply moving the helper to closer where it is actually used. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_core.c | 20 ++-- 1 file

[PATCHv3 27/48] thermal: core: group functions related to governor handling

2016-05-30 Thread Eduardo Valentin
Organize thermal core code to group the functions handling with governor manipulation in one single section. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 153

[PATCHv3 29/48] thermal: core: small style fix on __unbind() helper

2016-05-30 Thread Eduardo Valentin
Simply aligning to parenthesis. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal

[PATCHv3 37/48] thermal: core: add a comment describing the main update loop

2016-05-30 Thread Eduardo Valentin
Simply marking the main update loop section and adding a comment describing it. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 11 +++ 1 file changed, 11 insertions(+) diff --git

[PATCHv3 28/48] thermal: core: move idr handling to device management section

2016-05-30 Thread Eduardo Valentin
Given that idr is only used to get id for thermal devices (zones and cooling), makes sense to move the code closer. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 48

[PATCHv3 30/48] thermal: core: move __unbind() helper to where it is used

2016-05-30 Thread Eduardo Valentin
Simply moving the helper to closer where it is actually used. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git

[PATCHv3 32/48] thermal: core: move bind_tz() to where it is used

2016-05-30 Thread Eduardo Valentin
Moving the helper to closer where it is used. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_core.c | 80 +- 1

[PATCHv3 33/48] thermal: core: fix couple of style issues on __bind() helper

2016-05-30 Thread Eduardo Valentin
Removing style issues on __bind() and its helpers. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_core.c | 10 +- 1 file changed, 5 inse

[PATCHv3 38/48] thermal: core: add a comment describing the power actor section

2016-05-30 Thread Eduardo Valentin
Simply marking the power actor section and adding a comment describing it. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_core.c | 7 +++ 1 fil

[PATCHv3 31/48] thermal: core: move bind_cdev() to where it is used

2016-05-30 Thread Eduardo Valentin
Moving the helper to closer where it is used. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_core.c | 76 +- 1

[PATCHv3 31/48] thermal: core: move bind_cdev() to where it is used

2016-05-30 Thread Eduardo Valentin
Moving the helper to closer where it is used. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 76 +- 1 file changed, 38 insertions(+), 38 deletions(-) diff

[PATCHv3 32/48] thermal: core: move bind_tz() to where it is used

2016-05-30 Thread Eduardo Valentin
Moving the helper to closer where it is used. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 80 +- 1 file changed, 40 insertions(+), 40 deletions(-) diff

[PATCHv3 33/48] thermal: core: fix couple of style issues on __bind() helper

2016-05-30 Thread Eduardo Valentin
Removing style issues on __bind() and its helpers. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/thermal

[PATCHv3 38/48] thermal: core: add a comment describing the power actor section

2016-05-30 Thread Eduardo Valentin
Simply marking the power actor section and adding a comment describing it. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/thermal

[PATCHv3 36/48] thermal: core: move notify to the zone update section

2016-05-30 Thread Eduardo Valentin
moving the helper function to closer to similar functions. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_core.c | 36 ++--

[PATCHv3 18/48] thermal: core: split available_policies_show()

2016-05-30 Thread Eduardo Valentin
This patch creates a helper to build a list of available governors. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal

[PATCHv3 17/48] thermal: core: split policy_store

2016-05-30 Thread Eduardo Valentin
Similarly to passive_store, policy_store now is split between thermal core data structure handling and sysfs handling. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- dri

[PATCHv3 35/48] thermal: core: add inline to print_bind_err_msg()

2016-05-30 Thread Eduardo Valentin
Given that this is simple wrapper, adding the inline flag. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_core.c | 5 +++-- 1 file changed, 3 inse

[PATCHv3 36/48] thermal: core: move notify to the zone update section

2016-05-30 Thread Eduardo Valentin
moving the helper function to closer to similar functions. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions

[PATCHv3 18/48] thermal: core: split available_policies_show()

2016-05-30 Thread Eduardo Valentin
This patch creates a helper to build a list of available governors. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 35 --- drivers/thermal/thermal_core.h | 1 + 2

[PATCHv3 17/48] thermal: core: split policy_store

2016-05-30 Thread Eduardo Valentin
Similarly to passive_store, policy_store now is split between thermal core data structure handling and sysfs handling. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 37

[PATCHv3 35/48] thermal: core: add inline to print_bind_err_msg()

2016-05-30 Thread Eduardo Valentin
Given that this is simple wrapper, adding the inline flag. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/thermal

[PATCHv3 48/48] thermal: sysfs: use kcalloc() instead of kzalloc()

2016-05-30 Thread Eduardo Valentin
Simplify size computation by using kcalloc() for allocating memory for arrays. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_sysfs.c | 13 -

[PATCHv3 48/48] thermal: sysfs: use kcalloc() instead of kzalloc()

2016-05-30 Thread Eduardo Valentin
Simplify size computation by using kcalloc() for allocating memory for arrays. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_sysfs.c | 13 - 1 file changed, 8 insertions(+), 5 deletions

[PATCHv3 45/48] thermal: core: remove style warnings and checks

2016-05-30 Thread Eduardo Valentin
Removing several style issues in thermal code code. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_core.c | 22 +++--- 1 file

[PATCHv3 47/48] thermal: core: use kzalloc(sizeof(*ptr),...)

2016-05-30 Thread Eduardo Valentin
As a safety check, this patch changes thermal core to check for pointer content size, instead of type size, while allocating memory. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com>

[PATCHv3 44/48] thermal: core: remove void function return statements

2016-05-30 Thread Eduardo Valentin
Simply removing useless returns of void functions. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_core.c | 2 -- 1 file changed, 2 deletions(-)

[PATCHv3 43/48] thermal: core: standardize line breaking alignment

2016-05-30 Thread Eduardo Valentin
Pass through the code to remove check suggested by checkpatch.pl (alignment to parenthesis): CHECK: Alignment should match open parenthesis Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@

[PATCHv3 42/48] thermal: core: small style fix when checking for __find_governor()

2016-05-30 Thread Eduardo Valentin
Remove style issue: CHECK: Comparison to NULL could be written "!__find_governor" + if (__find_governor(governor->name) == NULL) { Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin &

[PATCHv3 34/48] thermal: core: move __bind() to where it is used

2016-05-30 Thread Eduardo Valentin
Moving the helper to closer where it is used. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_core.c | 66 +- 1

[PATCHv3 44/48] thermal: core: remove void function return statements

2016-05-30 Thread Eduardo Valentin
Simply removing useless returns of void functions. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers

[PATCHv3 43/48] thermal: core: standardize line breaking alignment

2016-05-30 Thread Eduardo Valentin
Pass through the code to remove check suggested by checkpatch.pl (alignment to parenthesis): CHECK: Alignment should match open parenthesis Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 32

[PATCHv3 42/48] thermal: core: small style fix when checking for __find_governor()

2016-05-30 Thread Eduardo Valentin
Remove style issue: CHECK: Comparison to NULL could be written "!__find_governor" + if (__find_governor(governor->name) == NULL) { Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.

[PATCHv3 34/48] thermal: core: move __bind() to where it is used

2016-05-30 Thread Eduardo Valentin
Moving the helper to closer where it is used. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 66 +- 1 file changed, 33 insertions(+), 33 deletions(-) diff

[PATCHv3 45/48] thermal: core: remove style warnings and checks

2016-05-30 Thread Eduardo Valentin
Removing several style issues in thermal code code. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git

[PATCHv3 47/48] thermal: core: use kzalloc(sizeof(*ptr),...)

2016-05-30 Thread Eduardo Valentin
As a safety check, this patch changes thermal core to check for pointer content size, instead of type size, while allocating memory. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 7 +++ 1

[PATCHv3 46/48] thermal: core: improve kerneldoc entry of thermal_cooling_device_unregister

2016-05-30 Thread Eduardo Valentin
Improve description and keep 80 columns limit. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_core.c | 6 +++--- 1 file changed, 3 insertions(+),

[PATCHv3 40/48] thermal: sysfs: remove symbols of emul_temp when config is disabled

2016-05-30 Thread Eduardo Valentin
) ^ drivers/thermal/thermal_sysfs.c:395:8: note: in expansion of macro ‘DEVICE_ATTR’ when emul temp is disabled at Kconfig. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- dri

[PATCHv3 41/48] thermal: core: remove FSF address in the GPL notice

2016-05-30 Thread Eduardo Valentin
Simplify the GPL notice by removing the FSF address. No need to track FSF location in this file. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal

[PATCHv3 39/48] thermal: core: add a comment describing the device management section

2016-05-30 Thread Eduardo Valentin
comment describing the section with function to handle registration, unregistration, binding, and unbinding of thermal devices. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com>

[PATCHv3 41/48] thermal: core: remove FSF address in the GPL notice

2016-05-30 Thread Eduardo Valentin
Simplify the GPL notice by removing the FSF address. No need to track FSF location in this file. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 13 - 1 file changed, 13 deletions

[PATCHv3 39/48] thermal: core: add a comment describing the device management section

2016-05-30 Thread Eduardo Valentin
comment describing the section with function to handle registration, unregistration, binding, and unbinding of thermal devices. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 11 +-- 1

[PATCHv3 46/48] thermal: core: improve kerneldoc entry of thermal_cooling_device_unregister

2016-05-30 Thread Eduardo Valentin
Improve description and keep 80 columns limit. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/thermal_core.c

[PATCHv3 40/48] thermal: sysfs: remove symbols of emul_temp when config is disabled

2016-05-30 Thread Eduardo Valentin
) ^ drivers/thermal/thermal_sysfs.c:395:8: note: in expansion of macro ‘DEVICE_ATTR’ when emul temp is disabled at Kconfig. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_sysfs.c | 4 +++- 1 file changed, 3

Re: [PATCHv2 00/40]

2016-05-30 Thread Eduardo Valentin
On Mon, May 30, 2016 at 02:27:19PM -0700, Eduardo Valentin wrote: > Folks, > > This is V2 of a patch series to improve thermal core. The idea > here is to reorganize the code and improve the way we > handle sysfs entries. > > The change in behavior is that now, thermal zon

[PATCHv3 07/48] thermal: core: move passive attr to tz->device.groups

2016-05-30 Thread Eduardo Valentin
mal driver has exposed at least one passive trip point. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_core.c | 41 -

[PATCHv3 07/48] thermal: core: move passive attr to tz->device.groups

2016-05-30 Thread Eduardo Valentin
mal driver has exposed at least one passive trip point. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 41 - 1 file changed, 32 insertions(+), 9 deletions(-) d

Re: [PATCHv2 00/40]

2016-05-30 Thread Eduardo Valentin
On Mon, May 30, 2016 at 02:27:19PM -0700, Eduardo Valentin wrote: > Folks, > > This is V2 of a patch series to improve thermal core. The idea > here is to reorganize the code and improve the way we > handle sysfs entries. > > The change in behavior is that now, thermal zon

[PATCHv3 04/48] thermal: core: use dev.groups to manage always present tz attributes

2016-05-30 Thread Eduardo Valentin
linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_core.c | 86 -- 1 file changed, 33 insertions(+), 53 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/dri

[PATCHv3 00/48] thermal: reorganizing thermal core

2016-05-30 Thread Eduardo Valentin
ues on (new) thermal core. V1->V2: - Removed all checkpatch issues in the existing code that was moved/changed. Rui, it would be great if you could review these earlier. I will be sending two extra patch series on top of this one. BR, Eduardo Valentin (48): thermal: core: prevent

[PATCHv3 08/48] thermal: core: improve power actor documentation

2016-05-30 Thread Eduardo Valentin
Simple improvement on clarity and removal of checkpatch warning in the documentation of power actor kernel doc. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- dri

[PATCHv3 01/48] thermal: core: prevent zones with no types to be registered

2016-05-30 Thread Eduardo Valentin
There are APIs that rely on tz->type. This patch prevent thermal zones without it to be registered. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/ther

[PATCHv3 04/48] thermal: core: use dev.groups to manage always present tz attributes

2016-05-30 Thread Eduardo Valentin
: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 86 -- 1 file changed, 33 insertions(+), 53 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 3ce7882..926442e

[PATCHv3 00/48] thermal: reorganizing thermal core

2016-05-30 Thread Eduardo Valentin
ues on (new) thermal core. V1->V2: - Removed all checkpatch issues in the existing code that was moved/changed. Rui, it would be great if you could review these earlier. I will be sending two extra patch series on top of this one. BR, Eduardo Valentin (48): thermal: core: prevent

[PATCHv3 08/48] thermal: core: improve power actor documentation

2016-05-30 Thread Eduardo Valentin
Simple improvement on clarity and removal of checkpatch warning in the documentation of power actor kernel doc. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 5 +++-- 1 file changed, 3 insertions

[PATCHv3 01/48] thermal: core: prevent zones with no types to be registered

2016-05-30 Thread Eduardo Valentin
There are APIs that rely on tz->type. This patch prevent thermal zones without it to be registered. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 16 1 file changed, 8 inserti

[PATCHv2 01/40] thermal: core: prevent zones with no types to be registered

2016-05-30 Thread Eduardo Valentin
There are APIs that rely on tz->type. This patch prevent thermal zones without it to be registered. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/ther

[PATCHv2 02/40] thermal: core: group thermal_zone DEVICE_ATTR's declarations

2016-05-30 Thread Eduardo Valentin
Simply reorganize the code to have all DEVICE_ATTR's in one point in the file. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_core.c | 20 ++-

[PATCHv2 01/40] thermal: core: prevent zones with no types to be registered

2016-05-30 Thread Eduardo Valentin
There are APIs that rely on tz->type. This patch prevent thermal zones without it to be registered. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 16 1 file changed, 8 inserti

[PATCHv2 02/40] thermal: core: group thermal_zone DEVICE_ATTR's declarations

2016-05-30 Thread Eduardo Valentin
Simply reorganize the code to have all DEVICE_ATTR's in one point in the file. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 20 ++-- 1 file changed, 10 insertions(+), 10

[PATCHv2 00/40]

2016-05-30 Thread Eduardo Valentin
ing code that was moved/changed. Rui, it would be great if you could review these earlier. I will be sending two extra patch series on top of this one. BR, Eduardo Valentin (40): thermal: core: prevent zones with no types to be registered thermal: core: group thermal_zone DEVICE_ATTR's declarati

[PATCHv2 04/40] thermal: core: use dev.groups to manage always present tz attributes

2016-05-30 Thread Eduardo Valentin
linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_core.c | 86 -- 1 file changed, 33 insertions(+), 53 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/dri

[PATCHv2 00/40]

2016-05-30 Thread Eduardo Valentin
ing code that was moved/changed. Rui, it would be great if you could review these earlier. I will be sending two extra patch series on top of this one. BR, Eduardo Valentin (40): thermal: core: prevent zones with no types to be registered thermal: core: group thermal_zone DEVICE_ATTR's declarati

[PATCHv2 04/40] thermal: core: use dev.groups to manage always present tz attributes

2016-05-30 Thread Eduardo Valentin
: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 86 -- 1 file changed, 33 insertions(+), 53 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 3ce7882..926442e

[PATCHv2 06/40] thermal: core: move mode attribute to tz->device.groups

2016-05-30 Thread Eduardo Valentin
ng Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_core.c | 35 +++ 1 file changed, 27 insertions(+), 8 deletions(-) diff --git

[PATCHv2 06/40] thermal: core: move mode attribute to tz->device.groups

2016-05-30 Thread Eduardo Valentin
ui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 35 +++ 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c

[PATCHv2 09/40] thermal: core: move power actor code out of sysfs I/F section

2016-05-30 Thread Eduardo Valentin
Simply reorganize code to keep only functions of sysfs interface of thermal zone device together. Therefore, move the power actor code out of the sysfs I/F section. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Va

[PATCHv2 13/40] thermal: core: create tz->device.groups dynamically

2016-05-30 Thread Eduardo Valentin
linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_core.c | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_

[PATCHv2 12/40] thermal: core: move the trip attrs to the tz sysfs I/F section

2016-05-30 Thread Eduardo Valentin
Code reorganization to keep all the sysfs I/F of a thermal zone in the same section. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubez...@gmail.com> --- drivers/thermal/thermal_

[PATCHv2 13/40] thermal: core: create tz->device.groups dynamically

2016-05-30 Thread Eduardo Valentin
-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 8f1a16e..7a30863 100644 --- a/drivers/thermal

[PATCHv2 12/40] thermal: core: move the trip attrs to the tz sysfs I/F section

2016-05-30 Thread Eduardo Valentin
Code reorganization to keep all the sysfs I/F of a thermal zone in the same section. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 216 - 1 file changed

[PATCHv2 09/40] thermal: core: move power actor code out of sysfs I/F section

2016-05-30 Thread Eduardo Valentin
Simply reorganize code to keep only functions of sysfs interface of thermal zone device together. Therefore, move the power actor code out of the sysfs I/F section. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal

[PATCHv2 15/40] thermal: core: remove unnecessary device_remove() calls

2016-05-30 Thread Eduardo Valentin
Given that cdevs sysfs properties are already registered using the dev.groups, there is no need to explicitly call device_remove() for each property. Cc: Zhang Rui <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin &

<    5   6   7   8   9   10   11   12   13   14   >