Re: [PATCH v3] USB: Fix device driver race

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Bastien,

I love your patch! Perhaps something to improve:

[auto build test WARNING on usb/usb-testing]
[also build test WARNING on peter.chen-usb/ci-for-usb-next balbi-usb/testing/next v5.8-rc6 next-20200723]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Bastien-Nocera/USB-Fix-device-driver-race/20200724-053320
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: x86_64-randconfig-a004-20200724 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 1d09ecf36175f7910ffedd6d497c07b5c74c22fb)
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
        # 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@xxxxxxxxx>

All warnings (new ones prefixed by >>):

>> drivers/usb/core/driver.c:918:4: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
                           device_reprobe(dev);
                           ^~~~~~~~~~~~~~ ~~~
   drivers/usb/core/driver.c:921:3: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
                   device_reprobe(dev);
                   ^~~~~~~~~~~~~~ ~~~
   drivers/usb/core/driver.c:910:28: warning: unused variable 'udriver' [-Wunused-variable]
           struct usb_device_driver *udriver = to_usb_device_driver(dev->driver);
                                     ^
   3 warnings generated.

vim +/warn_unused_result +918 drivers/usb/core/driver.c

   907	
   908	static int __usb_bus_reprobe_drivers(struct device *dev, void *data)
   909	{
   910		struct usb_device_driver *udriver = to_usb_device_driver(dev->driver);
   911		struct usb_device *udev = to_usb_device(dev);
   912	
   913		if (dev->driver) {
   914			struct usb_device_driver *udriver = to_usb_device_driver(dev->driver);
   915	
   916			if (udriver == NULL || udriver == &usb_generic_driver) {
   917				udev->use_generic_driver = false;
 > 918				device_reprobe(dev);
   919			}
   920		} else {
   921			device_reprobe(dev);
   922		}
   923	
   924		return 0;
   925	}
   926	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux