Re: [PATCH v2] usb: gadget: update DECLARE_USB_FUNCTION(_INIT) macro

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

 



Hi Linyu,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on usb/usb-testing]
[also build test ERROR on balbi-usb/testing/next peter-chen-usb/for-usb-next v5.18-rc6 next-20220506]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/intel-lab-lkp/linux/commits/Linyu-Yuan/usb-gadget-update-DECLARE_USB_FUNCTION-_INIT-macro/20220509-144542
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: x86_64-randconfig-a011-20220509 (https://download.01.org/0day-ci/archive/20220509/202205091809.29x90X9b-lkp@xxxxxxxxx/config)
compiler: gcc-11 (Debian 11.2.0-20) 11.2.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/5c9f589ea23bf995436cde6bd39f1c5b2cc1ec4f
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Linyu-Yuan/usb-gadget-update-DECLARE_USB_FUNCTION-_INIT-macro/20220509-144542
        git checkout 5c9f589ea23bf995436cde6bd39f1c5b2cc1ec4f
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

   ld: drivers/usb/gadget/function/f_sourcesink.o: in function `sslb_modinit':
>> drivers/usb/gadget/function/f_sourcesink.c:1270: multiple definition of `init_module'; drivers/usb/gadget/function/f_loopback.o:drivers/usb/gadget/function/f_loopback.c:586: first defined here
   ld: drivers/usb/gadget/function/f_sourcesink.o: in function `sslb_modexit':
>> drivers/usb/gadget/function/f_sourcesink.c:1283: multiple definition of `cleanup_module'; drivers/usb/gadget/function/f_loopback.o:drivers/usb/gadget/function/f_loopback.c:586: first defined here


vim +1270 drivers/usb/gadget/function/f_sourcesink.c

cf9a08ae5aece88 drivers/usb/gadget/f_sourcesink.c          Sebastian Andrzej Siewior 2012-12-23  1245  
cf9a08ae5aece88 drivers/usb/gadget/f_sourcesink.c          Sebastian Andrzej Siewior 2012-12-23  1246  static struct usb_function_instance *source_sink_alloc_inst(void)
cf9a08ae5aece88 drivers/usb/gadget/f_sourcesink.c          Sebastian Andrzej Siewior 2012-12-23  1247  {
cf9a08ae5aece88 drivers/usb/gadget/f_sourcesink.c          Sebastian Andrzej Siewior 2012-12-23  1248  	struct f_ss_opts *ss_opts;
cf9a08ae5aece88 drivers/usb/gadget/f_sourcesink.c          Sebastian Andrzej Siewior 2012-12-23  1249  
cf9a08ae5aece88 drivers/usb/gadget/f_sourcesink.c          Sebastian Andrzej Siewior 2012-12-23  1250  	ss_opts = kzalloc(sizeof(*ss_opts), GFP_KERNEL);
cf9a08ae5aece88 drivers/usb/gadget/f_sourcesink.c          Sebastian Andrzej Siewior 2012-12-23  1251  	if (!ss_opts)
cf9a08ae5aece88 drivers/usb/gadget/f_sourcesink.c          Sebastian Andrzej Siewior 2012-12-23  1252  		return ERR_PTR(-ENOMEM);
25d8015177ae7ba drivers/usb/gadget/f_sourcesink.c          Andrzej Pietrasiewicz     2013-11-07  1253  	mutex_init(&ss_opts->lock);
9890e33013fae0d drivers/usb/gadget/f_sourcesink.c          Andrzej Pietrasiewicz     2013-04-18  1254  	ss_opts->func_inst.free_func_inst = source_sink_free_instance;
25d8015177ae7ba drivers/usb/gadget/f_sourcesink.c          Andrzej Pietrasiewicz     2013-11-07  1255  	ss_opts->isoc_interval = GZERO_ISOC_INTERVAL;
25d8015177ae7ba drivers/usb/gadget/f_sourcesink.c          Andrzej Pietrasiewicz     2013-11-07  1256  	ss_opts->isoc_maxpacket = GZERO_ISOC_MAXPACKET;
25d8015177ae7ba drivers/usb/gadget/f_sourcesink.c          Andrzej Pietrasiewicz     2013-11-07  1257  	ss_opts->bulk_buflen = GZERO_BULK_BUFLEN;
0d6c3d96678d115 drivers/usb/gadget/function/f_sourcesink.c Peter Chen                2015-11-19  1258  	ss_opts->bulk_qlen = GZERO_SS_BULK_QLEN;
0d6c3d96678d115 drivers/usb/gadget/function/f_sourcesink.c Peter Chen                2015-11-19  1259  	ss_opts->iso_qlen = GZERO_SS_ISO_QLEN;
25d8015177ae7ba drivers/usb/gadget/f_sourcesink.c          Andrzej Pietrasiewicz     2013-11-07  1260  
25d8015177ae7ba drivers/usb/gadget/f_sourcesink.c          Andrzej Pietrasiewicz     2013-11-07  1261  	config_group_init_type_name(&ss_opts->func_inst.group, "",
25d8015177ae7ba drivers/usb/gadget/f_sourcesink.c          Andrzej Pietrasiewicz     2013-11-07  1262  				    &ss_func_type);
25d8015177ae7ba drivers/usb/gadget/f_sourcesink.c          Andrzej Pietrasiewicz     2013-11-07  1263  
cf9a08ae5aece88 drivers/usb/gadget/f_sourcesink.c          Sebastian Andrzej Siewior 2012-12-23  1264  	return &ss_opts->func_inst;
544aca39e670421 drivers/usb/gadget/f_sourcesink.c          Sebastian Andrzej Siewior 2012-12-23  1265  }
cf9a08ae5aece88 drivers/usb/gadget/f_sourcesink.c          Sebastian Andrzej Siewior 2012-12-23  1266  DECLARE_USB_FUNCTION(SourceSink, source_sink_alloc_inst,
cf9a08ae5aece88 drivers/usb/gadget/f_sourcesink.c          Sebastian Andrzej Siewior 2012-12-23  1267  		source_sink_alloc_func);
cf9a08ae5aece88 drivers/usb/gadget/f_sourcesink.c          Sebastian Andrzej Siewior 2012-12-23  1268  
cf9a08ae5aece88 drivers/usb/gadget/f_sourcesink.c          Sebastian Andrzej Siewior 2012-12-23  1269  static int __init sslb_modinit(void)
cf9a08ae5aece88 drivers/usb/gadget/f_sourcesink.c          Sebastian Andrzej Siewior 2012-12-23 @1270  {
cf9a08ae5aece88 drivers/usb/gadget/f_sourcesink.c          Sebastian Andrzej Siewior 2012-12-23  1271  	int ret;
cf9a08ae5aece88 drivers/usb/gadget/f_sourcesink.c          Sebastian Andrzej Siewior 2012-12-23  1272  
5c9f589ea23bf99 drivers/usb/gadget/function/f_sourcesink.c Linyu Yuan                2022-05-09  1273  	ret = usb_function_register(&SourceSink_usb_func);
cf9a08ae5aece88 drivers/usb/gadget/f_sourcesink.c          Sebastian Andrzej Siewior 2012-12-23  1274  	if (ret)
cf9a08ae5aece88 drivers/usb/gadget/f_sourcesink.c          Sebastian Andrzej Siewior 2012-12-23  1275  		return ret;
cf9a08ae5aece88 drivers/usb/gadget/f_sourcesink.c          Sebastian Andrzej Siewior 2012-12-23  1276  	ret = lb_modinit();
cf9a08ae5aece88 drivers/usb/gadget/f_sourcesink.c          Sebastian Andrzej Siewior 2012-12-23  1277  	if (ret)
5c9f589ea23bf99 drivers/usb/gadget/function/f_sourcesink.c Linyu Yuan                2022-05-09  1278  		usb_function_unregister(&SourceSink_usb_func);
cf9a08ae5aece88 drivers/usb/gadget/f_sourcesink.c          Sebastian Andrzej Siewior 2012-12-23  1279  	return ret;
544aca39e670421 drivers/usb/gadget/f_sourcesink.c          Sebastian Andrzej Siewior 2012-12-23  1280  }
cf9a08ae5aece88 drivers/usb/gadget/f_sourcesink.c          Sebastian Andrzej Siewior 2012-12-23  1281  static void __exit sslb_modexit(void)
cf9a08ae5aece88 drivers/usb/gadget/f_sourcesink.c          Sebastian Andrzej Siewior 2012-12-23  1282  {
5c9f589ea23bf99 drivers/usb/gadget/function/f_sourcesink.c Linyu Yuan                2022-05-09 @1283  	usb_function_unregister(&SourceSink_usb_func);
cf9a08ae5aece88 drivers/usb/gadget/f_sourcesink.c          Sebastian Andrzej Siewior 2012-12-23  1284  	lb_modexit();
cf9a08ae5aece88 drivers/usb/gadget/f_sourcesink.c          Sebastian Andrzej Siewior 2012-12-23  1285  }
cf9a08ae5aece88 drivers/usb/gadget/f_sourcesink.c          Sebastian Andrzej Siewior 2012-12-23  1286  module_init(sslb_modinit);
cf9a08ae5aece88 drivers/usb/gadget/f_sourcesink.c          Sebastian Andrzej Siewior 2012-12-23  1287  module_exit(sslb_modexit);
cf9a08ae5aece88 drivers/usb/gadget/f_sourcesink.c          Sebastian Andrzej Siewior 2012-12-23  1288  

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



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux