Skip to contentSkip to conversation

linux-next: build failure after merge of the thermal tree

PATCH Stephen Rothwell 1 participant 2 messages Jun 8, 2018

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

Hi Zhang,

After merging the thermal tree, today's linux-next build (x86_64 allmodconfig) failed like this:

drivers/thermal/qcom/tsens.c: In function 'tsens_probe':
drivers/thermal/qcom/tsens.c:144:31: error: 's' undeclared (first use in this function)

         num_sensors * sizeof(*s), GFP_KERNEL);
                               ^

Caused by commit

6d7c70d1cd65 ("thermal: qcom: tsens: Allow number of sensors to come from DT")

interacting with commit

0ed2dd03b94b ("treewide: Use struct_size() for devm_kmalloc() and friends")

from Linus' tree. It looks like git somehow screwed up the automatic conflict resolution.

I have added the following patch for today:

From: Stephen Rothwell <[email protected]>
Date: Fri, 8 Jun 2018 10:46:46 +1000
Subject: [PATCH] thermal: gcom: fix up bad git conflict resolution

---
 drivers/thermal/qcom/tsens.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/thermal/qcom/tsens.c +2 -2
index fb8c87f55240..6164fd36dda3 100644
@@ -140,8 +140,8 @@ static int tsens_probe(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
-	tmdev = devm_kzalloc(dev, sizeof(*tmdev) +
-			     num_sensors * sizeof(*s), GFP_KERNEL);
+	tmdev = devm_kzalloc(dev, struct_size(tmdev, sensor, num_sensors),
+			     GFP_KERNEL);
 	if (!tmdev)
 		return -ENOMEM;
 
Signature · 5 lines
2.17.1

-- 
Cheers,
Stephen Rothwell
#1 lore raw

Hi all,

Quoted 11 lines · On Fri, 8 Jun 2018 10:51:20 +1000 Stephen Rothwell <[email protected]> wrote:

After merging the thermal tree, today's linux-next build (x86_64 allmodconfig) failed like this:

drivers/thermal/qcom/tsens.c: In function 'tsens_probe':
drivers/thermal/qcom/tsens.c:144:31: error: 's' undeclared (first use in this function)

         num_sensors * sizeof(*s), GFP_KERNEL);
                               ^

Caused by commit

Quoted 8 lines

6d7c70d1cd65 ("thermal: qcom: tsens: Allow number of sensors to come from DT")

interacting with commit

0ed2dd03b94b ("treewide: Use struct_size() for devm_kmalloc() and friends")

from Linus' tree. It looks like git somehow screwed up the automatic conflict resolution.

OK, this was caused by a bad rerere entry in my tree (from my recent import of Andrew's mmotm patch series). Sorry about that, I have fixed it up.

Signature · 2 lines
Cheers,
Stephen Rothwell