All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Wolfram Sang <wsa-dev@sang-engineering.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [wsa:wdt/no-register-err 6/6] drivers/watchdog/visconti_wdt.c:121:6: warning: unused variable 'ret'
Date: Wed, 13 Aug 2025 00:12:59 +0800	[thread overview]
Message-ID: <202508130035.9LtioUyg-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git wdt/no-register-err
head:   c462756b3b70c001e5920601aa078ef3731fc291
commit: c462756b3b70c001e5920601aa078ef3731fc291 [6/6] watchdog: visconti: don't print superfluous errors
config: x86_64-buildonly-randconfig-001-20250812 (https://download.01.org/0day-ci/archive/20250813/202508130035.9LtioUyg-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250813/202508130035.9LtioUyg-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/202508130035.9LtioUyg-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/watchdog/visconti_wdt.c:121:6: warning: unused variable 'ret' [-Wunused-variable]
     121 |         int ret;
         |             ^~~
   1 warning generated.


vim +/ret +121 drivers/watchdog/visconti_wdt.c

c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  114  
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  115  static int visconti_wdt_probe(struct platform_device *pdev)
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  116  {
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  117  	struct watchdog_device *wdev;
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  118  	struct visconti_wdt_priv *priv;
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  119  	struct device *dev = &pdev->dev;
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  120  	struct clk *clk;
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05 @121  	int ret;
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  122  	unsigned long clk_freq;
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  123  
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  124  	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  125  	if (!priv)
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  126  		return -ENOMEM;
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  127  
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  128  	priv->base = devm_platform_ioremap_resource(pdev, 0);
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  129  	if (IS_ERR(priv->base))
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  130  		return PTR_ERR(priv->base);
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  131  
8c5210dbdf7e92 Christophe JAILLET 2022-12-30  132  	clk = devm_clk_get_enabled(dev, NULL);
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  133  	if (IS_ERR(clk))
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  134  		return dev_err_probe(dev, PTR_ERR(clk), "Could not get clock\n");
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  135  
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  136  	clk_freq = clk_get_rate(clk);
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  137  	if (!clk_freq)
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  138  		return -EINVAL;
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  139  
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  140  	priv->div = clk_freq / VISCONTI_WDT_FREQ;
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  141  
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  142  	/* Initialize struct watchdog_device. */
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  143  	wdev = &priv->wdev;
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  144  	wdev->info = &visconti_wdt_info;
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  145  	wdev->ops = &visconti_wdt_ops;
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  146  	wdev->parent = dev;
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  147  	wdev->min_timeout = 1;
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  148  	wdev->max_timeout = 0xffffffff / VISCONTI_WDT_FREQ;
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  149  	wdev->timeout = min(wdev->max_timeout, WDT_DEFAULT_TIMEOUT);
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  150  
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  151  	watchdog_set_drvdata(wdev, priv);
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  152  	watchdog_set_nowayout(wdev, nowayout);
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  153  	watchdog_stop_on_unregister(wdev);
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  154  
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  155  	/* This overrides the default timeout only if DT configuration was found */
c462756b3b70c0 Wolfram Sang       2025-08-12  156  	watchdog_init_timeout(wdev, 0, dev);
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  157  
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  158  	return devm_watchdog_register_device(dev, wdev);
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  159  }
c5b8e4644607b0 Nobuhiro Iwamatsu  2020-10-05  160  

:::::: The code at line 121 was first introduced by commit
:::::: c5b8e4644607b0319fd86a36fb0caad54ee2021e watchdog: Add Toshiba Visconti watchdog driver

:::::: TO: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
:::::: CC: Wim Van Sebroeck <wim@linux-watchdog.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2025-08-12 16:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202508130035.9LtioUyg-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=wsa-dev@sang-engineering.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.