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

kernel test robot lkp at intel.com
Tue Oct 26 14:02:03 UTC 2021


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 at intel.com>

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@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 60767 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20211026/1a7211f2/attachment-0001.gz>


More information about the dri-devel mailing list