From: kbuild test robot <lkp@intel.com>
To: John Keeping <john@metanate.com>
Cc: kbuild-all@lists.01.org, linux-usb@vger.kernel.org,
Felipe Balbi <balbi@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, John Keeping <john@metanate.com>
Subject: Re: [PATCH 1/6] USB: gadget: f_hid: move chardev setup to module init
Date: Mon, 28 Oct 2019 01:13:16 +0800 [thread overview]
Message-ID: <201910280107.B1WGrwLg%lkp@intel.com> (raw)
In-Reply-To: <20191024164538.3161474-2-john@metanate.com>
[-- Attachment #1: Type: text/plain, Size: 9132 bytes --]
Hi John,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on balbi-usb/next]
[also build test ERROR on v5.4-rc4 next-20191025]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/John-Keeping/USB-gadget-f_hid-fix-lifetime-issues/20191028-001924
base: https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git next
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=sparc64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
In file included from drivers/usb/gadget/function/f_hid.c:9:0:
include/linux/module.h:131:42: error: redefinition of '__inittest'
static inline initcall_t __maybe_unused __inittest(void) \
^
>> drivers/usb/gadget/function/f_hid.c:1156:1: note: in expansion of macro 'module_init'
module_init(ghid_setup);
^~~~~~~~~~~
include/linux/module.h:131:42: note: previous definition of '__inittest' was here
static inline initcall_t __maybe_unused __inittest(void) \
^
>> include/linux/usb/composite.h:627:2: note: in expansion of macro 'module_init'
module_init(_name ## mod_init); \
^~~~~~~~~~~
>> drivers/usb/gadget/function/f_hid.c:1116:1: note: in expansion of macro 'DECLARE_USB_FUNCTION_INIT'
DECLARE_USB_FUNCTION_INIT(hid, hidg_alloc_inst, hidg_alloc);
^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/module.h:133:6: error: redefinition of 'init_module'
int init_module(void) __copy(initfn) __attribute__((alias(#initfn)));
^
>> drivers/usb/gadget/function/f_hid.c:1156:1: note: in expansion of macro 'module_init'
module_init(ghid_setup);
^~~~~~~~~~~
include/linux/module.h:133:6: note: previous definition of 'init_module' was here
int init_module(void) __copy(initfn) __attribute__((alias(#initfn)));
^
>> include/linux/usb/composite.h:627:2: note: in expansion of macro 'module_init'
module_init(_name ## mod_init); \
^~~~~~~~~~~
>> drivers/usb/gadget/function/f_hid.c:1116:1: note: in expansion of macro 'DECLARE_USB_FUNCTION_INIT'
DECLARE_USB_FUNCTION_INIT(hid, hidg_alloc_inst, hidg_alloc);
^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/module.h:137:42: error: redefinition of '__exittest'
static inline exitcall_t __maybe_unused __exittest(void) \
^
>> drivers/usb/gadget/function/f_hid.c:1157:1: note: in expansion of macro 'module_exit'
module_exit(ghid_cleanup);
^~~~~~~~~~~
include/linux/module.h:137:42: note: previous definition of '__exittest' was here
static inline exitcall_t __maybe_unused __exittest(void) \
^
>> include/linux/usb/composite.h:628:2: note: in expansion of macro 'module_exit'
module_exit(_name ## mod_exit)
^~~~~~~~~~~
>> drivers/usb/gadget/function/f_hid.c:1116:1: note: in expansion of macro 'DECLARE_USB_FUNCTION_INIT'
DECLARE_USB_FUNCTION_INIT(hid, hidg_alloc_inst, hidg_alloc);
^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/module.h:139:7: error: redefinition of 'cleanup_module'
void cleanup_module(void) __copy(exitfn) __attribute__((alias(#exitfn)));
^
>> drivers/usb/gadget/function/f_hid.c:1157:1: note: in expansion of macro 'module_exit'
module_exit(ghid_cleanup);
^~~~~~~~~~~
include/linux/module.h:139:7: note: previous definition of 'cleanup_module' was here
void cleanup_module(void) __copy(exitfn) __attribute__((alias(#exitfn)));
^
>> include/linux/usb/composite.h:628:2: note: in expansion of macro 'module_exit'
module_exit(_name ## mod_exit)
^~~~~~~~~~~
>> drivers/usb/gadget/function/f_hid.c:1116:1: note: in expansion of macro 'DECLARE_USB_FUNCTION_INIT'
DECLARE_USB_FUNCTION_INIT(hid, hidg_alloc_inst, hidg_alloc);
^~~~~~~~~~~~~~~~~~~~~~~~~
--
In file included from drivers/usb//gadget/function/f_hid.c:9:0:
include/linux/module.h:131:42: error: redefinition of '__inittest'
static inline initcall_t __maybe_unused __inittest(void) \
^
drivers/usb//gadget/function/f_hid.c:1156:1: note: in expansion of macro 'module_init'
module_init(ghid_setup);
^~~~~~~~~~~
include/linux/module.h:131:42: note: previous definition of '__inittest' was here
static inline initcall_t __maybe_unused __inittest(void) \
^
>> include/linux/usb/composite.h:627:2: note: in expansion of macro 'module_init'
module_init(_name ## mod_init); \
^~~~~~~~~~~
drivers/usb//gadget/function/f_hid.c:1116:1: note: in expansion of macro 'DECLARE_USB_FUNCTION_INIT'
DECLARE_USB_FUNCTION_INIT(hid, hidg_alloc_inst, hidg_alloc);
^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/module.h:133:6: error: redefinition of 'init_module'
int init_module(void) __copy(initfn) __attribute__((alias(#initfn)));
^
drivers/usb//gadget/function/f_hid.c:1156:1: note: in expansion of macro 'module_init'
module_init(ghid_setup);
^~~~~~~~~~~
include/linux/module.h:133:6: note: previous definition of 'init_module' was here
int init_module(void) __copy(initfn) __attribute__((alias(#initfn)));
^
>> include/linux/usb/composite.h:627:2: note: in expansion of macro 'module_init'
module_init(_name ## mod_init); \
^~~~~~~~~~~
drivers/usb//gadget/function/f_hid.c:1116:1: note: in expansion of macro 'DECLARE_USB_FUNCTION_INIT'
DECLARE_USB_FUNCTION_INIT(hid, hidg_alloc_inst, hidg_alloc);
^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/module.h:137:42: error: redefinition of '__exittest'
static inline exitcall_t __maybe_unused __exittest(void) \
^
drivers/usb//gadget/function/f_hid.c:1157:1: note: in expansion of macro 'module_exit'
module_exit(ghid_cleanup);
^~~~~~~~~~~
include/linux/module.h:137:42: note: previous definition of '__exittest' was here
static inline exitcall_t __maybe_unused __exittest(void) \
^
>> include/linux/usb/composite.h:628:2: note: in expansion of macro 'module_exit'
module_exit(_name ## mod_exit)
^~~~~~~~~~~
drivers/usb//gadget/function/f_hid.c:1116:1: note: in expansion of macro 'DECLARE_USB_FUNCTION_INIT'
DECLARE_USB_FUNCTION_INIT(hid, hidg_alloc_inst, hidg_alloc);
^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/module.h:139:7: error: redefinition of 'cleanup_module'
void cleanup_module(void) __copy(exitfn) __attribute__((alias(#exitfn)));
^
drivers/usb//gadget/function/f_hid.c:1157:1: note: in expansion of macro 'module_exit'
module_exit(ghid_cleanup);
^~~~~~~~~~~
include/linux/module.h:139:7: note: previous definition of 'cleanup_module' was here
void cleanup_module(void) __copy(exitfn) __attribute__((alias(#exitfn)));
^
>> include/linux/usb/composite.h:628:2: note: in expansion of macro 'module_exit'
module_exit(_name ## mod_exit)
^~~~~~~~~~~
drivers/usb//gadget/function/f_hid.c:1116:1: note: in expansion of macro 'DECLARE_USB_FUNCTION_INIT'
DECLARE_USB_FUNCTION_INIT(hid, hidg_alloc_inst, hidg_alloc);
^~~~~~~~~~~~~~~~~~~~~~~~~
vim +/module_init +1156 drivers/usb/gadget/function/f_hid.c
1115
> 1116 DECLARE_USB_FUNCTION_INIT(hid, hidg_alloc_inst, hidg_alloc);
1117 MODULE_LICENSE("GPL");
1118 MODULE_AUTHOR("Fabien Chouteau");
1119
1120 static int ghid_setup(void)
1121 {
1122 int status;
1123 dev_t dev;
1124
1125 hidg_class = class_create(THIS_MODULE, "hidg");
1126 if (IS_ERR(hidg_class)) {
1127 status = PTR_ERR(hidg_class);
1128 hidg_class = NULL;
1129 return status;
1130 }
1131
1132 status = alloc_chrdev_region(&dev, 0, HIDG_MINORS, "hidg");
1133 if (status) {
1134 class_destroy(hidg_class);
1135 hidg_class = NULL;
1136 return status;
1137 }
1138
1139 major = MAJOR(dev);
1140 minors = HIDG_MINORS;
1141
1142 return 0;
1143 }
1144
1145 static void ghid_cleanup(void)
1146 {
1147 if (major) {
1148 unregister_chrdev_region(MKDEV(major, 0), minors);
1149 major = minors = 0;
1150 }
1151
1152 class_destroy(hidg_class);
1153 hidg_class = NULL;
1154 }
1155
> 1156 module_init(ghid_setup);
> 1157 module_exit(ghid_cleanup);
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 58684 bytes --]
next prev parent reply other threads:[~2019-10-27 17:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-24 16:45 [PATCH 0/6] USB: gadget: f_hid: fix lifetime issues John Keeping
2019-10-24 16:45 ` [PATCH 1/6] USB: gadget: f_hid: move chardev setup to module init John Keeping
2019-10-27 17:13 ` kbuild test robot [this message]
2019-10-24 16:45 ` [PATCH 2/6] USB: gadget: f_hid: switch to IDR for tracking minors John Keeping
2019-10-24 16:45 ` [PATCH 3/6] USB: gadget: f_hid: find f_hidg by IDR lookup on open John Keeping
2019-10-24 16:45 ` [PATCH 4/6] USB: gadget: f_hid: decouple cdev from f_hidg lifetime John Keeping
2019-10-24 16:45 ` [PATCH 5/6] USB: gadget: f_hid: refcount f_hidg structure John Keeping
2019-10-24 16:45 ` [PATCH 6/6] USB: gadget: f_hid: return ENODEV from read/write after deletion John Keeping
2019-10-28 11:42 ` [PATCH v2 0/6] USB: gadget: f_hid: fix lifetime issues John Keeping
2019-10-28 11:42 ` [PATCH v2 1/6] USB: gadget: f_hid: move chardev setup to module init John Keeping
2019-10-28 11:42 ` [PATCH v2 2/6] USB: gadget: f_hid: switch to IDR for tracking minors John Keeping
2019-10-28 11:42 ` [PATCH v2 3/6] USB: gadget: f_hid: find f_hidg by IDR lookup on open John Keeping
2019-10-28 11:42 ` [PATCH v2 4/6] USB: gadget: f_hid: decouple cdev from f_hidg lifetime John Keeping
2019-10-28 11:42 ` [PATCH v2 5/6] USB: gadget: f_hid: refcount f_hidg structure John Keeping
2019-10-28 11:42 ` [PATCH v2 6/6] USB: gadget: f_hid: return ENODEV from read/write after deletion John Keeping
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201910280107.B1WGrwLg%lkp@intel.com \
--to=lkp@intel.com \
--cc=balbi@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=john@metanate.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®