Re: [PATCH] idr: Remove unused ida_simple_{get,remove}

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

 



Hi Stephen,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on 5191290407668028179f2544a11ae9b57f0bcf07]

url:    https://github.com/0day-ci/linux/commits/Stephen-Kitt/idr-Remove-unused-ida_simple_-get-remove/20220323-062521
base:   5191290407668028179f2544a11ae9b57f0bcf07
config: arm-randconfig-p002-20220320 (https://download.01.org/0day-ci/archive/20220323/202203230914.b9Om2yrQ-lkp@xxxxxxxxx/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
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
        # https://github.com/0day-ci/linux/commit/13945a32161b59a82eca06de385ea0f38b88439e
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Stephen-Kitt/idr-Remove-unused-ida_simple_-get-remove/20220323-062521
        git checkout 13945a32161b59a82eca06de385ea0f38b88439e
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash drivers/base/ drivers/firmware/arm_scmi/ drivers/usb/chipidea/ drivers/usb/gadget/function/

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

All errors (new ones prefixed by >>):

   drivers/base/soc.c: In function 'soc_release':
>> drivers/base/soc.c:107:9: error: implicit declaration of function 'ida_simple_remove' [-Werror=implicit-function-declaration]
     107 |         ida_simple_remove(&soc_ida, soc_dev->soc_dev_num);
         |         ^~~~~~~~~~~~~~~~~
   drivers/base/soc.c: In function 'soc_device_register':
>> drivers/base/soc.c:142:15: error: implicit declaration of function 'ida_simple_get' [-Werror=implicit-function-declaration]
     142 |         ret = ida_simple_get(&soc_ida, 0, 0, GFP_KERNEL);
         |               ^~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   drivers/firmware/arm_scmi/bus.c: In function 'scmi_device_create':
>> drivers/firmware/arm_scmi/bus.c:184:14: error: implicit declaration of function 'ida_simple_get' [-Werror=implicit-function-declaration]
     184 |         id = ida_simple_get(&scmi_bus_id, 1, 0, GFP_KERNEL);
         |              ^~~~~~~~~~~~~~
>> drivers/firmware/arm_scmi/bus.c:207:9: error: implicit declaration of function 'ida_simple_remove' [-Werror=implicit-function-declaration]
     207 |         ida_simple_remove(&scmi_bus_id, id);
         |         ^~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   drivers/usb/chipidea/core.c: In function 'ci_hdrc_add_device':
>> drivers/usb/chipidea/core.c:856:14: error: implicit declaration of function 'ida_simple_get' [-Werror=implicit-function-declaration]
     856 |         id = ida_simple_get(&ci_ida, 0, 0, GFP_KERNEL);
         |              ^~~~~~~~~~~~~~
>> drivers/usb/chipidea/core.c:886:9: error: implicit declaration of function 'ida_simple_remove' [-Werror=implicit-function-declaration]
     886 |         ida_simple_remove(&ci_ida, id);
         |         ^~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   drivers/usb/gadget/function/f_hid.c: In function 'hidg_get_minor':
>> drivers/usb/gadget/function/f_hid.c:1031:15: error: implicit declaration of function 'ida_simple_get' [-Werror=implicit-function-declaration]
    1031 |         ret = ida_simple_get(&hidg_ida, 0, 0, GFP_KERNEL);
         |               ^~~~~~~~~~~~~~
>> drivers/usb/gadget/function/f_hid.c:1033:17: error: implicit declaration of function 'ida_simple_remove' [-Werror=implicit-function-declaration]
    1033 |                 ida_simple_remove(&hidg_ida, ret);
         |                 ^~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   drivers/usb/gadget/function/f_printer.c: In function 'gprinter_get_minor':
>> drivers/usb/gadget/function/f_printer.c:1319:15: error: implicit declaration of function 'ida_simple_get' [-Werror=implicit-function-declaration]
    1319 |         ret = ida_simple_get(&printer_ida, 0, 0, GFP_KERNEL);
         |               ^~~~~~~~~~~~~~
>> drivers/usb/gadget/function/f_printer.c:1321:17: error: implicit declaration of function 'ida_simple_remove' [-Werror=implicit-function-declaration]
    1321 |                 ida_simple_remove(&printer_ida, ret);
         |                 ^~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/ida_simple_remove +107 drivers/base/soc.c

74d1d82cdaaec7 Lee Jones          2012-02-06  102  
74d1d82cdaaec7 Lee Jones          2012-02-06  103  static void soc_release(struct device *dev)
74d1d82cdaaec7 Lee Jones          2012-02-06  104  {
74d1d82cdaaec7 Lee Jones          2012-02-06  105  	struct soc_device *soc_dev = container_of(dev, struct soc_device, dev);
74d1d82cdaaec7 Lee Jones          2012-02-06  106  
c31e73121f4c1e Murali Nalajala    2019-10-07 @107  	ida_simple_remove(&soc_ida, soc_dev->soc_dev_num);
c31e73121f4c1e Murali Nalajala    2019-10-07  108  	kfree(soc_dev->dev.groups);
74d1d82cdaaec7 Lee Jones          2012-02-06  109  	kfree(soc_dev);
74d1d82cdaaec7 Lee Jones          2012-02-06  110  }
74d1d82cdaaec7 Lee Jones          2012-02-06  111  
6e12db376b60b7 Geert Uytterhoeven 2017-03-09  112  static struct soc_device_attribute *early_soc_dev_attr;
6e12db376b60b7 Geert Uytterhoeven 2017-03-09  113  
74d1d82cdaaec7 Lee Jones          2012-02-06  114  struct soc_device *soc_device_register(struct soc_device_attribute *soc_dev_attr)
74d1d82cdaaec7 Lee Jones          2012-02-06  115  {
74d1d82cdaaec7 Lee Jones          2012-02-06  116  	struct soc_device *soc_dev;
c31e73121f4c1e Murali Nalajala    2019-10-07  117  	const struct attribute_group **soc_attr_groups;
74d1d82cdaaec7 Lee Jones          2012-02-06  118  	int ret;
74d1d82cdaaec7 Lee Jones          2012-02-06  119  
1da1b3628df34a Geert Uytterhoeven 2016-09-27  120  	if (!soc_bus_type.p) {
6e12db376b60b7 Geert Uytterhoeven 2017-03-09  121  		if (early_soc_dev_attr)
6e12db376b60b7 Geert Uytterhoeven 2017-03-09  122  			return ERR_PTR(-EBUSY);
6e12db376b60b7 Geert Uytterhoeven 2017-03-09  123  		early_soc_dev_attr = soc_dev_attr;
6e12db376b60b7 Geert Uytterhoeven 2017-03-09  124  		return NULL;
1da1b3628df34a Geert Uytterhoeven 2016-09-27  125  	}
1da1b3628df34a Geert Uytterhoeven 2016-09-27  126  
74d1d82cdaaec7 Lee Jones          2012-02-06  127  	soc_dev = kzalloc(sizeof(*soc_dev), GFP_KERNEL);
74d1d82cdaaec7 Lee Jones          2012-02-06  128  	if (!soc_dev) {
74d1d82cdaaec7 Lee Jones          2012-02-06  129  		ret = -ENOMEM;
74d1d82cdaaec7 Lee Jones          2012-02-06  130  		goto out1;
74d1d82cdaaec7 Lee Jones          2012-02-06  131  	}
74d1d82cdaaec7 Lee Jones          2012-02-06  132  
c31e73121f4c1e Murali Nalajala    2019-10-07  133  	soc_attr_groups = kcalloc(3, sizeof(*soc_attr_groups), GFP_KERNEL);
c31e73121f4c1e Murali Nalajala    2019-10-07  134  	if (!soc_attr_groups) {
c31e73121f4c1e Murali Nalajala    2019-10-07  135  		ret = -ENOMEM;
c31e73121f4c1e Murali Nalajala    2019-10-07  136  		goto out2;
c31e73121f4c1e Murali Nalajala    2019-10-07  137  	}
c31e73121f4c1e Murali Nalajala    2019-10-07  138  	soc_attr_groups[0] = &soc_attr_group;
c31e73121f4c1e Murali Nalajala    2019-10-07  139  	soc_attr_groups[1] = soc_dev_attr->custom_attr_group;
c31e73121f4c1e Murali Nalajala    2019-10-07  140  
74d1d82cdaaec7 Lee Jones          2012-02-06  141  	/* Fetch a unique (reclaimable) SOC ID. */
cfcf6a91aa0d59 Lee Duncan         2015-10-01 @142  	ret = ida_simple_get(&soc_ida, 0, 0, GFP_KERNEL);
cfcf6a91aa0d59 Lee Duncan         2015-10-01  143  	if (ret < 0)
c31e73121f4c1e Murali Nalajala    2019-10-07  144  		goto out3;
cfcf6a91aa0d59 Lee Duncan         2015-10-01  145  	soc_dev->soc_dev_num = ret;
74d1d82cdaaec7 Lee Jones          2012-02-06  146  
74d1d82cdaaec7 Lee Jones          2012-02-06  147  	soc_dev->attr = soc_dev_attr;
74d1d82cdaaec7 Lee Jones          2012-02-06  148  	soc_dev->dev.bus = &soc_bus_type;
74d1d82cdaaec7 Lee Jones          2012-02-06  149  	soc_dev->dev.groups = soc_attr_groups;
74d1d82cdaaec7 Lee Jones          2012-02-06  150  	soc_dev->dev.release = soc_release;
74d1d82cdaaec7 Lee Jones          2012-02-06  151  
74d1d82cdaaec7 Lee Jones          2012-02-06  152  	dev_set_name(&soc_dev->dev, "soc%d", soc_dev->soc_dev_num);
74d1d82cdaaec7 Lee Jones          2012-02-06  153  
74d1d82cdaaec7 Lee Jones          2012-02-06  154  	ret = device_register(&soc_dev->dev);
c31e73121f4c1e Murali Nalajala    2019-10-07  155  	if (ret) {
c31e73121f4c1e Murali Nalajala    2019-10-07  156  		put_device(&soc_dev->dev);
c31e73121f4c1e Murali Nalajala    2019-10-07  157  		return ERR_PTR(ret);
c31e73121f4c1e Murali Nalajala    2019-10-07  158  	}
74d1d82cdaaec7 Lee Jones          2012-02-06  159  
74d1d82cdaaec7 Lee Jones          2012-02-06  160  	return soc_dev;
74d1d82cdaaec7 Lee Jones          2012-02-06  161  
74d1d82cdaaec7 Lee Jones          2012-02-06  162  out3:
c31e73121f4c1e Murali Nalajala    2019-10-07  163  	kfree(soc_attr_groups);
74d1d82cdaaec7 Lee Jones          2012-02-06  164  out2:
74d1d82cdaaec7 Lee Jones          2012-02-06  165  	kfree(soc_dev);
74d1d82cdaaec7 Lee Jones          2012-02-06  166  out1:
74d1d82cdaaec7 Lee Jones          2012-02-06  167  	return ERR_PTR(ret);
74d1d82cdaaec7 Lee Jones          2012-02-06  168  }
f7ccc7a397cf2e Vinod Koul         2019-07-24  169  EXPORT_SYMBOL_GPL(soc_device_register);
74d1d82cdaaec7 Lee Jones          2012-02-06  170  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux