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

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

tree:   https://github.com/cminyard/linux-ipmi ipmi-wdt-rework
head:   a22010ce71ef67492980e4c55ad7864679826b53
commit: dd98cd72e76155295670444d779227ee5a6694d5 [4/10] watchdog: Add functions to set the timeout and pretimeout
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 dd98cd72e76155295670444d779227ee5a6694d5
        # 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);
       ^
   1 error generated.
--
>> drivers/hwmon/w83793.c:1190:12: error: static declaration of 'watchdog_set_timeout' follows non-static declaration
   static int watchdog_set_timeout(struct w83793_data *data, 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/hwmon/w83793.c:1429:30: error: incompatible pointer types passing 'struct w83793_data *' to parameter of type 'struct watchdog_device *' [-Werror,-Wincompatible-pointer-types]
                   ret = watchdog_set_timeout(data, val);
                                              ^~~~
   include/linux/watchdog.h:205:50: note: passing argument to parameter 'wdd' here
   int watchdog_set_timeout(struct watchdog_device *wdd, unsigned int timeout);
                                                    ^
   2 errors generated.
--
>> drivers/hwmon/fschmd.c:697:12: error: static declaration of 'watchdog_set_timeout' follows non-static declaration
   static int watchdog_set_timeout(struct fschmd_data *data, 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/hwmon/fschmd.c:925:30: error: incompatible pointer types passing 'struct fschmd_data *' to parameter of type 'struct watchdog_device *' [-Werror,-Wincompatible-pointer-types]
                   ret = watchdog_set_timeout(data, i);
                                              ^~~~
   include/linux/watchdog.h:205:50: note: passing argument to parameter 'wdd' here
   int watchdog_set_timeout(struct watchdog_device *wdd, unsigned int timeout);
                                                    ^
   drivers/hwmon/fschmd.c:1230:24: error: incompatible pointer types passing 'struct fschmd_data *' to parameter of type 'struct watchdog_device *' [-Werror,-Wincompatible-pointer-types]
                   watchdog_set_timeout(data, 60);
                                        ^~~~
   include/linux/watchdog.h:205:50: note: passing argument to parameter 'wdd' here
   int watchdog_set_timeout(struct watchdog_device *wdd, unsigned int timeout);
                                                    ^
   3 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: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);
       ^
   3 errors generated.

vim +/watchdog_set_timeout +245 drivers/hwmon/sch56xx-common.c

28ff2f7a742dab Hans de Goede 2011-07-25  240  
312869ec935ab3 Hans de Goede 2012-03-18  241  /*
312869ec935ab3 Hans de Goede 2012-03-18  242   * Watchdog routines
312869ec935ab3 Hans de Goede 2012-03-18  243   */
312869ec935ab3 Hans de Goede 2012-03-18  244  
fb551405c0f8e1 Hans de Goede 2012-05-22 @245  static int watchdog_set_timeout(struct watchdog_device *wddev,
fb551405c0f8e1 Hans de Goede 2012-05-22  246  				unsigned int timeout)
312869ec935ab3 Hans de Goede 2012-03-18  247  {
fb551405c0f8e1 Hans de Goede 2012-05-22  248  	struct sch56xx_watchdog_data *data = watchdog_get_drvdata(wddev);
fb551405c0f8e1 Hans de Goede 2012-05-22  249  	unsigned int resolution;
312869ec935ab3 Hans de Goede 2012-03-18  250  	u8 control;
fb551405c0f8e1 Hans de Goede 2012-05-22  251  	int ret;
312869ec935ab3 Hans de Goede 2012-03-18  252  
312869ec935ab3 Hans de Goede 2012-03-18  253  	/* 1 second or 60 second resolution? */
312869ec935ab3 Hans de Goede 2012-03-18  254  	if (timeout <= 255)
312869ec935ab3 Hans de Goede 2012-03-18  255  		resolution = 1;
312869ec935ab3 Hans de Goede 2012-03-18  256  	else
312869ec935ab3 Hans de Goede 2012-03-18  257  		resolution = 60;
312869ec935ab3 Hans de Goede 2012-03-18  258  
312869ec935ab3 Hans de Goede 2012-03-18  259  	if (timeout < resolution || timeout > (resolution * 255))
312869ec935ab3 Hans de Goede 2012-03-18  260  		return -EINVAL;
312869ec935ab3 Hans de Goede 2012-03-18  261  
312869ec935ab3 Hans de Goede 2012-03-18  262  	if (resolution == 1)
312869ec935ab3 Hans de Goede 2012-03-18  263  		control = data->watchdog_control | SCH56XX_WDOG_TIME_BASE_SEC;
312869ec935ab3 Hans de Goede 2012-03-18  264  	else
312869ec935ab3 Hans de Goede 2012-03-18  265  		control = data->watchdog_control & ~SCH56XX_WDOG_TIME_BASE_SEC;
312869ec935ab3 Hans de Goede 2012-03-18  266  
312869ec935ab3 Hans de Goede 2012-03-18  267  	if (data->watchdog_control != control) {
312869ec935ab3 Hans de Goede 2012-03-18  268  		mutex_lock(data->io_lock);
312869ec935ab3 Hans de Goede 2012-03-18  269  		ret = sch56xx_write_virtual_reg(data->addr,
312869ec935ab3 Hans de Goede 2012-03-18  270  						SCH56XX_REG_WDOG_CONTROL,
312869ec935ab3 Hans de Goede 2012-03-18  271  						control);
312869ec935ab3 Hans de Goede 2012-03-18  272  		mutex_unlock(data->io_lock);
312869ec935ab3 Hans de Goede 2012-03-18  273  		if (ret)
fb551405c0f8e1 Hans de Goede 2012-05-22  274  			return ret;
312869ec935ab3 Hans de Goede 2012-03-18  275  
312869ec935ab3 Hans de Goede 2012-03-18  276  		data->watchdog_control = control;
312869ec935ab3 Hans de Goede 2012-03-18  277  	}
312869ec935ab3 Hans de Goede 2012-03-18  278  
312869ec935ab3 Hans de Goede 2012-03-18  279  	/*
312869ec935ab3 Hans de Goede 2012-03-18  280  	 * Remember new timeout value, but do not write as that (re)starts
312869ec935ab3 Hans de Goede 2012-03-18  281  	 * the watchdog countdown.
312869ec935ab3 Hans de Goede 2012-03-18  282  	 */
312869ec935ab3 Hans de Goede 2012-03-18  283  	data->watchdog_preset = DIV_ROUND_UP(timeout, resolution);
fb551405c0f8e1 Hans de Goede 2012-05-22  284  	wddev->timeout = data->watchdog_preset * resolution;
312869ec935ab3 Hans de Goede 2012-03-18  285  
fb551405c0f8e1 Hans de Goede 2012-05-22  286  	return 0;
312869ec935ab3 Hans de Goede 2012-03-18  287  }
312869ec935ab3 Hans de Goede 2012-03-18  288  

:::::: The code at line 245 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

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

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

tree:   https://github.com/cminyard/linux-ipmi ipmi-wdt-rework
head:   a22010ce71ef67492980e4c55ad7864679826b53
commit: dd98cd72e76155295670444d779227ee5a6694d5 [4/10] watchdog: Add functions to set the timeout and pretimeout
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 dd98cd72e76155295670444d779227ee5a6694d5
        # 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/w83793.c:1190:12: error: conflicting types for 'watchdog_set_timeout'
    1190 | static int watchdog_set_timeout(struct w83793_data *data, int timeout)
         |            ^~~~~~~~~~~~~~~~~~~~
   In file included from drivers/hwmon/w83793.c:30:
   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);
         |     ^~~~~~~~~~~~~~~~~~~~

vim +/watchdog_set_timeout +245 drivers/hwmon/sch56xx-common.c

28ff2f7a742daba Hans de Goede 2011-07-25  240  
312869ec935ab3b Hans de Goede 2012-03-18  241  /*
312869ec935ab3b Hans de Goede 2012-03-18  242   * Watchdog routines
312869ec935ab3b Hans de Goede 2012-03-18  243   */
312869ec935ab3b Hans de Goede 2012-03-18  244  
fb551405c0f8e15 Hans de Goede 2012-05-22 @245  static int watchdog_set_timeout(struct watchdog_device *wddev,
fb551405c0f8e15 Hans de Goede 2012-05-22  246  				unsigned int timeout)
312869ec935ab3b Hans de Goede 2012-03-18  247  {
fb551405c0f8e15 Hans de Goede 2012-05-22  248  	struct sch56xx_watchdog_data *data = watchdog_get_drvdata(wddev);
fb551405c0f8e15 Hans de Goede 2012-05-22  249  	unsigned int resolution;
312869ec935ab3b Hans de Goede 2012-03-18  250  	u8 control;
fb551405c0f8e15 Hans de Goede 2012-05-22  251  	int ret;
312869ec935ab3b Hans de Goede 2012-03-18  252  
312869ec935ab3b Hans de Goede 2012-03-18  253  	/* 1 second or 60 second resolution? */
312869ec935ab3b Hans de Goede 2012-03-18  254  	if (timeout <= 255)
312869ec935ab3b Hans de Goede 2012-03-18  255  		resolution = 1;
312869ec935ab3b Hans de Goede 2012-03-18  256  	else
312869ec935ab3b Hans de Goede 2012-03-18  257  		resolution = 60;
312869ec935ab3b Hans de Goede 2012-03-18  258  
312869ec935ab3b Hans de Goede 2012-03-18  259  	if (timeout < resolution || timeout > (resolution * 255))
312869ec935ab3b Hans de Goede 2012-03-18  260  		return -EINVAL;
312869ec935ab3b Hans de Goede 2012-03-18  261  
312869ec935ab3b Hans de Goede 2012-03-18  262  	if (resolution == 1)
312869ec935ab3b Hans de Goede 2012-03-18  263  		control = data->watchdog_control | SCH56XX_WDOG_TIME_BASE_SEC;
312869ec935ab3b Hans de Goede 2012-03-18  264  	else
312869ec935ab3b Hans de Goede 2012-03-18  265  		control = data->watchdog_control & ~SCH56XX_WDOG_TIME_BASE_SEC;
312869ec935ab3b Hans de Goede 2012-03-18  266  
312869ec935ab3b Hans de Goede 2012-03-18  267  	if (data->watchdog_control != control) {
312869ec935ab3b Hans de Goede 2012-03-18  268  		mutex_lock(data->io_lock);
312869ec935ab3b Hans de Goede 2012-03-18  269  		ret = sch56xx_write_virtual_reg(data->addr,
312869ec935ab3b Hans de Goede 2012-03-18  270  						SCH56XX_REG_WDOG_CONTROL,
312869ec935ab3b Hans de Goede 2012-03-18  271  						control);
312869ec935ab3b Hans de Goede 2012-03-18  272  		mutex_unlock(data->io_lock);
312869ec935ab3b Hans de Goede 2012-03-18  273  		if (ret)
fb551405c0f8e15 Hans de Goede 2012-05-22  274  			return ret;
312869ec935ab3b Hans de Goede 2012-03-18  275  
312869ec935ab3b Hans de Goede 2012-03-18  276  		data->watchdog_control = control;
312869ec935ab3b Hans de Goede 2012-03-18  277  	}
312869ec935ab3b Hans de Goede 2012-03-18  278  
312869ec935ab3b Hans de Goede 2012-03-18  279  	/*
312869ec935ab3b Hans de Goede 2012-03-18  280  	 * Remember new timeout value, but do not write as that (re)starts
312869ec935ab3b Hans de Goede 2012-03-18  281  	 * the watchdog countdown.
312869ec935ab3b Hans de Goede 2012-03-18  282  	 */
312869ec935ab3b Hans de Goede 2012-03-18  283  	data->watchdog_preset = DIV_ROUND_UP(timeout, resolution);
fb551405c0f8e15 Hans de Goede 2012-05-22  284  	wddev->timeout = data->watchdog_preset * resolution;
312869ec935ab3b Hans de Goede 2012-03-18  285  
fb551405c0f8e15 Hans de Goede 2012-05-22  286  	return 0;
312869ec935ab3b Hans de Goede 2012-03-18  287  }
312869ec935ab3b Hans de Goede 2012-03-18  288  

:::::: The code at line 245 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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-20  2:19 [ipmi:ipmi-wdt-rework 4/10] drivers/hwmon/sch56xx-common.c:245:12: error: static declaration of 'watchdog_set_timeout' follows non-static declaration kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2020-06-19 23:08 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.