public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
* linux-next: manual merge of the thermal-soc tree with the thermal tree
@ 2015-03-24  2:11 Stephen Rothwell
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Rothwell @ 2015-03-24  2:11 UTC (permalink / raw)
  To: Eduardo Valentin, Zhang Rui; +Cc: linux-next, linux-kernel, Kapileshwar Singh

[-- Attachment #1: Type: text/plain, Size: 1068 bytes --]

Hi Eduardo,

Today's linux-next merge of the thermal-soc tree got a conflict in
include/linux/thermal.h between commit 33f1e05e1536 ("Thermal:
initialize thermal zone device correctly") from the thermal tree and
commit f7e41876c4b2 ("thermal: of: fix cooling device weights in device
tree") from the thermal-soc tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb•auug.org.au

diff --cc include/linux/thermal.h
index 8650b0b14da4,6bbe11c97cea..000000000000
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@@ -40,9 -40,9 +40,12 @@@
  /* No upper/lower limit requirement */
  #define THERMAL_NO_LIMIT	((u32)~0)
  
 +/* Invalid/uninitialized temperature */
 +#define THERMAL_TEMP_INVALID	-27400
 +
+ /* Default weight of a bound cooling device */
+ #define THERMAL_WEIGHT_DEFAULT 0
+ 
  /* Unit conversion macros */
  #define KELVIN_TO_CELSIUS(t)	(long)(((long)t-2732 >= 0) ?	\
  				((long)t-2732+5)/10 : ((long)t-2732-5)/10)

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* linux-next: manual merge of the thermal-soc tree with the thermal tree
@ 2016-07-04  2:55 Stephen Rothwell
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Rothwell @ 2016-07-04  2:55 UTC (permalink / raw)
  To: Eduardo Valentin; +Cc: linux-next, linux-kernel, Zhang Rui, Sascha Hauer

Hi Eduardo,

Today's linux-next merge of the thermal-soc tree got conflicts in:

  drivers/thermal/thermal_core.c
  drivers/thermal/thermal_helpers.c
  drivers/thermal/thermal_sysfs.c

between commits from the thermal tree and the same (or similar) patches
from the thermal-soc tree.

It looks like a the patches have been slightly changed when applied to the
thermal tree and then more commist have been applied to the thermal-soc
tree, so there are a few conflicts generated.   Please fix up these trees.

I fixed it up (I used what seemed the appropriate versions - which may
or may not be the right ones) and can carry the fixes as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

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

* linux-next: manual merge of the thermal-soc tree with the thermal tree
@ 2016-08-04  1:29 Stephen Rothwell
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Rothwell @ 2016-08-04  1:29 UTC (permalink / raw)
  To: Eduardo Valentin, Zhang Rui; +Cc: linux-next, linux-kernel, Michele Di Giorgio

Hi Eduardo,

Today's linux-next merge of the thermal-soc tree got a conflict in:

  drivers/thermal/thermal_core.c

between commit:

  c61628f5c6be ("thermal: fix race condition when updating cooling device")

from the thermal tree and commit:

  5eb0037dc771 ("thermal: core: introduce thermal_helpers.c")

from the thermal-soc tree.

I fixed it up (the function thermal_cdev_update was moved to
drivers/thermal/thermal_helpers.c, so I applied teh below fix patch) and
can carry the fix as necessary. This is now fixed as far as linux-next
is concerned, but any non trivial conflicts should be mentioned to your
upstream maintainer when your tree is submitted for merging.  You may
also want to consider cooperating with the maintainer of the conflicting
tree to minimise any particularly complex conflicts.

From: Stephen Rothwell <sfr@canb•auug.org.au>
Date: Thu, 4 Aug 2016 11:19:56 +1000
Subject: [PATCH] thermal: fix up for "fix race condition when updating cooling device"

Signed-off-by: Stephen Rothwell <sfr@canb•auug.org.au>
---
 drivers/thermal/thermal_helpers.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/thermal/thermal_helpers.c b/drivers/thermal/thermal_helpers.c
index 2d37d9d718c2..14b7f5c0655a 100644
--- a/drivers/thermal/thermal_helpers.c
+++ b/drivers/thermal/thermal_helpers.c
@@ -121,11 +121,13 @@ void thermal_cdev_update(struct thermal_cooling_device *cdev)
 	struct thermal_instance *instance;
 	unsigned long target = 0;
 
+	mutex_lock(&cdev->lock);
 	/* cooling device is updated*/
-	if (cdev->updated)
+	if (cdev->updated) {
+		mutex_unlock(&cdev->lock);
 		return;
+	}
 
-	mutex_lock(&cdev->lock);
 	/* Make sure cdev enters the deepest cooling state */
 	list_for_each_entry(instance, &cdev->thermal_instances, cdev_node) {
 		dev_dbg(&cdev->device, "zone%d->target=%lu\n",
@@ -135,9 +137,9 @@ void thermal_cdev_update(struct thermal_cooling_device *cdev)
 		if (instance->target > target)
 			target = instance->target;
 	}
-	mutex_unlock(&cdev->lock);
 	cdev->ops->set_cur_state(cdev, target);
 	cdev->updated = true;
+	mutex_unlock(&cdev->lock);
 	trace_cdev_update(cdev, target);
 	dev_dbg(&cdev->device, "set to state %lu\n", target);
 }
-- 
2.8.1

-- 
Cheers,
Stephen Rothwell

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

end of thread, other threads:[~2016-08-04  1:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-24  2:11 linux-next: manual merge of the thermal-soc tree with the thermal tree Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2016-07-04  2:55 Stephen Rothwell
2016-08-04  1:29 Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox