[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202202050309.wemilTv5-lkp@intel.com>
Date: Sat, 5 Feb 2022 03:30:42 +0800
From: kernel test robot <lkp@...el.com>
To: Jean-Jacques Hiblot <jjhiblot@...phandler.com>,
geert+renesas@...der.be, Wim Van Sebroeck <wim@...ux-watchdog.org>,
Guenter Roeck <linux@...ck-us.net>
Cc: kbuild-all@...ts.01.org, Phil Edworthy <phil.edworthy@...esas.com>,
Jean-Jacques Hiblot <jjhiblot@...phandler.com>,
linux-kernel@...r.kernel.org, linux-watchdog@...r.kernel.org
Subject: Re: [PATCH 6/6] watchdog: Add Renesas RZ/N1 Watchdog driver
Hi Jean-Jacques,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on robh/for-next]
[also build test ERROR on geert-renesas-devel/next geert-renesas-drivers/renesas-clk linus/master v5.17-rc2 next-20220204]
[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/Jean-Jacques-Hiblot/ARM-r9a06g032-add-support-for-the-watchdogs/20220205-001909
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20220205/202202050309.wemilTv5-lkp@intel.com/config)
compiler: arceb-elf-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/12248ab8278751ebab4bf211becde9db4956ca5a
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jean-Jacques-Hiblot/ARM-r9a06g032-add-support-for-the-watchdogs/20220205-001909
git checkout 12248ab8278751ebab4bf211becde9db4956ca5a
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
drivers/watchdog/rzn1_wdt.c: In function 'rzn1_wdt_probe':
>> drivers/watchdog/rzn1_wdt.c:134:25: error: 'NO_IRQ' undeclared (first use in this function); did you mean 'NR_IRQS'?
134 | if (wdt->irq == NO_IRQ) {
| ^~~~~~
| NR_IRQS
drivers/watchdog/rzn1_wdt.c:134:25: note: each undeclared identifier is reported only once for each function it appears in
vim +134 drivers/watchdog/rzn1_wdt.c
112
113 static int rzn1_wdt_probe(struct platform_device *pdev)
114 {
115 struct rzn1_watchdog *wdt;
116 int ret;
117 struct device_node *np = pdev->dev.of_node;
118 int err;
119 struct clk *clk;
120
121 wdt = devm_kzalloc(&pdev->dev, sizeof(*wdt), GFP_KERNEL);
122 if (!wdt)
123 return -ENOMEM;
124 wdt->dev = &pdev->dev;
125 wdt->wdt = rzn1_wdt_dev;
126 platform_set_drvdata(pdev, wdt);
127
128 wdt->base = devm_platform_ioremap_resource(pdev, 0);
129 if (IS_ERR(wdt->base)) {
130 dev_err(wdt->dev, "unable to get register bank\n");
131 return PTR_ERR(wdt->base);
132 }
133 wdt->irq = irq_of_parse_and_map(np, 0);
> 134 if (wdt->irq == NO_IRQ) {
135 dev_err(wdt->dev, "failed to get IRQ from DT\n");
136 return -EINVAL;
137 }
138
139 err = devm_request_irq(wdt->dev, wdt->irq, rzn1_wdt_irq, 0,
140 np->name, wdt);
141 if (err) {
142 dev_err(wdt->dev, "failed to request irq %d\n", wdt->irq);
143 return err;
144 }
145 clk = devm_clk_get(wdt->dev, NULL);
146 if (!IS_ERR(clk) && clk_prepare_enable(clk))
147 return PTR_ERR(clk);
148
149 wdt->clk_rate = clk_get_rate(clk);
150 if (!wdt->clk_rate) {
151 err = -EINVAL;
152 goto err_clk_disable;
153 }
154
155 wdt->reload_val = RZN1_WDT_MAX;
156 wdt->wdt.max_hw_heartbeat_ms = (RZN1_WDT_MAX * 1000) /
157 (wdt->clk_rate / RZN1_WDT_PRESCALER);
158
159 ret = watchdog_init_timeout(&wdt->wdt, 0, &pdev->dev);
160 if (ret)
161 dev_warn(&pdev->dev, "Specified timeout invalid, using default");
162
163 ret = devm_watchdog_register_device(&pdev->dev, &wdt->wdt);
164 if (ret)
165 goto error;
166
167 dev_info(wdt->dev, "Initialized\n");
168
169 return 0;
170
171 error:
172 err_clk_disable:
173 clk_disable_unprepare(clk);
174 dev_warn(wdt->dev, "Initialization failed\n");
175 return err;
176 }
177
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Powered by blists - more mailing lists