Randy Dunlap <rdunlap@xxxxxxxxxxxx> writes: > Fix 41 occurrences of this type of Section mismatch warning > in g_mass_storage, g_serial, g_cdc, g_multi, g_nokia, g_ether, g_ffs: > (the 75 number reported earlier contained some duplicates.) > > WARNING: drivers/usb/gadget/g_mass_storage.o(.text+0x687a): Section mismatch in reference from the function fsg_bind() to the function .devinit.text:usb_ep_autoconfig() > > The function fsg_bind() references > the function __devinit usb_ep_autoconfig(). > This is often because fsg_bind lacks a __devinit > annotation or the annotation of usb_ep_autoconfig is wrong. The underlying problem is better visible in f_fs.c which must not use __devinit since it registers a gadget way past the kernel initialisation (it needs a user space daemon to be running) so in turn the whole composite layer does not use __devinit. Furthermore, if you look at g_ffs.c you'll see that it uses f_ecm.c, f_rndis.c, etc. thus those in turn also cannot use __devinit. And this actually applies to any composite function which one would want to use with f_fs.c > Signed-off-by: Randy Dunlap <randy.dunlap@xxxxxxxxxx> > Cc: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> > --- > include/linux/usb/gadget.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > --- lnx-2639-rc1.orig/include/linux/usb/gadget.h > +++ lnx-2639-rc1/include/linux/usb/gadget.h > @@ -890,7 +890,7 @@ static inline void usb_free_descriptors( > /* utility wrapping a simple endpoint selection policy */ > > extern struct usb_ep *usb_ep_autoconfig(struct usb_gadget *, > - struct usb_endpoint_descriptor *) __devinit; > + struct usb_endpoint_descriptor *); > > extern void usb_ep_autoconfig_reset(struct usb_gadget *) __devinit; I'd remove __devinit from usb_ep_autoconfig_reset(). I mean, it sort of looks bizarre as the only function with __devinit, isn't it? Otherwise the patch looks good. I'm only wondering why hasn't it been noticed earlier. -- Best regards, _ _ .o. | Liege of Serenly Enlightened Majesty of o' \,=./ `o ..o | Computer Science, Michal "mina86" Nazarewicz (o o) ooo +-<mina86-mina86.com>-<jid:mina86-jabber.org>--ooO--(_)--Ooo--
Attachment:
pgp3B8S64t7iz.pgp
Description: PGP signature