From: kernel test robot <lkp@intel.com>
To: Viacheslav Bocharov <adeep@lexina.in>,
Neil Armstrong <neil.armstrong@linaro.org>,
Kevin Hilman <khilman@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
linux-amlogic@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH 4/4] firmware: meson_sm: use meson_gx_socinfo for compatibility
Date: Fri, 3 Nov 2023 08:22:49 +0800 [thread overview]
Message-ID: <202311030839.2qiIuOUl-lkp@intel.com> (raw)
In-Reply-To: <20231102074916.3280809-5-adeep@lexina.in>
Hi Viacheslav,
kernel test robot noticed the following build errors:
[auto build test ERROR on soc/for-next]
[also build test ERROR on linus/master v6.6 next-20231102]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Viacheslav-Bocharov/firmware-meson-sm-change-sprintf-to-scnprintf/20231102-172556
base: https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git for-next
patch link: https://lore.kernel.org/r/20231102074916.3280809-5-adeep%40lexina.in
patch subject: [PATCH 4/4] firmware: meson_sm: use meson_gx_socinfo for compatibility
config: arm64-randconfig-003-20231103 (https://download.01.org/0day-ci/archive/20231103/202311030839.2qiIuOUl-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231103/202311030839.2qiIuOUl-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311030839.2qiIuOUl-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/firmware/meson/meson_sm.c: In function 'chipid_show':
>> drivers/firmware/meson/meson_sm.c:328:19: error: 'uint32' undeclared (first use in this function); did you mean 'uint32_t'?
328 | ((uint32)t *)buff)[0] = 0;
| ^~~~~~
| uint32_t
drivers/firmware/meson/meson_sm.c:328:19: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/firmware/meson/meson_sm.c:328:26: error: expected ')' before 't'
328 | ((uint32)t *)buff)[0] = 0;
| ~ ^
| )
>> drivers/firmware/meson/meson_sm.c:328:30: error: expected ';' before 'buff'
328 | ((uint32)t *)buff)[0] = 0;
| ^~~~
| ;
>> drivers/firmware/meson/meson_sm.c:328:34: error: expected statement before ')' token
328 | ((uint32)t *)buff)[0] = 0;
| ^
>> drivers/firmware/meson/meson_sm.c:328:35: error: expected expression before '[' token
328 | ((uint32)t *)buff)[0] = 0;
| ^
drivers/firmware/meson/meson_sm.c:331:17: error: 'ch' undeclared (first use in this function)
331 | ch = (uint8_t *)(id_buf + 4);
| ^~
drivers/firmware/meson/meson_sm.c:332:22: error: 'i' undeclared (first use in this function)
332 | for (i = 0; i < 12; i++)
| ^
vim +328 drivers/firmware/meson/meson_sm.c
281
282 static ssize_t chipid_show(struct device *dev, struct device_attribute *attr,
283 char *buf)
284 {
285 struct platform_device *pdev = to_platform_device(dev);
286 struct meson_sm_firmware *fw;
287 uint8_t *id_buf;
288 int ret;
289
290 fw = platform_get_drvdata(pdev);
291
292 id_buf = kmalloc(SM_CHIP_ID_LENGTH, GFP_KERNEL);
293 if (!id_buf)
294 return -ENOMEM;
295
296 ret = meson_sm_call_read(fw, id_buf, SM_CHIP_ID_LENGTH, SM_GET_CHIP_ID,
297 2, 0, 0, 0, 0);
298 if (ret < 0) {
299 kfree(id_buf);
300 return ret;
301 }
302
303 int version = *((unsigned int *)id_buf);
304
305 if (version == 2)
306 ret = scnprintf(buf, PAGE_SIZE, "%16phN\n", &id_buf[SM_CHIP_ID_OFFSET]);
307 else {
308 /**
309 * Legacy 12-byte chip ID read out, transform data
310 * to expected order format.
311 */
312 uint8_t *buff;
313
314 buff = kmalloc(SM_CHIP_ID_LENGTH, GFP_KERNEL);
315 if (!buff)
316 return -ENOMEM;
317 #ifdef CONFIG_MESON_GX_SOCINFO
318 uint8_t *ch;
319 int i;
320
321 ((uint32_t *)buff)[0] =
322 ((meson_gx_socinfo & 0xff000000) | // Family ID
323 ((meson_gx_socinfo << 8) & 0xff0000) | // Chip Revision
324 ((meson_gx_socinfo >> 8) & 0xff00)); // Package ID
325
326 ((uint32_t *)buff)[0] = htonl(((uint32_t *)buff)[0]);
327 #else
> 328 ((uint32)t *)buff)[0] = 0;
329 #endif
330 /* Transform into expected order for display */
331 ch = (uint8_t *)(id_buf + 4);
332 for (i = 0; i < 12; i++)
333 buff[i + 4] = ch[11 - i];
334 ret = scnprintf(buf, PAGE_SIZE, "%16phN\n", &buff);
335 kfree(buff);
336 }
337
338 kfree(id_buf);
339 return ret;
340 }
341
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2023-11-03 0:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-02 7:49 [PATCH 0/4] RFC: firmware: meson-sm: add chipid sysfs export Viacheslav Bocharov
2023-11-02 7:49 ` [PATCH 1/4] firmware: meson-sm: change sprintf to scnprintf Viacheslav Bocharov
2023-11-02 7:49 ` [PATCH 2/4] firmware: meson_sm: Add chipid number sysfs entry Viacheslav Bocharov
2023-11-02 22:11 ` kernel test robot
2023-11-02 7:49 ` [PATCH 3/4] soc: amlogic: meson-gx-socinfo: export socinfo for use in other modules Viacheslav Bocharov
2023-11-02 9:23 ` Krzysztof Kozlowski
2023-11-02 7:49 ` [PATCH 4/4] firmware: meson_sm: use meson_gx_socinfo for compatibility Viacheslav Bocharov
2023-11-02 9:26 ` Krzysztof Kozlowski
2023-11-02 10:02 ` Viacheslav
2023-11-03 0:22 ` kernel test robot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202311030839.2qiIuOUl-lkp@intel.com \
--to=lkp@intel.com \
--cc=adeep@lexina.in \
--cc=devicetree@vger.kernel.org \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=neil.armstrong@linaro.org \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).