linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: David Ober <dober6023@gmail.com>, wim@linux-watchdog.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux@roeck-us.net, linux-kernel@vger.kernel.org,
	linux-watchdog@vger.kernel.org, mpearson@lenovo.com,
	dober@lenovo.com, David Ober <dober6023@gmail.com>
Subject: Re: [PATCH] watchdog: add in watchdog for nct6686
Date: Fri, 8 Sep 2023 22:54:43 +0800	[thread overview]
Message-ID: <202309082202.ZRLExbNG-lkp@intel.com> (raw)
In-Reply-To: <20230907113517.31147-1-dober6023@gmail.com>

Hi David,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.5 next-20230908]
[cannot apply to groeck-staging/hwmon-next]
[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/David-Ober/watchdog-add-in-watchdog-for-nct6686/20230907-235048
base:   linus/master
patch link:    https://lore.kernel.org/r/20230907113517.31147-1-dober6023%40gmail.com
patch subject: [PATCH] watchdog: add in watchdog for nct6686
config: powerpc64-allyesconfig (https://download.01.org/0day-ci/archive/20230908/202309082202.ZRLExbNG-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230908/202309082202.ZRLExbNG-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/202309082202.ZRLExbNG-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/watchdog/nct6686_wdt.c:352:3: warning: variable 'wdt' is uninitialized when used here [-Wuninitialized]
     352 |                 wdt->timeout, nowayout);
         |                 ^~~
   include/linux/dev_printk.h:155:39: note: expanded from macro 'dev_dbg'
     155 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                              ^~~~~~~~~~~
   include/linux/dynamic_debug.h:274:19: note: expanded from macro 'dynamic_dev_dbg'
     274 |                            dev, fmt, ##__VA_ARGS__)
         |                                        ^~~~~~~~~~~
   include/linux/dynamic_debug.h:250:59: note: expanded from macro '_dynamic_func_call'
     250 |         _dynamic_func_call_cls(_DPRINTK_CLASS_DFLT, fmt, func, ##__VA_ARGS__)
         |                                                                  ^~~~~~~~~~~
   include/linux/dynamic_debug.h:248:65: note: expanded from macro '_dynamic_func_call_cls'
     248 |         __dynamic_func_call_cls(__UNIQUE_ID(ddebug), cls, fmt, func, ##__VA_ARGS__)
         |                                                                        ^~~~~~~~~~~
   include/linux/dynamic_debug.h:224:15: note: expanded from macro '__dynamic_func_call_cls'
     224 |                 func(&id, ##__VA_ARGS__);                       \
         |                             ^~~~~~~~~~~
   drivers/watchdog/nct6686_wdt.c:309:29: note: initialize the variable 'wdt' to silence this warning
     309 |         struct watchdog_device *wdt;
         |                                    ^
         |                                     = NULL
   1 warning generated.


vim +/wdt +352 drivers/watchdog/nct6686_wdt.c

   305	
   306	static int nct6686_probe(struct platform_device *pdev)
   307	{
   308		struct device *dev = &pdev->dev;
   309		struct watchdog_device *wdt;
   310		struct resource *res;
   311		struct nct6686_data *data;
   312		struct nct6686_sio_data *sio_data = dev->platform_data;
   313		int ret;
   314		u_char reg;
   315	
   316		dev_dbg(&pdev->dev, "Probe NCT6686 called\n");
   317		res = platform_get_resource(pdev, IORESOURCE_IO, 0);
   318		if (!devm_request_region(dev, res->start, IOREGION_LENGTH, DRVNAME))
   319			return -EBUSY;
   320	
   321		data = devm_kzalloc(dev, sizeof(struct nct6686_data), GFP_KERNEL);
   322		if (!data)
   323			return -ENOMEM;
   324	
   325		data->sio_data.sioreg = sio_data->sioreg;
   326		data->addr = res->start;
   327		mutex_init(&data->update_lock);
   328		platform_set_drvdata(pdev, data);
   329	
   330		/* Watchdog initialization */
   331		data->wdt.ops = &nct6686_wdt_ops;
   332		data->wdt.info = &nct6686_wdt_info;
   333	
   334		data->wdt.timeout = WATCHDOG_TIMEOUT; /* Set default timeout */
   335		data->wdt.min_timeout = MIN_TIMEOUT;
   336		data->wdt.max_timeout = MAX_TIMEOUT;
   337		data->wdt.parent = &pdev->dev;
   338	
   339		watchdog_init_timeout(&data->wdt, timeout, &pdev->dev);
   340		watchdog_set_nowayout(&data->wdt, nowayout);
   341		watchdog_set_drvdata(&data->wdt, data);
   342	
   343		/* reset trigger status */
   344		reg = nct6686_read(data, WDT_STS);
   345		nct6686_write(data, WDT_STS, reg & ~WDT_STS_EVT_MSK);
   346	
   347		watchdog_stop_on_unregister(&data->wdt);
   348	
   349		ret = devm_watchdog_register_device(dev, &data->wdt);
   350	
   351		dev_dbg(&pdev->dev, "initialized. timeout=%d sec (nowayout=%d)\n",
 > 352			wdt->timeout, nowayout);
   353	
   354		return ret;
   355	}
   356	

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

      reply	other threads:[~2023-09-08 14:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-07 11:35 [PATCH] watchdog: add in watchdog for nct6686 David Ober
2023-09-08 14:54 ` 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=202309082202.ZRLExbNG-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=dober6023@gmail.com \
    --cc=dober@lenovo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=llvm@lists.linux.dev \
    --cc=mpearson@lenovo.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=wim@linux-watchdog.org \
    /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).