[PATCH 05/15] thermal: sysfs: lock tz while on trip_point_hyst properties

2016-05-31 Thread Eduardo Valentin
Serialized calls to tz.ops in user facing sysfs handler trip_point_hyst_store() and trip_point_hyst_show(). 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, 4 insertions

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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 &

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

2016-05-31 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

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

2016-05-31 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

[PATCHv4 16/48] thermal: core: split passive_store

2016-05-31 Thread Eduardo Valentin
Split passive_store between sysfs handling and thermal core internal data 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> --- drivers/thermal/thermal

[PATCHv4 16/48] thermal: core: split passive_store

2016-05-31 Thread Eduardo Valentin
Split passive_store between sysfs handling and thermal core internal data 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 | 62 -- drivers/thermal

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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_

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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 +++---

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

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

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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 &

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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 ++--

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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>

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

2016-05-31 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 &

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

2016-05-31 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(-)

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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(+),

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

2016-05-31 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

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

2016-05-31 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.

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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>

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

2016-05-31 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

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

2016-05-31 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 +++

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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 -

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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.

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

2016-05-31 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

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

2016-05-31 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 71fb762..9545e15 100644

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

2016-05-31 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...@

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

2016-05-31 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 &

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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

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

2016-05-31 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

[PATCHv4 10/48] thermal: core: remove useless empty line

2016-05-31 Thread Eduardo Valentin
Fix style problem on create_trip_attrs(); 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 | 1 - 1 file changed, 1 deletion(-) diff --git a/dri

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

2016-05-31 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_

[PATCHv4 10/48] thermal: core: remove useless empty line

2016-05-31 Thread Eduardo Valentin
Fix style problem on create_trip_attrs(); Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal

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

2016-05-31 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 ab03dfc..ba4f7a9 100644 --- a/drivers/thermal

Re: [PATCHv3 00/48] thermal: reorganizing thermal core

2016-05-31 Thread Eduardo Valentin
On Tue, May 31, 2016 at 09:54:08AM +0530, Keerthy wrote: > Hi Eduardo, > > On Tuesday 31 May 2016 03:45 AM, Eduardo Valentin wrote: > >Folks, > > > >This is V3 of a patch series to improve thermal core. The idea > >here is to reorganize the code and improve t

Re: [PATCHv3 00/48] thermal: reorganizing thermal core

2016-05-31 Thread Eduardo Valentin
On Tue, May 31, 2016 at 09:54:08AM +0530, Keerthy wrote: > Hi Eduardo, > > On Tuesday 31 May 2016 03:45 AM, Eduardo Valentin wrote: > >Folks, > > > >This is V3 of a patch series to improve thermal core. The idea > >here is to reorganize the code and improve t

[PATCHv3 02/48] 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 ++-

[PATCHv3 05/48] thermal: core: move emul_temp creation to tz->device.groups

2016-05-30 Thread Eduardo Valentin
emul_temp creation is dependent on a compile time condition. Moving to tz->device.groups. 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 10/48] thermal: core: remove useless empty line

2016-05-30 Thread Eduardo Valentin
Fix style problem on create_trip_attrs(); 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 | 1 - 1 file changed, 1 deletion(-) diff --git a/dri

[PATCHv3 09/48] 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

[PATCHv3 03/48] thermal: core: group device_create_file() calls that are always created

2016-05-30 Thread Eduardo Valentin
Simple code reorganization to group files that are always created when registering a thermal zone. 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 05/48] thermal: core: move emul_temp creation to tz->device.groups

2016-05-30 Thread Eduardo Valentin
emul_temp creation is dependent on a compile time condition. Moving to tz->device.groups. 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, 4 insertions(+)

[PATCHv3 10/48] thermal: core: remove useless empty line

2016-05-30 Thread Eduardo Valentin
Fix style problem on create_trip_attrs(); Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal

[PATCHv3 09/48] 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

[PATCHv3 03/48] thermal: core: group device_create_file() calls that are always created

2016-05-30 Thread Eduardo Valentin
Simple code reorganization to group files that are always created when registering a thermal zone. Cc: Zhang Rui Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 24 1 file changed, 12

[PATCHv3 02/48] 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

[PATCHv3 16/48] thermal: core: split passive_store

2016-05-30 Thread Eduardo Valentin
Split passive_store between sysfs handling and thermal core internal data 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> --- drivers/thermal/thermal

[PATCHv3 12/48] 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_

[PATCHv3 06/48] 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

[PATCHv3 16/48] thermal: core: split passive_store

2016-05-30 Thread Eduardo Valentin
Split passive_store between sysfs handling and thermal core internal data 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 | 62 -- drivers/thermal

[PATCHv3 12/48] 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

[PATCHv3 06/48] 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

[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 <rui.zh...@intel.com> Cc: linux...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin &

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