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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <sfr@xxxxxxxxxxxxxxxx>
Date: Fri, 8 Jun 2018 10:46:46 +1000
Subject: [PATCH] thermal: gcom: fix up bad git conflict resolution

Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
---
 drivers/thermal/qcom/tsens.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
index fb8c87f55240..6164fd36dda3 100644
--- a/drivers/thermal/qcom/tsens.c
+++ b/drivers/thermal/qcom/tsens.c
@@ -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;
 
-- 
2.17.1

-- 
Cheers,
Stephen Rothwell

Attachment: pgpdDFpKV1LXH.pgp
Description: OpenPGP digital signature


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux