[driver-core:kobject-const 25/25] drivers/dma/idxd/compat.c:19:32: warning: initialization discards 'const' qualifier from pointer target type

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git kobject-const
head:   ab566595bfc8de2e05e5174796f04997d7c01fb3
commit: ab566595bfc8de2e05e5174796f04997d7c01fb3 [25/25] bus: remove the "p" pointer in struct bus_type
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20230201/202302010222.N9SSmGUP-lkp@xxxxxxxxx/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git/commit/?id=ab566595bfc8de2e05e5174796f04997d7c01fb3
        git remote add driver-core https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
        git fetch --no-tags driver-core kobject-const
        git checkout ab566595bfc8de2e05e5174796f04997d7c01fb3
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 olddefconfig
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/dma/idxd/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

   drivers/dma/idxd/compat.c: In function 'unbind_store':
>> drivers/dma/idxd/compat.c:19:32: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
      19 |         struct bus_type *bus = drv->bus;
         |                                ^~~
   drivers/dma/idxd/compat.c: In function 'bind_store':
   drivers/dma/idxd/compat.c:35:32: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
      35 |         struct bus_type *bus = drv->bus;
         |                                ^~~


vim +/const +19 drivers/dma/idxd/compat.c

6e7f3ee97bbe2c7 Dave Jiang 2021-07-15  12  
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15  13  #define DRIVER_ATTR_IGNORE_LOCKDEP(_name, _mode, _show, _store)	\
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15  14  	struct driver_attribute driver_attr_##_name =		\
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15  15  	__ATTR_IGNORE_LOCKDEP(_name, _mode, _show, _store)
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15  16  
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15  17  static ssize_t unbind_store(struct device_driver *drv, const char *buf, size_t count)
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15  18  {
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15 @19  	struct bus_type *bus = drv->bus;
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15  20  	struct device *dev;
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15  21  	int rc = -ENODEV;
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15  22  
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15  23  	dev = bus_find_device_by_name(bus, NULL, buf);
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15  24  	if (dev && dev->driver) {
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15  25  		device_driver_detach(dev);
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15  26  		rc = count;
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15  27  	}
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15  28  
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15  29  	return rc;
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15  30  }
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15  31  static DRIVER_ATTR_IGNORE_LOCKDEP(unbind, 0200, NULL, unbind_store);
6e7f3ee97bbe2c7 Dave Jiang 2021-07-15  32  

:::::: The code at line 19 was first introduced by commit
:::::: 6e7f3ee97bbe2c7d7a53b7dbd7a08a579e03c8c9 dmaengine: idxd: move dsa_drv support to compatible mode

:::::: TO: Dave Jiang <dave.jiang@xxxxxxxxx>
:::::: CC: Vinod Koul <vkoul@xxxxxxxxxx>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux