All of lore.kernel.org
 help / color / mirror / Atom feed
* [ipmi:ipmi-wdt-rework 5/10] drivers/hwmon/sch56xx-common.c:289:12: error: static declaration of 'watchdog_start' follows non-static declaration
@ 2020-06-20  1:30 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-06-20  1:30 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 6380 bytes --]

tree:   https://github.com/cminyard/linux-ipmi ipmi-wdt-rework
head:   a22010ce71ef67492980e4c55ad7864679826b53
commit: d8aebbc6501b431180c705c6e8a4fc4e129325ec [5/10] watchdog: Export an interface to start the watchdog
config: s390-allyesconfig (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.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
        git checkout d8aebbc6501b431180c705c6e8a4fc4e129325ec
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=s390 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/hwmon/sch56xx-common.c:245:12: error: static declaration of 'watchdog_set_timeout' follows non-static declaration
     245 | static int watchdog_set_timeout(struct watchdog_device *wddev,
         |            ^~~~~~~~~~~~~~~~~~~~
   In file included from drivers/hwmon/sch56xx-common.c:17:
   include/linux/watchdog.h:205:5: note: previous declaration of 'watchdog_set_timeout' was here
     205 | int watchdog_set_timeout(struct watchdog_device *wdd, unsigned int timeout);
         |     ^~~~~~~~~~~~~~~~~~~~
>> drivers/hwmon/sch56xx-common.c:289:12: error: static declaration of 'watchdog_start' follows non-static declaration
     289 | static int watchdog_start(struct watchdog_device *wddev)
         |            ^~~~~~~~~~~~~~
   In file included from drivers/hwmon/sch56xx-common.c:17:
   include/linux/watchdog.h:209:5: note: previous declaration of 'watchdog_start' was here
     209 | int watchdog_start(struct watchdog_device *wdd);
         |     ^~~~~~~~~~~~~~

vim +/watchdog_start +289 drivers/hwmon/sch56xx-common.c

312869ec935ab3b Hans de Goede 2012-03-18  288  
fb551405c0f8e15 Hans de Goede 2012-05-22 @289  static int watchdog_start(struct watchdog_device *wddev)
312869ec935ab3b Hans de Goede 2012-03-18  290  {
fb551405c0f8e15 Hans de Goede 2012-05-22  291  	struct sch56xx_watchdog_data *data = watchdog_get_drvdata(wddev);
312869ec935ab3b Hans de Goede 2012-03-18  292  	int ret;
312869ec935ab3b Hans de Goede 2012-03-18  293  	u8 val;
312869ec935ab3b Hans de Goede 2012-03-18  294  
312869ec935ab3b Hans de Goede 2012-03-18  295  	/*
312869ec935ab3b Hans de Goede 2012-03-18  296  	 * The sch56xx's watchdog cannot really be started / stopped
312869ec935ab3b Hans de Goede 2012-03-18  297  	 * it is always running, but we can avoid the timer expiring
312869ec935ab3b Hans de Goede 2012-03-18  298  	 * from causing a system reset by clearing the output enable bit.
312869ec935ab3b Hans de Goede 2012-03-18  299  	 *
312869ec935ab3b Hans de Goede 2012-03-18  300  	 * The sch56xx's watchdog will set the watchdog event bit, bit 0
312869ec935ab3b Hans de Goede 2012-03-18  301  	 * of the second interrupt source register (at base-address + 9),
312869ec935ab3b Hans de Goede 2012-03-18  302  	 * when the timer expires.
312869ec935ab3b Hans de Goede 2012-03-18  303  	 *
312869ec935ab3b Hans de Goede 2012-03-18  304  	 * This will only cause a system reset if the 0-1 flank happens when
312869ec935ab3b Hans de Goede 2012-03-18  305  	 * output enable is true. Setting output enable after the flank will
312869ec935ab3b Hans de Goede 2012-03-18  306  	 * not cause a reset, nor will the timer expiring a second time.
312869ec935ab3b Hans de Goede 2012-03-18  307  	 * This means we must clear the watchdog event bit in case it is set.
312869ec935ab3b Hans de Goede 2012-03-18  308  	 *
312869ec935ab3b Hans de Goede 2012-03-18  309  	 * The timer may still be running (after a recent watchdog_stop) and
312869ec935ab3b Hans de Goede 2012-03-18  310  	 * mere milliseconds away from expiring, so the timer must be reset
312869ec935ab3b Hans de Goede 2012-03-18  311  	 * first!
312869ec935ab3b Hans de Goede 2012-03-18  312  	 */
312869ec935ab3b Hans de Goede 2012-03-18  313  
312869ec935ab3b Hans de Goede 2012-03-18  314  	mutex_lock(data->io_lock);
312869ec935ab3b Hans de Goede 2012-03-18  315  
312869ec935ab3b Hans de Goede 2012-03-18  316  	/* 1. Reset the watchdog countdown counter */
312869ec935ab3b Hans de Goede 2012-03-18  317  	ret = sch56xx_write_virtual_reg(data->addr, SCH56XX_REG_WDOG_PRESET,
312869ec935ab3b Hans de Goede 2012-03-18  318  					data->watchdog_preset);
312869ec935ab3b Hans de Goede 2012-03-18  319  	if (ret)
312869ec935ab3b Hans de Goede 2012-03-18  320  		goto leave;
312869ec935ab3b Hans de Goede 2012-03-18  321  
85a2e40cb505357 Hans de Goede 2012-05-22  322  	/* 2. Enable output */
85a2e40cb505357 Hans de Goede 2012-05-22  323  	val = data->watchdog_output_enable | SCH56XX_WDOG_OUTPUT_ENABLE;
312869ec935ab3b Hans de Goede 2012-03-18  324  	ret = sch56xx_write_virtual_reg(data->addr,
85a2e40cb505357 Hans de Goede 2012-05-22  325  					SCH56XX_REG_WDOG_OUTPUT_ENABLE, val);
312869ec935ab3b Hans de Goede 2012-03-18  326  	if (ret)
312869ec935ab3b Hans de Goede 2012-03-18  327  		goto leave;
312869ec935ab3b Hans de Goede 2012-03-18  328  
312869ec935ab3b Hans de Goede 2012-03-18  329  	data->watchdog_output_enable = val;
312869ec935ab3b Hans de Goede 2012-03-18  330  
312869ec935ab3b Hans de Goede 2012-03-18  331  	/* 3. Clear the watchdog event bit if set */
312869ec935ab3b Hans de Goede 2012-03-18  332  	val = inb(data->addr + 9);
312869ec935ab3b Hans de Goede 2012-03-18  333  	if (val & 0x01)
312869ec935ab3b Hans de Goede 2012-03-18  334  		outb(0x01, data->addr + 9);
312869ec935ab3b Hans de Goede 2012-03-18  335  
312869ec935ab3b Hans de Goede 2012-03-18  336  leave:
312869ec935ab3b Hans de Goede 2012-03-18  337  	mutex_unlock(data->io_lock);
312869ec935ab3b Hans de Goede 2012-03-18  338  	return ret;
312869ec935ab3b Hans de Goede 2012-03-18  339  }
312869ec935ab3b Hans de Goede 2012-03-18  340  

:::::: The code at line 289 was first introduced by commit
:::::: fb551405c0f8e15d6fc7ae6e16a5e15382f8b8ac watchdog: sch56xx: Use watchdog core

:::::: TO: Hans de Goede <hdegoede@redhat.com>
:::::: CC: Wim Van Sebroeck <wim@iguana.be>

---
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: 62647 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [ipmi:ipmi-wdt-rework 5/10] drivers/hwmon/sch56xx-common.c:289:12: error: static declaration of 'watchdog_start' follows non-static declaration
@ 2020-06-20  6:11 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-06-20  6:11 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 8745 bytes --]

tree:   https://github.com/cminyard/linux-ipmi ipmi-wdt-rework
head:   a22010ce71ef67492980e4c55ad7864679826b53
commit: d8aebbc6501b431180c705c6e8a4fc4e129325ec [5/10] watchdog: Export an interface to start the watchdog
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 487ca07fcc75d52755c9fe2ee05bcb3b6eeeec44)
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 x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        git checkout d8aebbc6501b431180c705c6e8a4fc4e129325ec
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/hwmon/sch56xx-common.c:245:12: error: static declaration of 'watchdog_set_timeout' follows non-static declaration
   static int watchdog_set_timeout(struct watchdog_device *wddev,
              ^
   include/linux/watchdog.h:205:5: note: previous declaration is here
   int watchdog_set_timeout(struct watchdog_device *wdd, unsigned int timeout);
       ^
>> drivers/hwmon/sch56xx-common.c:289:12: error: static declaration of 'watchdog_start' follows non-static declaration
   static int watchdog_start(struct watchdog_device *wddev)
              ^
   include/linux/watchdog.h:209:5: note: previous declaration is here
   int watchdog_start(struct watchdog_device *wdd);
       ^
   2 errors generated.
--
   drivers/watchdog/f71808e_wdt.c:221:12: error: static declaration of 'watchdog_set_timeout' follows non-static declaration
   static int watchdog_set_timeout(int timeout)
              ^
   include/linux/watchdog.h:205:5: note: previous declaration is here
   int watchdog_set_timeout(struct watchdog_device *wdd, unsigned int timeout);
       ^
>> drivers/watchdog/f71808e_wdt.c:330:12: error: static declaration of 'watchdog_start' follows non-static declaration
   static int watchdog_start(void)
              ^
   include/linux/watchdog.h:209:5: note: previous declaration is here
   int watchdog_start(struct watchdog_device *wdd);
       ^
>> drivers/watchdog/f71808e_wdt.c:519:23: error: too few arguments to function call, single argument 'wdd' was not specified
           err = watchdog_start();
                 ~~~~~~~~~~~~~~ ^
   include/linux/watchdog.h:209:5: note: 'watchdog_start' declared here
   int watchdog_start(struct watchdog_device *wdd);
       ^
   drivers/watchdog/f71808e_wdt.c:631:26: error: too few arguments to function call, single argument 'wdd' was not specified
                           return watchdog_start();
                                  ~~~~~~~~~~~~~~ ^
   include/linux/watchdog.h:209:5: note: 'watchdog_start' declared here
   int watchdog_start(struct watchdog_device *wdd);
       ^
   drivers/watchdog/f71808e_wdt.c:642:39: error: too few arguments to function call, expected 2, have 1
                   if (watchdog_set_timeout(new_timeout))
                       ~~~~~~~~~~~~~~~~~~~~            ^
   include/linux/watchdog.h:205:5: note: 'watchdog_set_timeout' declared here
   int watchdog_set_timeout(struct watchdog_device *wdd, unsigned int timeout);
       ^
   drivers/watchdog/f71808e_wdt.c:711:36: error: too few arguments to function call, expected 2, have 1
           err = watchdog_set_timeout(timeout);
                 ~~~~~~~~~~~~~~~~~~~~        ^
   include/linux/watchdog.h:205:5: note: 'watchdog_set_timeout' declared here
   int watchdog_set_timeout(struct watchdog_device *wdd, unsigned int timeout);
       ^
   drivers/watchdog/f71808e_wdt.c:737:24: error: too few arguments to function call, single argument 'wdd' was not specified
                   err = watchdog_start();
                         ~~~~~~~~~~~~~~ ^
   include/linux/watchdog.h:209:5: note: 'watchdog_start' declared here
   int watchdog_start(struct watchdog_device *wdd);
       ^
   7 errors generated.

vim +/watchdog_start +289 drivers/hwmon/sch56xx-common.c

312869ec935ab3 Hans de Goede 2012-03-18  288  
fb551405c0f8e1 Hans de Goede 2012-05-22 @289  static int watchdog_start(struct watchdog_device *wddev)
312869ec935ab3 Hans de Goede 2012-03-18  290  {
fb551405c0f8e1 Hans de Goede 2012-05-22  291  	struct sch56xx_watchdog_data *data = watchdog_get_drvdata(wddev);
312869ec935ab3 Hans de Goede 2012-03-18  292  	int ret;
312869ec935ab3 Hans de Goede 2012-03-18  293  	u8 val;
312869ec935ab3 Hans de Goede 2012-03-18  294  
312869ec935ab3 Hans de Goede 2012-03-18  295  	/*
312869ec935ab3 Hans de Goede 2012-03-18  296  	 * The sch56xx's watchdog cannot really be started / stopped
312869ec935ab3 Hans de Goede 2012-03-18  297  	 * it is always running, but we can avoid the timer expiring
312869ec935ab3 Hans de Goede 2012-03-18  298  	 * from causing a system reset by clearing the output enable bit.
312869ec935ab3 Hans de Goede 2012-03-18  299  	 *
312869ec935ab3 Hans de Goede 2012-03-18  300  	 * The sch56xx's watchdog will set the watchdog event bit, bit 0
312869ec935ab3 Hans de Goede 2012-03-18  301  	 * of the second interrupt source register (at base-address + 9),
312869ec935ab3 Hans de Goede 2012-03-18  302  	 * when the timer expires.
312869ec935ab3 Hans de Goede 2012-03-18  303  	 *
312869ec935ab3 Hans de Goede 2012-03-18  304  	 * This will only cause a system reset if the 0-1 flank happens when
312869ec935ab3 Hans de Goede 2012-03-18  305  	 * output enable is true. Setting output enable after the flank will
312869ec935ab3 Hans de Goede 2012-03-18  306  	 * not cause a reset, nor will the timer expiring a second time.
312869ec935ab3 Hans de Goede 2012-03-18  307  	 * This means we must clear the watchdog event bit in case it is set.
312869ec935ab3 Hans de Goede 2012-03-18  308  	 *
312869ec935ab3 Hans de Goede 2012-03-18  309  	 * The timer may still be running (after a recent watchdog_stop) and
312869ec935ab3 Hans de Goede 2012-03-18  310  	 * mere milliseconds away from expiring, so the timer must be reset
312869ec935ab3 Hans de Goede 2012-03-18  311  	 * first!
312869ec935ab3 Hans de Goede 2012-03-18  312  	 */
312869ec935ab3 Hans de Goede 2012-03-18  313  
312869ec935ab3 Hans de Goede 2012-03-18  314  	mutex_lock(data->io_lock);
312869ec935ab3 Hans de Goede 2012-03-18  315  
312869ec935ab3 Hans de Goede 2012-03-18  316  	/* 1. Reset the watchdog countdown counter */
312869ec935ab3 Hans de Goede 2012-03-18  317  	ret = sch56xx_write_virtual_reg(data->addr, SCH56XX_REG_WDOG_PRESET,
312869ec935ab3 Hans de Goede 2012-03-18  318  					data->watchdog_preset);
312869ec935ab3 Hans de Goede 2012-03-18  319  	if (ret)
312869ec935ab3 Hans de Goede 2012-03-18  320  		goto leave;
312869ec935ab3 Hans de Goede 2012-03-18  321  
85a2e40cb50535 Hans de Goede 2012-05-22  322  	/* 2. Enable output */
85a2e40cb50535 Hans de Goede 2012-05-22  323  	val = data->watchdog_output_enable | SCH56XX_WDOG_OUTPUT_ENABLE;
312869ec935ab3 Hans de Goede 2012-03-18  324  	ret = sch56xx_write_virtual_reg(data->addr,
85a2e40cb50535 Hans de Goede 2012-05-22  325  					SCH56XX_REG_WDOG_OUTPUT_ENABLE, val);
312869ec935ab3 Hans de Goede 2012-03-18  326  	if (ret)
312869ec935ab3 Hans de Goede 2012-03-18  327  		goto leave;
312869ec935ab3 Hans de Goede 2012-03-18  328  
312869ec935ab3 Hans de Goede 2012-03-18  329  	data->watchdog_output_enable = val;
312869ec935ab3 Hans de Goede 2012-03-18  330  
312869ec935ab3 Hans de Goede 2012-03-18  331  	/* 3. Clear the watchdog event bit if set */
312869ec935ab3 Hans de Goede 2012-03-18  332  	val = inb(data->addr + 9);
312869ec935ab3 Hans de Goede 2012-03-18  333  	if (val & 0x01)
312869ec935ab3 Hans de Goede 2012-03-18  334  		outb(0x01, data->addr + 9);
312869ec935ab3 Hans de Goede 2012-03-18  335  
312869ec935ab3 Hans de Goede 2012-03-18  336  leave:
312869ec935ab3 Hans de Goede 2012-03-18  337  	mutex_unlock(data->io_lock);
312869ec935ab3 Hans de Goede 2012-03-18  338  	return ret;
312869ec935ab3 Hans de Goede 2012-03-18  339  }
312869ec935ab3 Hans de Goede 2012-03-18  340  

:::::: The code at line 289 was first introduced by commit
:::::: fb551405c0f8e15d6fc7ae6e16a5e15382f8b8ac watchdog: sch56xx: Use watchdog core

:::::: TO: Hans de Goede <hdegoede@redhat.com>
:::::: CC: Wim Van Sebroeck <wim@iguana.be>

---
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: 75286 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-20  6:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-20  1:30 [ipmi:ipmi-wdt-rework 5/10] drivers/hwmon/sch56xx-common.c:289:12: error: static declaration of 'watchdog_start' follows non-static declaration kernel test robot
2020-06-20  6:11 kernel test robot

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.