Re: [PATCH v2 12/12] watchdog: s3c2410: Add Exynos850 support
From: kernel test robot
Date: Sun Oct 31 2021 - 12:10:53 EST
Hi Sam,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on robh/for-next]
[also build test ERROR on groeck-staging/hwmon-next linus/master v5.15-rc7 next-20211029]
[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]
url: https://github.com/0day-ci/linux/commits/Sam-Protsenko/watchdog-s3c2410-Add-Exynos850-support/20211031-202352
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: xtensa-randconfig-r012-20211031 (attached as .config)
compiler: xtensa-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/ff70b806cc12adc068bb54865f81d3aa29a69471
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Sam-Protsenko/watchdog-s3c2410-Add-Exynos850-support/20211031-202352
git checkout ff70b806cc12adc068bb54865f81d3aa29a69471
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=xtensa SHELL=/bin/bash drivers/watchdog/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All errors (new ones prefixed by >>):
drivers/watchdog/s3c2410_wdt.c: In function 's3c2410_get_wdt_drv_data':
>> drivers/watchdog/s3c2410_wdt.c:592:25: error: 'drv_data_exynos850' undeclared (first use in this function)
592 | if (variant == &drv_data_exynos850) {
| ^~~~~~~~~~~~~~~~~~
drivers/watchdog/s3c2410_wdt.c:592:25: note: each undeclared identifier is reported only once for each function it appears in
vim +/drv_data_exynos850 +592 drivers/watchdog/s3c2410_wdt.c
571
572 static inline const struct s3c2410_wdt_variant *
573 s3c2410_get_wdt_drv_data(struct platform_device *pdev)
574 {
575 const struct s3c2410_wdt_variant *variant;
576 struct s3c2410_wdt_variant *data;
577 struct device *dev = &pdev->dev;
578
579 variant = of_device_get_match_data(dev);
580 if (!variant) {
581 /* Device matched by platform_device_id */
582 variant = (struct s3c2410_wdt_variant *)
583 platform_get_device_id(pdev)->driver_data;
584 }
585
586 /* Have to copy driver data over to keep its const qualifier intact */
587 data = devm_kmemdup(dev, variant, sizeof(*variant), GFP_KERNEL);
588 if (!data)
589 return NULL;
590
591 /* Populate missing fields for Exynos850 w.r.t. cluster index */
> 592 if (variant == &drv_data_exynos850) {
593 u32 index;
594 int err;
595
596 err = of_property_read_u32(dev->of_node, "samsung,index",
597 &index);
598 if (err) {
599 dev_err(dev, "failed to get cluster index\n");
600 return NULL;
601 }
602
603 switch (index) {
604 case 0:
605 data->mask_reset_reg = EXYNOS850_CLUSTER0_NONCPU_INT_EN;
606 data->rst_stat_bit = EXYNOS850_CLUSTER0_WDTRESET_BIT;
607 data->cnt_en_reg = EXYNOS850_CLUSTER0_NONCPU_OUT;
608 break;
609 case 1:
610 data->mask_reset_reg = EXYNOS850_CLUSTER1_NONCPU_INT_EN;
611 data->rst_stat_bit = EXYNOS850_CLUSTER1_WDTRESET_BIT;
612 data->cnt_en_reg = EXYNOS850_CLUSTER1_NONCPU_OUT;
613 break;
614 default:
615 dev_err(dev, "wrong cluster index: %u\n", index);
616 return NULL;
617 }
618 }
619
620 return data;
621 }
622
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip