tree:
https://git.kernel.org/pub/scm/linux/kernel/git/kuba/linux.git tapi
head: 328004163c637a4505698baa71e5be0c3ee88d95
commit: fdf93d4de9278aba58f3c3290d52c51a3074c184 [3/30] net: add sysfs attribute to
control napi threaded mode
config: i386-randconfig-m021-20200820 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
smatch warnings:
net/core/net-sysfs.c:581 threaded_store() warn: unsigned 'ret' is never less than
zero.
#
https://git.kernel.org/pub/scm/linux/kernel/git/kuba/linux.git/commit/?id...
git remote add kuba-linux
https://git.kernel.org/pub/scm/linux/kernel/git/kuba/linux.git
git fetch --no-tags kuba-linux tapi
git checkout fdf93d4de9278aba58f3c3290d52c51a3074c184
vim +/ret +581 net/core/net-sysfs.c
555
556 static ssize_t threaded_store(struct device *dev,
557 struct device_attribute *attr,
558 const char *buf, size_t len)
559 {
560 struct net_device *netdev = to_net_dev(dev);
561 size_t ret;
562 bool val;
563
564 if (!capable(CAP_NET_ADMIN))
565 return -EPERM;
566
567 if (!rtnl_trylock())
568 return restart_syscall();
569
570 if (!dev_isalive(netdev)) {
571 ret = len;
572 goto unlock;
573 }
574
575 if (netdev->flags & IFF_UP) {
576 ret = -EBUSY;
577 goto unlock;
578 }
579
580 ret = kstrtobool(buf, &val);
581 if (ret < 0)
582 goto unlock;
583 netdev->napi_threaded = val;
584 ret = len;
585
586 unlock:
587 rtnl_unlock();
588 return ret;
589 }
590 static DEVICE_ATTR_RW(threaded);
591
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org