[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180608105120.2e232f44@canb.auug.org.au>
Date: Fri, 8 Jun 2018 10:51:20 +1000
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Zhang Rui <rui.zhang@...el.com>
Cc: Linux-Next Mailing List <linux-next@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Kees Cook <keescook@...omium.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Eduardo Valentin <edubezval@...il.com>
Subject: linux-next: build failure after merge of the thermal tree
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@...b.auug.org.au>
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@...b.auug.org.au>
---
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
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists