Re: [PATCH v3 03/34] component: Introduce the aggregate bus_type

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

 



Hi Stephen,

I love your patch! Yet something to improve:

[auto build test ERROR on e4e737bb5c170df6135a127739a9e6148ee3da82]

url:    https://github.com/0day-ci/linux/commits/Stephen-Boyd/component-Make-into-an-aggregate-bus/20211026-080422
base:   e4e737bb5c170df6135a127739a9e6148ee3da82
config: nios2-allyesconfig (attached as .config)
compiler: nios2-linux-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/748369f5c5e62a44653d9b76cdbdadc835dd54d2
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Stephen-Boyd/component-Make-into-an-aggregate-bus/20211026-080422
        git checkout 748369f5c5e62a44653d9b76cdbdadc835dd54d2
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=nios2 

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/component.c: In function '__component_add':
>> drivers/base/component.c:858:13: error: variable 'ret' set but not used [-Werror=unused-but-set-variable]
     858 |         int ret;
         |             ^~~
   cc1: all warnings being treated as errors


vim +/ret +858 drivers/base/component.c

2a41e6070dd7ef Russell King  2014-01-10  853  
3521ee994bca90 Daniel Vetter 2019-02-08  854  static int __component_add(struct device *dev, const struct component_ops *ops,
3521ee994bca90 Daniel Vetter 2019-02-08  855  	int subcomponent)
2a41e6070dd7ef Russell King  2014-01-10  856  {
2a41e6070dd7ef Russell King  2014-01-10  857  	struct component *component;
2a41e6070dd7ef Russell King  2014-01-10 @858  	int ret;
2a41e6070dd7ef Russell King  2014-01-10  859  
2a41e6070dd7ef Russell King  2014-01-10  860  	component = kzalloc(sizeof(*component), GFP_KERNEL);
2a41e6070dd7ef Russell King  2014-01-10  861  	if (!component)
2a41e6070dd7ef Russell King  2014-01-10  862  		return -ENOMEM;
2a41e6070dd7ef Russell King  2014-01-10  863  
2a41e6070dd7ef Russell King  2014-01-10  864  	component->ops = ops;
2a41e6070dd7ef Russell King  2014-01-10  865  	component->dev = dev;
3521ee994bca90 Daniel Vetter 2019-02-08  866  	component->subcomponent = subcomponent;
2a41e6070dd7ef Russell King  2014-01-10  867  
2a41e6070dd7ef Russell King  2014-01-10  868  	dev_dbg(dev, "adding component (ops %ps)\n", ops);
2a41e6070dd7ef Russell King  2014-01-10  869  
2a41e6070dd7ef Russell King  2014-01-10  870  	mutex_lock(&component_mutex);
2a41e6070dd7ef Russell King  2014-01-10  871  	list_add_tail(&component->node, &component_list);
2a41e6070dd7ef Russell King  2014-01-10  872  	mutex_unlock(&component_mutex);
2a41e6070dd7ef Russell King  2014-01-10  873  
748369f5c5e62a Stephen Boyd  2021-10-25  874  	/*
748369f5c5e62a Stephen Boyd  2021-10-25  875  	 * Try to bind.
748369f5c5e62a Stephen Boyd  2021-10-25  876  	 *
748369f5c5e62a Stephen Boyd  2021-10-25  877  	 * Note: we don't check the return value here because component devices
748369f5c5e62a Stephen Boyd  2021-10-25  878  	 * don't care that the aggregate device can actually probe or not. They
748369f5c5e62a Stephen Boyd  2021-10-25  879  	 * only care about adding themselves to the component_list and then
748369f5c5e62a Stephen Boyd  2021-10-25  880  	 * waiting for their component_ops::bind_component callback to be
748369f5c5e62a Stephen Boyd  2021-10-25  881  	 * called.
748369f5c5e62a Stephen Boyd  2021-10-25  882  	 */
748369f5c5e62a Stephen Boyd  2021-10-25  883  	ret = bus_rescan_devices(&aggregate_bus_type);
748369f5c5e62a Stephen Boyd  2021-10-25  884  
748369f5c5e62a Stephen Boyd  2021-10-25  885  	return 0;
2a41e6070dd7ef Russell King  2014-01-10  886  }
3521ee994bca90 Daniel Vetter 2019-02-08  887  

---
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 DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux