linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/4] usb: gadget: update DECLARE_USB_FUNCTION(_INIT) macro
@ 2022-05-09 11:54 Linyu Yuan
  2022-05-09 11:54 ` [PATCH v3 1/4] usb: gadget: f_mass_storage: fix warning of -Werror=unused-but-set-variable Linyu Yuan
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Linyu Yuan @ 2022-05-09 11:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-usb, Jack Pham, Linyu Yuan

this allow generate better function and variable name,
no function change.

v1: only change the macros
v2: fix f_sourcesink.c build issue report by kernel test robot <lkp@intel.com>
v3: fix f_tcm.c build issue report by kernel test robot <lkp@intel.com>,
    fix comment from Greg,
    clean some code of f_sourcesink.c.

thanks to kernel test robot <lkp@intel.com>.

Linyu Yuan (4):
  usb: gadget: f_mass_storage: fix warning of
    -Werror=unused-but-set-variable
  usb: gadget: f_sourcesink: use DECLARE_USB_FUNCTION_INIT()
  usb: gadget: f_loopback: use DECLARE_USB_FUNCTION_INIT() macro
  usb: gadget: add '_' in DECLARE_USB_FUNCTION(_INIT) macros

 drivers/usb/gadget/function/f_loopback.c     | 12 +-----------
 drivers/usb/gadget/function/f_mass_storage.c |  2 +-
 drivers/usb/gadget/function/f_sourcesink.c   | 22 +---------------------
 drivers/usb/gadget/function/f_tcm.c          |  6 +++---
 drivers/usb/gadget/function/g_zero.h         |  3 ---
 include/linux/usb/composite.h                | 14 +++++++-------
 6 files changed, 13 insertions(+), 46 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v3 1/4] usb: gadget: f_mass_storage: fix warning of -Werror=unused-but-set-variable
  2022-05-09 11:54 [PATCH v3 0/4] usb: gadget: update DECLARE_USB_FUNCTION(_INIT) macro Linyu Yuan
@ 2022-05-09 11:54 ` Linyu Yuan
  2022-05-09 12:48   ` Greg Kroah-Hartman
  2022-05-09 11:54 ` [PATCH v3 2/4] usb: gadget: f_sourcesink: use DECLARE_USB_FUNCTION_INIT() Linyu Yuan
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 10+ messages in thread
From: Linyu Yuan @ 2022-05-09 11:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-usb, Jack Pham, Linyu Yuan

When add gcc W=1 compile flag, it report following error,
In function 'invalidate_sub':
error: variable 'rc' set but not used [-Werror=unused-but-set-variable],

Add a __maybe_unused property.

Signed-off-by: Linyu Yuan <quic_linyyuan@quicinc.com>
---
v3: new add

 drivers/usb/gadget/function/f_mass_storage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/function/f_mass_storage.c b/drivers/usb/gadget/function/f_mass_storage.c
index 3a77bca..a688538 100644
--- a/drivers/usb/gadget/function/f_mass_storage.c
+++ b/drivers/usb/gadget/function/f_mass_storage.c
@@ -926,7 +926,7 @@ static void invalidate_sub(struct fsg_lun *curlun)
 {
 	struct file	*filp = curlun->filp;
 	struct inode	*inode = file_inode(filp);
-	unsigned long	rc;
+	unsigned long	__maybe_unused rc;
 
 	rc = invalidate_mapping_pages(inode->i_mapping, 0, -1);
 	VLDBG(curlun, "invalidate_mapping_pages -> %ld\n", rc);
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v3 2/4] usb: gadget: f_sourcesink: use DECLARE_USB_FUNCTION_INIT()
  2022-05-09 11:54 [PATCH v3 0/4] usb: gadget: update DECLARE_USB_FUNCTION(_INIT) macro Linyu Yuan
  2022-05-09 11:54 ` [PATCH v3 1/4] usb: gadget: f_mass_storage: fix warning of -Werror=unused-but-set-variable Linyu Yuan
@ 2022-05-09 11:54 ` Linyu Yuan
  2022-05-09 12:49   ` Greg Kroah-Hartman
  2022-05-09 11:54 ` [PATCH v3 3/4] usb: gadget: f_loopback: use DECLARE_USB_FUNCTION_INIT() macro Linyu Yuan
  2022-05-09 11:54 ` [PATCH v3 4/4] usb: gadget: add '_' in DECLARE_USB_FUNCTION(_INIT) macros Linyu Yuan
  3 siblings, 1 reply; 10+ messages in thread
From: Linyu Yuan @ 2022-05-09 11:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-usb, Jack Pham, Linyu Yuan

First there is no reason call lb_modinit() and lb_modexit()
which belong to f_loopback.c,
let's remove them here and remove two function prototype from g_zero.h.

After first step, we can use DECLARE_USB_FUNCTION_INIT() macro
to create module init/exit function implicit as it only
register/unregister one usb function driver.

Signed-off-by: Linyu Yuan <quic_linyyuan@quicinc.com>
---
v3: new add

 drivers/usb/gadget/function/f_sourcesink.c | 22 +---------------------
 drivers/usb/gadget/function/g_zero.h       |  3 ---
 2 files changed, 1 insertion(+), 24 deletions(-)

diff --git a/drivers/usb/gadget/function/f_sourcesink.c b/drivers/usb/gadget/function/f_sourcesink.c
index 6803cd6..f4a0793 100644
--- a/drivers/usb/gadget/function/f_sourcesink.c
+++ b/drivers/usb/gadget/function/f_sourcesink.c
@@ -1263,27 +1263,7 @@ static struct usb_function_instance *source_sink_alloc_inst(void)
 
 	return &ss_opts->func_inst;
 }
-DECLARE_USB_FUNCTION(SourceSink, source_sink_alloc_inst,
+DECLARE_USB_FUNCTION_INIT(SourceSink, source_sink_alloc_inst,
 		source_sink_alloc_func);
 
-static int __init sslb_modinit(void)
-{
-	int ret;
-
-	ret = usb_function_register(&SourceSinkusb_func);
-	if (ret)
-		return ret;
-	ret = lb_modinit();
-	if (ret)
-		usb_function_unregister(&SourceSinkusb_func);
-	return ret;
-}
-static void __exit sslb_modexit(void)
-{
-	usb_function_unregister(&SourceSinkusb_func);
-	lb_modexit();
-}
-module_init(sslb_modinit);
-module_exit(sslb_modexit);
-
 MODULE_LICENSE("GPL");
diff --git a/drivers/usb/gadget/function/g_zero.h b/drivers/usb/gadget/function/g_zero.h
index 98b8462..c1ea285 100644
--- a/drivers/usb/gadget/function/g_zero.h
+++ b/drivers/usb/gadget/function/g_zero.h
@@ -62,9 +62,6 @@ struct f_lb_opts {
 	int				refcnt;
 };
 
-void lb_modexit(void);
-int lb_modinit(void);
-
 /* common utilities */
 void disable_endpoints(struct usb_composite_dev *cdev,
 		struct usb_ep *in, struct usb_ep *out,
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v3 3/4] usb: gadget: f_loopback: use DECLARE_USB_FUNCTION_INIT() macro
  2022-05-09 11:54 [PATCH v3 0/4] usb: gadget: update DECLARE_USB_FUNCTION(_INIT) macro Linyu Yuan
  2022-05-09 11:54 ` [PATCH v3 1/4] usb: gadget: f_mass_storage: fix warning of -Werror=unused-but-set-variable Linyu Yuan
  2022-05-09 11:54 ` [PATCH v3 2/4] usb: gadget: f_sourcesink: use DECLARE_USB_FUNCTION_INIT() Linyu Yuan
@ 2022-05-09 11:54 ` Linyu Yuan
  2022-05-09 18:39   ` kernel test robot
  2022-05-09 19:22   ` kernel test robot
  2022-05-09 11:54 ` [PATCH v3 4/4] usb: gadget: add '_' in DECLARE_USB_FUNCTION(_INIT) macros Linyu Yuan
  3 siblings, 2 replies; 10+ messages in thread
From: Linyu Yuan @ 2022-05-09 11:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-usb, Jack Pham, Linyu Yuan

As lb_modexit()/lb_modinit() just register/unregister
the loopback usb function driver,
DECLARE_USB_FUNCTION_INIT() macro do same thing,
let's use this macro instead and remove lb_modexit()//lb_modinit().

Signed-off-by: Linyu Yuan <quic_linyyuan@quicinc.com>
---
v3: new add according review comment

 drivers/usb/gadget/function/f_loopback.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/usb/gadget/function/f_loopback.c b/drivers/usb/gadget/function/f_loopback.c
index ae41f55..b0eda4f 100644
--- a/drivers/usb/gadget/function/f_loopback.c
+++ b/drivers/usb/gadget/function/f_loopback.c
@@ -583,16 +583,6 @@ static struct usb_function_instance *loopback_alloc_instance(void)
 
 	return  &lb_opts->func_inst;
 }
-DECLARE_USB_FUNCTION(Loopback, loopback_alloc_instance, loopback_alloc);
-
-int __init lb_modinit(void)
-{
-	return usb_function_register(&Loopbackusb_func);
-}
-
-void __exit lb_modexit(void)
-{
-	usb_function_unregister(&Loopbackusb_func);
-}
+DECLARE_USB_FUNCTION_INIT(Loopback, loopback_alloc_instance, loopback_alloc);
 
 MODULE_LICENSE("GPL");
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v3 4/4] usb: gadget: add '_' in DECLARE_USB_FUNCTION(_INIT) macros
  2022-05-09 11:54 [PATCH v3 0/4] usb: gadget: update DECLARE_USB_FUNCTION(_INIT) macro Linyu Yuan
                   ` (2 preceding siblings ...)
  2022-05-09 11:54 ` [PATCH v3 3/4] usb: gadget: f_loopback: use DECLARE_USB_FUNCTION_INIT() macro Linyu Yuan
@ 2022-05-09 11:54 ` Linyu Yuan
  2022-05-09 12:50   ` Greg Kroah-Hartman
  3 siblings, 1 reply; 10+ messages in thread
From: Linyu Yuan @ 2022-05-09 11:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-usb, Jack Pham, Linyu Yuan

DECLARE_USB_FUNCTION_INIT(ffs, ffs_alloc_inst, ffs_alloc)
will generate function ffsmod_init/ffsmod_exit()
and variable ffsusb_func.

Add possible character '_' in the macros which will generate
function/variable name in common format, ffs_mod_init/ffs_mod_exit()
and ffs_usb_func.

f_tcm.c doing more thing in module init/exit, it will not use
DECLARE_USB_FUNCTION_INIT() macro, but we change DECLARE_USB_FUNCTION()
macro, it will change static struct usb_function_driver variable from
tcmusb_func to tcm_usb_func,
so update tcm_init()/tcm_exit() to use tcm_usb_func.

Signed-off-by: Linyu Yuan <quic_linyyuan@quicinc.com>
---
v2: fix build issue from kernel test robot <lkp@intel.com>
v3: change commit description and add f_tcm.c change

 drivers/usb/gadget/function/f_tcm.c |  6 +++---
 include/linux/usb/composite.h       | 14 +++++++-------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/usb/gadget/function/f_tcm.c b/drivers/usb/gadget/function/f_tcm.c
index 8e17ac8..4873587 100644
--- a/drivers/usb/gadget/function/f_tcm.c
+++ b/drivers/usb/gadget/function/f_tcm.c
@@ -2310,13 +2310,13 @@ static int tcm_init(void)
 {
 	int ret;
 
-	ret = usb_function_register(&tcmusb_func);
+	ret = usb_function_register(&tcm_usb_func);
 	if (ret)
 		return ret;
 
 	ret = target_register_template(&usbg_ops);
 	if (ret)
-		usb_function_unregister(&tcmusb_func);
+		usb_function_unregister(&tcm_usb_func);
 
 	return ret;
 }
@@ -2325,7 +2325,7 @@ module_init(tcm_init);
 static void tcm_exit(void)
 {
 	target_unregister_template(&usbg_ops);
-	usb_function_unregister(&tcmusb_func);
+	usb_function_unregister(&tcm_usb_func);
 }
 module_exit(tcm_exit);
 
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h
index 9d27622..0eac583 100644
--- a/include/linux/usb/composite.h
+++ b/include/linux/usb/composite.h
@@ -611,7 +611,7 @@ int usb_add_config_only(struct usb_composite_dev *cdev,
 void usb_remove_function(struct usb_configuration *c, struct usb_function *f);
 
 #define DECLARE_USB_FUNCTION(_name, _inst_alloc, _func_alloc)		\
-	static struct usb_function_driver _name ## usb_func = {		\
+	static struct usb_function_driver _name ## _usb_func = {	\
 		.name = __stringify(_name),				\
 		.mod  = THIS_MODULE,					\
 		.alloc_inst = _inst_alloc,				\
@@ -621,16 +621,16 @@ void usb_remove_function(struct usb_configuration *c, struct usb_function *f);
 
 #define DECLARE_USB_FUNCTION_INIT(_name, _inst_alloc, _func_alloc)	\
 	DECLARE_USB_FUNCTION(_name, _inst_alloc, _func_alloc)		\
-	static int __init _name ## mod_init(void)			\
+	static int __init _name ## _mod_init(void)			\
 	{								\
-		return usb_function_register(&_name ## usb_func);	\
+		return usb_function_register(&_name ## _usb_func);	\
 	}								\
-	static void __exit _name ## mod_exit(void)			\
+	static void __exit _name ## _mod_exit(void)			\
 	{								\
-		usb_function_unregister(&_name ## usb_func);		\
+		usb_function_unregister(&_name ## _usb_func);		\
 	}								\
-	module_init(_name ## mod_init);					\
-	module_exit(_name ## mod_exit)
+	module_init(_name ## _mod_init);				\
+	module_exit(_name ## _mod_exit)
 
 /* messaging utils */
 #define DBG(d, fmt, args...) \
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 1/4] usb: gadget: f_mass_storage: fix warning of -Werror=unused-but-set-variable
  2022-05-09 11:54 ` [PATCH v3 1/4] usb: gadget: f_mass_storage: fix warning of -Werror=unused-but-set-variable Linyu Yuan
@ 2022-05-09 12:48   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 10+ messages in thread
From: Greg Kroah-Hartman @ 2022-05-09 12:48 UTC (permalink / raw)
  To: Linyu Yuan; +Cc: linux-usb, Jack Pham

On Mon, May 09, 2022 at 07:54:45PM +0800, Linyu Yuan wrote:
> When add gcc W=1 compile flag, it report following error,
> In function 'invalidate_sub':
> error: variable 'rc' set but not used [-Werror=unused-but-set-variable],
> 
> Add a __maybe_unused property.
> 
> Signed-off-by: Linyu Yuan <quic_linyyuan@quicinc.com>
> ---
> v3: new add
> 
>  drivers/usb/gadget/function/f_mass_storage.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/gadget/function/f_mass_storage.c b/drivers/usb/gadget/function/f_mass_storage.c
> index 3a77bca..a688538 100644
> --- a/drivers/usb/gadget/function/f_mass_storage.c
> +++ b/drivers/usb/gadget/function/f_mass_storage.c
> @@ -926,7 +926,7 @@ static void invalidate_sub(struct fsg_lun *curlun)
>  {
>  	struct file	*filp = curlun->filp;
>  	struct inode	*inode = file_inode(filp);
> -	unsigned long	rc;
> +	unsigned long	__maybe_unused rc;

That is almost never the correct solution here, sorry.  Fix this up
properly.

And W=1 really is not a valid thing to care about, right?

thanks,

>  	rc = invalidate_mapping_pages(inode->i_mapping, 0, -1);

Why not properly handle the error?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 2/4] usb: gadget: f_sourcesink: use DECLARE_USB_FUNCTION_INIT()
  2022-05-09 11:54 ` [PATCH v3 2/4] usb: gadget: f_sourcesink: use DECLARE_USB_FUNCTION_INIT() Linyu Yuan
@ 2022-05-09 12:49   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 10+ messages in thread
From: Greg Kroah-Hartman @ 2022-05-09 12:49 UTC (permalink / raw)
  To: Linyu Yuan; +Cc: linux-usb, Jack Pham

On Mon, May 09, 2022 at 07:54:46PM +0800, Linyu Yuan wrote:
> First there is no reason call lb_modinit() and lb_modexit()
> which belong to f_loopback.c,
> let's remove them here and remove two function prototype from g_zero.h.

Please properly format your paragraphs.  Why the odd line-break?

> After first step, we can use DECLARE_USB_FUNCTION_INIT() macro
> to create module init/exit function implicit as it only
> register/unregister one usb function driver.
> 
> Signed-off-by: Linyu Yuan <quic_linyyuan@quicinc.com>
> ---
> v3: new add

What does "new add" mean?

Please be explicit and verbose.

confused,

greg k-h

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 4/4] usb: gadget: add '_' in DECLARE_USB_FUNCTION(_INIT) macros
  2022-05-09 11:54 ` [PATCH v3 4/4] usb: gadget: add '_' in DECLARE_USB_FUNCTION(_INIT) macros Linyu Yuan
