drivers/watchdog/pcwd_usb.c:375:37: sparse: sparse: incorrect type in argument 1 (different address spaces)
From: kernel test robot
Date: Wed Nov 11 2020 - 02:44:06 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: eccc876724927ff3b9ff91f36f7b6b159e948f0c
commit: e5fc436f06eef54ef512ea55a9db8eb9f2e76959 sparse: use static inline for __chk_{user,io}_ptr()
date: 2 months ago
config: sh-randconfig-s032-20201111 (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-106-gd020cf33-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e5fc436f06eef54ef512ea55a9db8eb9f2e76959
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout e5fc436f06eef54ef512ea55a9db8eb9f2e76959
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=sh
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
"sparse warnings: (new ones prefixed by >>)"
drivers/watchdog/pcwd_usb.c:375:37: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected char const *__gu_addr @@ got char const [noderef] __user * @@
drivers/watchdog/pcwd_usb.c:375:37: sparse: expected char const *__gu_addr
drivers/watchdog/pcwd_usb.c:375:37: sparse: got char const [noderef] __user *
>> drivers/watchdog/pcwd_usb.c:375:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got char const *__gu_addr @@
>> drivers/watchdog/pcwd_usb.c:375:37: sparse: expected void const volatile [noderef] __user *ptr
drivers/watchdog/pcwd_usb.c:375:37: sparse: got char const *__gu_addr
drivers/watchdog/pcwd_usb.c:423:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *p @@
drivers/watchdog/pcwd_usb.c:423:21: sparse: expected int const *__gu_addr
drivers/watchdog/pcwd_usb.c:423:21: sparse: got int [noderef] __user *p
>> drivers/watchdog/pcwd_usb.c:423:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
drivers/watchdog/pcwd_usb.c:423:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/watchdog/pcwd_usb.c:423:21: sparse: got int const *__gu_addr
drivers/watchdog/pcwd_usb.c:447:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *p @@
drivers/watchdog/pcwd_usb.c:447:21: sparse: expected int const *__gu_addr
drivers/watchdog/pcwd_usb.c:447:21: sparse: got int [noderef] __user *p
drivers/watchdog/pcwd_usb.c:447:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
drivers/watchdog/pcwd_usb.c:447:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/watchdog/pcwd_usb.c:447:21: sparse: got int const *__gu_addr
--
drivers/usb/misc/sisusbvga/sisusb.c:542:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short header @@ got restricted __le16 [usertype] @@
drivers/usb/misc/sisusbvga/sisusb.c:542:9: sparse: expected unsigned short header
drivers/usb/misc/sisusbvga/sisusb.c:542:9: sparse: got restricted __le16 [usertype]
drivers/usb/misc/sisusbvga/sisusb.c:542:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] address @@ got restricted __le32 [usertype] @@
drivers/usb/misc/sisusbvga/sisusb.c:542:9: sparse: expected unsigned int [usertype] address
drivers/usb/misc/sisusbvga/sisusb.c:542:9: sparse: got restricted __le32 [usertype]
drivers/usb/misc/sisusbvga/sisusb.c:542:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] data @@ got restricted __le32 [usertype] @@
drivers/usb/misc/sisusbvga/sisusb.c:542:9: sparse: expected unsigned int [usertype] data
drivers/usb/misc/sisusbvga/sisusb.c:542:9: sparse: got restricted __le32 [usertype]
drivers/usb/misc/sisusbvga/sisusb.c:578:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short header @@ got restricted __le16 [usertype] @@
drivers/usb/misc/sisusbvga/sisusb.c:578:9: sparse: expected unsigned short header
drivers/usb/misc/sisusbvga/sisusb.c:578:9: sparse: got restricted __le16 [usertype]
drivers/usb/misc/sisusbvga/sisusb.c:578:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] address @@ got restricted __le32 [usertype] @@
drivers/usb/misc/sisusbvga/sisusb.c:578:9: sparse: expected unsigned int [usertype] address
drivers/usb/misc/sisusbvga/sisusb.c:578:9: sparse: got restricted __le32 [usertype]
drivers/usb/misc/sisusbvga/sisusb.c:578:9: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] data @@ got restricted __le32 [usertype] @@
drivers/usb/misc/sisusbvga/sisusb.c:578:9: sparse: expected unsigned int [usertype] data
drivers/usb/misc/sisusbvga/sisusb.c:578:9: sparse: got restricted __le32 [usertype]
drivers/usb/misc/sisusbvga/sisusb.c:780:37: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned char const *__gu_addr @@ got unsigned char [noderef] [usertype] __user * @@
drivers/usb/misc/sisusbvga/sisusb.c:780:37: sparse: expected unsigned char const *__gu_addr
drivers/usb/misc/sisusbvga/sisusb.c:780:37: sparse: got unsigned char [noderef] [usertype] __user *
>> drivers/usb/misc/sisusbvga/sisusb.c:780:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned char const *__gu_addr @@
drivers/usb/misc/sisusbvga/sisusb.c:780:37: sparse: expected void const volatile [noderef] __user *ptr
drivers/usb/misc/sisusbvga/sisusb.c:780:37: sparse: got unsigned char const *__gu_addr
drivers/usb/misc/sisusbvga/sisusb.c:795:37: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned short const *__gu_addr @@ got unsigned short [noderef] [usertype] __user * @@
drivers/usb/misc/sisusbvga/sisusb.c:795:37: sparse: expected unsigned short const *__gu_addr
drivers/usb/misc/sisusbvga/sisusb.c:795:37: sparse: got unsigned short [noderef] [usertype] __user *
>> drivers/usb/misc/sisusbvga/sisusb.c:795:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned short const *__gu_addr @@
drivers/usb/misc/sisusbvga/sisusb.c:795:37: sparse: expected void const volatile [noderef] __user *ptr
drivers/usb/misc/sisusbvga/sisusb.c:795:37: sparse: got unsigned short const *__gu_addr
drivers/usb/misc/sisusbvga/sisusb.c:842:37: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int const *__gu_addr @@ got unsigned int [noderef] [usertype] __user * @@
drivers/usb/misc/sisusbvga/sisusb.c:842:37: sparse: expected unsigned int const *__gu_addr
drivers/usb/misc/sisusbvga/sisusb.c:842:37: sparse: got unsigned int [noderef] [usertype] __user *
>> drivers/usb/misc/sisusbvga/sisusb.c:842:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned int const *__gu_addr @@
drivers/usb/misc/sisusbvga/sisusb.c:842:37: sparse: expected void const volatile [noderef] __user *ptr
drivers/usb/misc/sisusbvga/sisusb.c:842:37: sparse: got unsigned int const *__gu_addr
drivers/usb/misc/sisusbvga/sisusb.c:2653:29: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned char const *__gu_addr @@ got unsigned char [noderef] [usertype] __user * @@
drivers/usb/misc/sisusbvga/sisusb.c:2653:29: sparse: expected unsigned char const *__gu_addr
drivers/usb/misc/sisusbvga/sisusb.c:2653:29: sparse: got unsigned char [noderef] [usertype] __user *
drivers/usb/misc/sisusbvga/sisusb.c:2653:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned char const *__gu_addr @@
drivers/usb/misc/sisusbvga/sisusb.c:2653:29: sparse: expected void const volatile [noderef] __user *ptr
drivers/usb/misc/sisusbvga/sisusb.c:2653:29: sparse: got unsigned char const *__gu_addr
drivers/usb/misc/sisusbvga/sisusb.c:2664:29: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned short const *__gu_addr @@ got unsigned short [noderef] [usertype] __user * @@
drivers/usb/misc/sisusbvga/sisusb.c:2664:29: sparse: expected unsigned short const *__gu_addr
drivers/usb/misc/sisusbvga/sisusb.c:2664:29: sparse: got unsigned short [noderef] [usertype] __user *
drivers/usb/misc/sisusbvga/sisusb.c:2664:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned short const *__gu_addr @@
drivers/usb/misc/sisusbvga/sisusb.c:2664:29: sparse: expected void const volatile [noderef] __user *ptr
drivers/usb/misc/sisusbvga/sisusb.c:2664:29: sparse: got unsigned short const *__gu_addr
drivers/usb/misc/sisusbvga/sisusb.c:2675:29: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int const *__gu_addr @@ got unsigned int [noderef] [usertype] __user * @@
drivers/usb/misc/sisusbvga/sisusb.c:2675:29: sparse: expected unsigned int const *__gu_addr
drivers/usb/misc/sisusbvga/sisusb.c:2675:29: sparse: got unsigned int [noderef] [usertype] __user *
drivers/usb/misc/sisusbvga/sisusb.c:2675:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned int const *__gu_addr @@
drivers/usb/misc/sisusbvga/sisusb.c:2675:29: sparse: expected void const volatile [noderef] __user *ptr
drivers/usb/misc/sisusbvga/sisusb.c:2675:29: sparse: got unsigned int const *__gu_addr
drivers/usb/misc/sisusbvga/sisusb.c:2740:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int const *__gu_addr @@ got unsigned int [noderef] [usertype] __user * @@
drivers/usb/misc/sisusbvga/sisusb.c:2740:21: sparse: expected unsigned int const *__gu_addr
drivers/usb/misc/sisusbvga/sisusb.c:2740:21: sparse: got unsigned int [noderef] [usertype] __user *
drivers/usb/misc/sisusbvga/sisusb.c:2740:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned int const *__gu_addr @@
drivers/usb/misc/sisusbvga/sisusb.c:2740:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/usb/misc/sisusbvga/sisusb.c:2740:21: sparse: got unsigned int const *__gu_addr
vim +375 drivers/watchdog/pcwd_usb.c
58b519f3e5e491d drivers/char/watchdog/pcwd_usb.c Wim Van Sebroeck 2006-05-21 354
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 355 /*
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 356 * /dev/watchdog handling
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 357 */
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 358
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 359 static ssize_t usb_pcwd_write(struct file *file, const char __user *data,
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 360 size_t len, loff_t *ppos)
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 361 {
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 362 /* See if we got the magic character 'V' and reload the timer */
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 363 if (len) {
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 364 if (!nowayout) {
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 365 size_t i;
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 366
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 367 /* note: just in case someone wrote the magic character
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 368 * five months ago... */
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 369 expect_release = 0;
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 370
143a2e54bf53216 drivers/watchdog/pcwd_usb.c Wim Van Sebroeck 2009-03-18 371 /* scan to see whether or not we got the
143a2e54bf53216 drivers/watchdog/pcwd_usb.c Wim Van Sebroeck 2009-03-18 372 * magic character */
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 373 for (i = 0; i != len; i++) {
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 374 char c;
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 @375 if (get_user(c, data + i))
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 376 return -EFAULT;
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 377 if (c == 'V')
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 378 expect_release = 42;
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 379 }
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 380 }
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 381
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 382 /* someone wrote to us, we should reload the timer */
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 383 usb_pcwd_keepalive(usb_pcwd_device);
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 384 }
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 385 return len;
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 386 }
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 387
c9488520512df65 drivers/watchdog/pcwd_usb.c Alan Cox 2008-07-03 388 static long usb_pcwd_ioctl(struct file *file, unsigned int cmd,
c9488520512df65 drivers/watchdog/pcwd_usb.c Alan Cox 2008-07-03 389 unsigned long arg)
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 390 {
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 391 void __user *argp = (void __user *)arg;
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 392 int __user *p = argp;
42747d712de56cf drivers/watchdog/pcwd_usb.c Wim Van Sebroeck 2009-12-26 393 static const struct watchdog_info ident = {
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 394 .options = WDIOF_KEEPALIVEPING |
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 395 WDIOF_SETTIMEOUT |
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 396 WDIOF_MAGICCLOSE,
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 397 .firmware_version = 1,
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 398 .identity = DRIVER_NAME,
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 399 };
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 400
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 401 switch (cmd) {
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 402 case WDIOC_GETSUPPORT:
7944d3a5a70ee5c drivers/watchdog/pcwd_usb.c Wim Van Sebroeck 2008-08-06 403 return copy_to_user(argp, &ident, sizeof(ident)) ? -EFAULT : 0;
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 404
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 405 case WDIOC_GETSTATUS:
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 406 case WDIOC_GETBOOTSTATUS:
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 407 return put_user(0, p);
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 408
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 409 case WDIOC_GETTEMP:
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 410 {
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 411 int temperature;
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 412
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 413 if (usb_pcwd_get_temperature(usb_pcwd_device, &temperature))
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 414 return -EFAULT;
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 415
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 416 return put_user(temperature, p);
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 417 }
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 418
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 419 case WDIOC_SETOPTIONS:
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 420 {
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 421 int new_options, retval = -EINVAL;
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 422
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 @423 if (get_user(new_options, p))
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 424 return -EFAULT;
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 425
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 426 if (new_options & WDIOS_DISABLECARD) {
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 427 usb_pcwd_stop(usb_pcwd_device);
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 428 retval = 0;
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 429 }
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 430
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 431 if (new_options & WDIOS_ENABLECARD) {
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 432 usb_pcwd_start(usb_pcwd_device);
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 433 retval = 0;
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 434 }
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 435
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 436 return retval;
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 437 }
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 438
0c06090c9472db0 drivers/watchdog/pcwd_usb.c Wim Van Sebroeck 2008-07-18 439 case WDIOC_KEEPALIVE:
0c06090c9472db0 drivers/watchdog/pcwd_usb.c Wim Van Sebroeck 2008-07-18 440 usb_pcwd_keepalive(usb_pcwd_device);
0c06090c9472db0 drivers/watchdog/pcwd_usb.c Wim Van Sebroeck 2008-07-18 441 return 0;
0c06090c9472db0 drivers/watchdog/pcwd_usb.c Wim Van Sebroeck 2008-07-18 442
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 443 case WDIOC_SETTIMEOUT:
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 444 {
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 445 int new_heartbeat;
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 446
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 447 if (get_user(new_heartbeat, p))
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 448 return -EFAULT;
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 449
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 450 if (usb_pcwd_set_heartbeat(usb_pcwd_device, new_heartbeat))
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 451 return -EINVAL;
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 452
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 453 usb_pcwd_keepalive(usb_pcwd_device);
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 454 }
bd490f8222510de drivers/watchdog/pcwd_usb.c Gustavo A. R. Silva 2020-07-07 455 fallthrough;
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 456
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 457 case WDIOC_GETTIMEOUT:
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 458 return put_user(heartbeat, p);
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 459
58b519f3e5e491d drivers/char/watchdog/pcwd_usb.c Wim Van Sebroeck 2006-05-21 460 case WDIOC_GETTIMELEFT:
58b519f3e5e491d drivers/char/watchdog/pcwd_usb.c Wim Van Sebroeck 2006-05-21 461 {
58b519f3e5e491d drivers/char/watchdog/pcwd_usb.c Wim Van Sebroeck 2006-05-21 462 int time_left;
58b519f3e5e491d drivers/char/watchdog/pcwd_usb.c Wim Van Sebroeck 2006-05-21 463
58b519f3e5e491d drivers/char/watchdog/pcwd_usb.c Wim Van Sebroeck 2006-05-21 464 if (usb_pcwd_get_timeleft(usb_pcwd_device, &time_left))
58b519f3e5e491d drivers/char/watchdog/pcwd_usb.c Wim Van Sebroeck 2006-05-21 465 return -EFAULT;
58b519f3e5e491d drivers/char/watchdog/pcwd_usb.c Wim Van Sebroeck 2006-05-21 466
58b519f3e5e491d drivers/char/watchdog/pcwd_usb.c Wim Van Sebroeck 2006-05-21 467 return put_user(time_left, p);
58b519f3e5e491d drivers/char/watchdog/pcwd_usb.c Wim Van Sebroeck 2006-05-21 468 }
58b519f3e5e491d drivers/char/watchdog/pcwd_usb.c Wim Van Sebroeck 2006-05-21 469
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 470 default:
795b89d207d8ff5 drivers/char/watchdog/pcwd_usb.c Samuel Tardieu 2006-09-09 471 return -ENOTTY;
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 472 }
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 473 }
^1da177e4c3f415 drivers/char/watchdog/pcwd_usb.c Linus Torvalds 2005-04-16 474
:::::: The code at line 375 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip