From: kernel test robot <lkp@intel.com>
To: Xiantao Hu <xt.hu@cqplus1.com>,
wim@linux-watchdog.org, p.zabel@pengutronix.de,
linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org,
linux@roeck-us.net, robh+dt@kernel.org,
devicetree@vger.kernel.org
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
wells.lu@sunplus.com, qinjian@cqplus1.com,
Xiantao Hu <xt.hu@cqplus1.com>
Subject: Re: [PATCH 1/2] watchdog: Add watchdog driver for Sunplus SP7021
Date: Sun, 21 Nov 2021 08:33:06 +0800 [thread overview]
Message-ID: <202111210825.DeYso6W5-lkp@intel.com> (raw)
In-Reply-To: <20211112105952.216280-2-xt.hu@cqplus1.com>
[-- Attachment #1: Type: text/plain, Size: 4342 bytes --]
Hi Xiantao,
I love your patch! Perhaps something to improve:
[auto build test WARNING on pza/reset/next]
[also build test WARNING on robh/for-next linux/master linus/master v5.16-rc1 next-20211118]
[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/Xiantao-Hu/Add-watchdog-driver-for-Sunplus-SP7021-SoC/20211112-191201
base: https://git.pengutronix.de/git/pza/linux reset/next
config: arm64-randconfig-r023-20211115 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project fbe72e41b99dc7994daac300d208a955be3e4a0a)
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
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/0day-ci/linux/commit/eac808eeed4a851ca5cfef12adefd6df199f62c2
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Xiantao-Hu/Add-watchdog-driver-for-Sunplus-SP7021-SoC/20211112-191201
git checkout eac808eeed4a851ca5cfef12adefd6df199f62c2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/watchdog/sunplus_wdt.c:191:27: warning: variable 'clk' is uninitialized when used here [-Wuninitialized]
err = clk_prepare_enable(clk);
^~~
drivers/watchdog/sunplus_wdt.c:178:17: note: initialize the variable 'clk' to silence this warning
struct clk *clk;
^
= NULL
1 warning generated.
vim +/clk +191 drivers/watchdog/sunplus_wdt.c
172
173 static int sp_wdt_probe(struct platform_device *pdev)
174 {
175 struct device *dev = &pdev->dev;
176 struct sp_wdt_priv *priv;
177 struct resource *wdt_res;
178 struct clk *clk;
179 int err;
180
181 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
182 if (!priv)
183 return -ENOMEM;
184
185 priv->clk = devm_clk_get(dev, NULL);
186 if (IS_ERR(priv->clk)) {
187 dev_err(dev, "Can't find clock source\n");
188 return PTR_ERR(priv->clk);
189 }
190
> 191 err = clk_prepare_enable(clk);
192 if (err) {
193 dev_err(dev, "Clock can't be enabled correctly\n");
194 return err;
195 }
196
197 priv->rstc = devm_reset_control_get_exclusive(dev, NULL);
198 if (!IS_ERR(priv->rstc))
199 reset_control_deassert(priv->rstc);
200
201 platform_set_drvdata(pdev, priv);
202
203 priv->base = devm_platform_ioremap_resource(pdev, 0);
204 if (IS_ERR(priv->base))
205 return PTR_ERR(priv->base);
206
207 wdt_res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
208 priv->miscellaneous =
209 devm_ioremap(dev, wdt_res->start, resource_size(wdt_res));
210 if (IS_ERR(priv->miscellaneous))
211 return PTR_ERR(priv->miscellaneous);
212
213 priv->wdev.info = &sp_wdt_info;
214 priv->wdev.ops = &sp_wdt_ops;
215 priv->wdev.timeout = SP_WDT_MAX_TIMEOUT;
216 priv->wdev.max_timeout = SP_WDT_MAX_TIMEOUT;
217 priv->wdev.min_timeout = SP_WDT_MIN_TIMEOUT;
218 priv->wdev.parent = dev;
219
220 watchdog_set_drvdata(&priv->wdev, priv);
221 sp_wdt_hw_init(&priv->wdev);
222
223 watchdog_init_timeout(&priv->wdev, timeout, dev);
224 watchdog_set_nowayout(&priv->wdev, nowayout);
225 watchdog_stop_on_reboot(&priv->wdev);
226
227 err = devm_watchdog_register_device(dev, &priv->wdev);
228 if (unlikely(err))
229 return err;
230
231 dev_info(dev, "Watchdog enabled (timeout=%d sec%s.)\n",
232 priv->wdev.timeout, nowayout ? ", nowayout" : "");
233
234 return 0;
235 }
236
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 39807 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 1/2] watchdog: Add watchdog driver for Sunplus SP7021
Date: Sun, 21 Nov 2021 08:33:06 +0800 [thread overview]
Message-ID: <202111210825.DeYso6W5-lkp@intel.com> (raw)
In-Reply-To: <20211112105952.216280-2-xt.hu@cqplus1.com>
[-- Attachment #1: Type: text/plain, Size: 4456 bytes --]
Hi Xiantao,
I love your patch! Perhaps something to improve:
[auto build test WARNING on pza/reset/next]
[also build test WARNING on robh/for-next linux/master linus/master v5.16-rc1 next-20211118]
[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/Xiantao-Hu/Add-watchdog-driver-for-Sunplus-SP7021-SoC/20211112-191201
base: https://git.pengutronix.de/git/pza/linux reset/next
config: arm64-randconfig-r023-20211115 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project fbe72e41b99dc7994daac300d208a955be3e4a0a)
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
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/0day-ci/linux/commit/eac808eeed4a851ca5cfef12adefd6df199f62c2
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Xiantao-Hu/Add-watchdog-driver-for-Sunplus-SP7021-SoC/20211112-191201
git checkout eac808eeed4a851ca5cfef12adefd6df199f62c2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/watchdog/sunplus_wdt.c:191:27: warning: variable 'clk' is uninitialized when used here [-Wuninitialized]
err = clk_prepare_enable(clk);
^~~
drivers/watchdog/sunplus_wdt.c:178:17: note: initialize the variable 'clk' to silence this warning
struct clk *clk;
^
= NULL
1 warning generated.
vim +/clk +191 drivers/watchdog/sunplus_wdt.c
172
173 static int sp_wdt_probe(struct platform_device *pdev)
174 {
175 struct device *dev = &pdev->dev;
176 struct sp_wdt_priv *priv;
177 struct resource *wdt_res;
178 struct clk *clk;
179 int err;
180
181 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
182 if (!priv)
183 return -ENOMEM;
184
185 priv->clk = devm_clk_get(dev, NULL);
186 if (IS_ERR(priv->clk)) {
187 dev_err(dev, "Can't find clock source\n");
188 return PTR_ERR(priv->clk);
189 }
190
> 191 err = clk_prepare_enable(clk);
192 if (err) {
193 dev_err(dev, "Clock can't be enabled correctly\n");
194 return err;
195 }
196
197 priv->rstc = devm_reset_control_get_exclusive(dev, NULL);
198 if (!IS_ERR(priv->rstc))
199 reset_control_deassert(priv->rstc);
200
201 platform_set_drvdata(pdev, priv);
202
203 priv->base = devm_platform_ioremap_resource(pdev, 0);
204 if (IS_ERR(priv->base))
205 return PTR_ERR(priv->base);
206
207 wdt_res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
208 priv->miscellaneous =
209 devm_ioremap(dev, wdt_res->start, resource_size(wdt_res));
210 if (IS_ERR(priv->miscellaneous))
211 return PTR_ERR(priv->miscellaneous);
212
213 priv->wdev.info = &sp_wdt_info;
214 priv->wdev.ops = &sp_wdt_ops;
215 priv->wdev.timeout = SP_WDT_MAX_TIMEOUT;
216 priv->wdev.max_timeout = SP_WDT_MAX_TIMEOUT;
217 priv->wdev.min_timeout = SP_WDT_MIN_TIMEOUT;
218 priv->wdev.parent = dev;
219
220 watchdog_set_drvdata(&priv->wdev, priv);
221 sp_wdt_hw_init(&priv->wdev);
222
223 watchdog_init_timeout(&priv->wdev, timeout, dev);
224 watchdog_set_nowayout(&priv->wdev, nowayout);
225 watchdog_stop_on_reboot(&priv->wdev);
226
227 err = devm_watchdog_register_device(dev, &priv->wdev);
228 if (unlikely(err))
229 return err;
230
231 dev_info(dev, "Watchdog enabled (timeout=%d sec%s.)\n",
232 priv->wdev.timeout, nowayout ? ", nowayout" : "");
233
234 return 0;
235 }
236
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 39807 bytes --]
next prev parent reply other threads:[~2021-11-21 0:33 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-12 10:59 [PATCH 0/2] Add watchdog driver for Sunplus SP7021 SoC Xiantao Hu
2021-11-12 10:59 ` [PATCH 1/2] watchdog: Add watchdog driver for Sunplus SP7021 Xiantao Hu
2021-11-12 14:45 ` Guenter Roeck
2021-11-24 10:31 ` xt.hu[胡先韬]
2021-11-21 0:33 ` kernel test robot [this message]
2021-11-21 0:33 ` kernel test robot
2021-11-12 10:59 ` [PATCH 2/2] dt-bindings: watchdog: Add Sunplus SP7021 WDT devicetree bindings documentation Xiantao Hu
2021-11-24 10:41 ` [PATCH v2 0/2] Add watchdog driver for Sunplus SP7021 SoC Xiantao Hu
2021-11-24 10:41 ` [PATCH v2 1/2] watchdog: Add watchdog driver for Sunplus SP7021 Xiantao Hu
2021-11-24 14:25 ` Guenter Roeck
2021-11-25 2:42 ` xt.hu[胡先韬]
2021-11-25 4:25 ` Guenter Roeck
2021-11-29 7:57 ` xt.hu[胡先韬]
2021-12-03 21:39 ` Guenter Roeck
2021-11-24 10:41 ` [PATCH v2 2/2] dt-bindings: watchdog: Add Sunplus SP7021 WDT devicetree bindings documentation Xiantao Hu
2021-11-30 22:38 ` Rob Herring
2021-11-24 14:17 ` [PATCH v2 0/2] Add watchdog driver for Sunplus SP7021 SoC Guenter Roeck
2021-11-25 2:52 ` xt.hu[胡先韬]
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=202111210825.DeYso6W5-lkp@intel.com \
--to=lkp@intel.com \
--cc=devicetree@vger.kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=llvm@lists.linux.dev \
--cc=p.zabel@pengutronix.de \
--cc=qinjian@cqplus1.com \
--cc=robh+dt@kernel.org \
--cc=wells.lu@sunplus.com \
--cc=wim@linux-watchdog.org \
--cc=xt.hu@cqplus1.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.