@ 2022-05-09 12:50   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 10+ messages in thread
From: Greg Kroah-Hartman @ 2022-05-09 12:50 UTC (permalink / raw)
  To: Linyu Yuan; +Cc: linux-usb, Jack Pham

On Mon, May 09, 2022 at 07:54:48PM +0800, Linyu Yuan wrote:
> DECLARE_USB_FUNCTION_INIT(ffs, ffs_alloc_inst, ffs_alloc)
> will generate function ffsmod_init/ffsmod_exit()
> and variable ffsusb_func.
> 
> Add possible character '_' in the macros which will generate
> function/variable name in common format, ffs_mod_init/ffs_mod_exit()
> and ffs_usb_func.

You say what you are doing here, but I still do not understand why you
want to do this.

And again, as your previous submissions were never test-built, this
isn't solving a real problem for your devices, so why are you needing
this change at all?

still confused,

greg k-h

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 3/4] usb: gadget: f_loopback: use DECLARE_USB_FUNCTION_INIT() macro
  2022-05-09 11:54 ` [PATCH v3 3/4] usb: gadget: f_loopback: use DECLARE_USB_FUNCTION_INIT() macro Linyu Yuan
@ 2022-05-09 18:39   ` kernel test robot
  2022-05-09 19:22   ` kernel test robot
  1 sibling, 0 replies; 10+ messages in thread
From: kernel test robot @ 2022-05-09 18:39 UTC (permalink / raw)
  To: Linyu Yuan, Greg Kroah-Hartman
  Cc: kbuild-all, linux-usb, Jack Pham, Linyu Yuan

Hi Linyu,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on usb/usb-testing]
[also build test ERROR on v5.18-rc6 next-20220509]
[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-200328
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: sparc-randconfig-m031-20220509 (https://download.01.org/0day-ci/archive/20220510/202205100203.Eqt29eI6-lkp@intel.com/config)
compiler: sparc-linux-gcc (GCC) 11.3.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/intel-lab-lkp/linux/commit/9af25f078e024028630e40f8b81ae7e9d3b29554
        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-200328
        git checkout 9af25f078e024028630e40f8b81ae7e9d3b29554
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=sparc SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

   sparc-linux-ld: sparc-linux-ld: DWARF error: could not find abbrev number 9829
   drivers/usb/gadget/function/f_sourcesink.o: in function `SourceSinkmod_init':
>> f_sourcesink.c:(.init.text+0x0): multiple definition of `init_module'; sparc-linux-ld: DWARF error: could not find abbrev number 198689821
   drivers/usb/gadget/function/f_loopback.o:f_loopback.c:(.init.text+0x0): first defined here
   sparc-linux-ld: drivers/usb/gadget/function/f_sourcesink.o: in function `SourceSinkmod_exit':
   f_sourcesink.c:(.exit.text+0x0): multiple definition of `cleanup_module'; drivers/usb/gadget/function/f_loopback.o:f_loopback.c:(.exit.text+0x0): first defined here

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 3/4] usb: gadget: f_loopback: use DECLARE_USB_FUNCTION_INIT() macro
  2022-05-09 11:54 ` [PATCH v3 3/4] usb: gadget: f_loopback: use DECLARE_USB_FUNCTION_INIT() macro Linyu Yuan
  2022-05-09 18:39   ` kernel test robot
@ 2022-05-09 19:22   ` kernel test robot
  1 sibling, 0 replies; 10+ messages in thread
From: kernel test robot @ 2022-05-09 19:22 UTC (permalink / raw)
  To: Linyu Yuan, Greg Kroah-Hartman
  Cc: kbuild-all, linux-usb, Jack Pham, Linyu Yuan

