[driver-core:class_cleanup 83/87] drivers/base/core.c:3431: undefined reference to `block_class'

[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 class_cleanup
head:   768b1a193b9d918cd016e3eb38728680a463cdfa
commit: 1833557a6402e9aee2dee7ccaf8662996217e74a [83/87] driver core: clean up the logic to determine which /sys/dev/ directory to use
config: x86_64-randconfig-a002-20230327 (https://download.01.org/0day-ci/archive/20230328/202303280729.OPVdWwue-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=1833557a6402e9aee2dee7ccaf8662996217e74a
        git remote add driver-core https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
        git fetch --no-tags driver-core class_cleanup
        git checkout 1833557a6402e9aee2dee7ccaf8662996217e74a
        # 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

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Link: https://lore.kernel.org/oe-kbuild-all/202303280729.OPVdWwue-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   ld: drivers/base/core.o: in function `device_to_dev_kobj':
>> drivers/base/core.c:3431: undefined reference to `block_class'
>> ld: drivers/base/core.c:3431: undefined reference to `block_class'


vim +3431 drivers/base/core.c

  3427	
  3428	/* select a /sys/dev/ directory for the device */
  3429	static struct kobject *device_to_dev_kobj(struct device *dev)
  3430	{
> 3431		if (dev->class == &block_class)
  3432			return sysfs_dev_block_kobj;
  3433		else
  3434			return sysfs_dev_char_kobj;
  3435	}
  3436	

-- 
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