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(a)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(a)redhat.com>
:::::: CC: Wim Van Sebroeck <wim(a)iguana.be>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org