Hi Linyu,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on usb/usb-testing]
[also build test ERROR on v5.18-rc6 next-20220509]
[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-200328
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: alpha-randconfig-r024-20220509 (https://download.01.org/0day-ci/archive/20220510/202205100334.A5vWHYGj-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 11.3.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/intel-lab-lkp/linux/commit/9af25f078e024028630e40f8b81ae7e9d3b29554
        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-200328
        git checkout 9af25f078e024028630e40f8b81ae7e9d3b29554
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=alpha SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

   alpha-linux-ld: drivers/usb/gadget/function/f_sourcesink.o: in function `SourceSinkmod_init':
>> (.init.text+0x0): multiple definition of `init_module'; drivers/usb/gadget/function/f_loopback.o:(.init.text+0x0): first defined here
   alpha-linux-ld: drivers/usb/gadget/function/f_sourcesink.o: in function `SourceSinkmod_exit':
>> (.exit.text+0x0): multiple definition of `cleanup_module'; drivers/usb/gadget/function/f_loopback.o:(.exit.text+0x0): first defined here

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-05-09 19:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-09 11:54 [PATCH v3 0/4] usb: gadget: update DECLARE_USB_FUNCTION(_INIT) macro Linyu Yuan
2022-05-09 11:54 ` [PATCH v3 1/4] usb: gadget: f_mass_storage: fix warning of -Werror=unused-but-set-variable Linyu Yuan
2022-05-09 12:48   ` Greg Kroah-Hartman
2022-05-09 11:54 ` [PATCH v3 2/4] usb: gadget: f_sourcesink: use DECLARE_USB_FUNCTION_INIT() Linyu Yuan
2022-05-09 12:49   ` Greg Kroah-Hartman
2022-05-09 11:54 ` [PATCH v3 3/4] usb: gadget: f_loopback: use DECLARE_USB_FUNCTION_INIT() macro Linyu Yuan
2022-05-09 18:39   ` kernel test robot
2022-05-09 19:22   ` kernel test robot
2022-05-09 11:54 ` [PATCH v3 4/4] usb: gadget: add '_' in DECLARE_USB_FUNCTION(_INIT) macros Linyu Yuan
2022-05-09 12:50   ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).