On Jun 23, 2011, at 5:30 PM, Randy Dunlap wrote: > On Thu, 23 Jun 2011 15:14:22 +0200 Tadele Shiferaw Tadele wrote: > >> Hello, >> >> I am trying to build a xenomai 2.5.6 patched kernel 2.6.37 for real time application development. While building I found a number of section mismatches I was able to solve but I am stuck at this warning at usb gadget. >> >> WARNING: drivers/usb/gadget/g_cdc.o(.text+0x449f): Section mismatch in reference from the function ecm_bind() to the function .devinit.text:usb_ep_autoconfig() >> The function ecm_bind() references >> the function __devinit usb_ep_autoconfig(). >> This is often because ecm_bind lacks a __devinit >> annotation or the annotation of usb_ep_autoconfig is wrong. >> >> WARNING: drivers/usb/gadget/g_cdc.o(.text+0x44b8): Section mismatch in reference from the function ecm_bind() to the function .devinit.text:usb_ep_autoconfig() >> The function ecm_bind() references >> the function __devinit usb_ep_autoconfig(). >> This is often because ecm_bind lacks a __devinit >> annotation or the annotation of usb_ep_autoconfig is wrong. >> >> WARNING: drivers/usb/gadget/g_cdc.o(.text+0x44d1): Section mismatch in reference from the function ecm_bind() to the function .devinit.text:usb_ep_autoconfig() >> The function ecm_bind() references >> the function __devinit usb_ep_autoconfig(). >> This is often because ecm_bind lacks a __devinit >> annotation or the annotation of usb_ep_autoconfig is wrong. >> >> WARNING: drivers/usb/gadget/g_cdc.o(.text+0x4b67): Section mismatch in reference from the function acm_bind() to the function .devinit.text:usb_ep_autoconfig() >> The function acm_bind() references >> the function __devinit usb_ep_autoconfig(). >> This is often because acm_bind lacks a __devinit >> annotation or the annotation of usb_ep_autoconfig is wrong. >> >> WARNING: drivers/usb/gadget/g_cdc.o(.text+0x4b80): Section mismatch in reference from the function acm_bind() to the function .devinit.text:usb_ep_autoconfig() >> The function acm_bind() references >> the function __devinit usb_ep_autoconfig(). >> This is often because acm_bind lacks a __devinit >> annotation or the annotation of usb_ep_autoconfig is wrong. >> >> WARNING: drivers/usb/gadget/g_cdc.o(.text+0x4b99): Section mismatch in reference from the function acm_bind() to the function .devinit.text:usb_ep_autoconfig() >> The function acm_bind() references >> the function __devinit usb_ep_autoconfig(). >> This is often because acm_bind lacks a __devinit >> annotation or the annotation of usb_ep_autoconfig is wrong. >> >> WARNING: drivers/usb/gadget/g_ether.o(.text+0x4699): Section mismatch in reference from the function rndis_bind() to the function .devinit.text:usb_ep_autoconfig() >> The function rndis_bind() references >> the function __devinit usb_ep_autoconfig(). >> This is often because rndis_bind lacks a __devinit >> annotation or the annotation of usb_ep_autoconfig is wrong. >> >> WARNING: drivers/usb/gadget/g_ether.o(.text+0x46b2): Section mismatch in reference from the function rndis_bind() to the function .devinit.text:usb_ep_autoconfig() >> The function rndis_bind() references >> the function __devinit usb_ep_autoconfig(). >> This is often because rndis_bind lacks a __devinit >> annotation or the annotation of usb_ep_autoconfig is wrong. >> >> WARNING: drivers/usb/gadget/g_ether.o(.text+0x46cb): Section mismatch in reference from the function rndis_bind() to the function .devinit.text:usb_ep_autoconfig() >> The function rndis_bind() references >> the function __devinit usb_ep_autoconfig(). >> This is often because rndis_bind lacks a __devinit >> annotation or the annotation of usb_ep_autoconfig is wrong. >> >> WARNING: drivers/usb/gadget/g_ether.o(.text+0x4a4f): Section mismatch in reference from the function ecm_bind() to the function .devinit.text:usb_ep_autoconfig() >> The function ecm_bind() references >> the function __devinit usb_ep_autoconfig(). >> This is often because ecm_bind lacks a __devinit >> annotation or the annotation of usb_ep_autoconfig is wrong. >> >> WARNING: drivers/usb/gadget/g_ether.o(.text+0x4a68): Section mismatch in reference from the function ecm_bind() to the function .devinit.text:usb_ep_autoconfig() >> The function ecm_bind() references >> the function __devinit usb_ep_autoconfig(). >> This is often because ecm_bind lacks a __devinit >> annotation or the annotation of usb_ep_autoconfig is wrong. >> >> WARNING: drivers/usb/gadget/g_ether.o(.text+0x4a81): Section mismatch in reference from the function ecm_bind() to the function .devinit.text:usb_ep_autoconfig() >> The function ecm_bind() references >> the function __devinit usb_ep_autoconfig(). >> This is often because ecm_bind lacks a __devinit >> annotation or the annotation of usb_ep_autoconfig is wrong. >> >> WARNING: drivers/usb/gadget/g_serial.o(.text+0x33b7): Section mismatch in reference from the function acm_bind() to the function .devinit.text:usb_ep_autoconfig() >> The function acm_bind() references >> the function __devinit usb_ep_autoconfig(). >> This is often because acm_bind lacks a __devinit >> annotation or the annotation of usb_ep_autoconfig is wrong. >> >> WARNING: drivers/usb/gadget/g_serial.o(.text+0x33d0): Section mismatch in reference from the function acm_bind() to the function .devinit.text:usb_ep_autoconfig() >> The function acm_bind() references >> the function __devinit usb_ep_autoconfig(). >> This is often because acm_bind lacks a __devinit >> annotation or the annotation of usb_ep_autoconfig is wrong. >> >> WARNING: drivers/usb/gadget/g_serial.o(.text+0x33e9): Section mismatch in reference from the function acm_bind() to the function .devinit.text:usb_ep_autoconfig() >> The function acm_bind() references >> the function __devinit usb_ep_autoconfig(). >> This is often because acm_bind lacks a __devinit >> annotation or the annotation of usb_ep_autoconfig is wrong. >> >> Can anyone help me with this? > > Hi, > These warnings are fixed *after* 2.6.39 (i.e., in 3.0-rc) by this git commit: > > commit 3ab810f19d71f4083be44b41770bcd784ff82e51 > Author: Randy Dunlap <randy.dunlap@xxxxxxxxxx> > Date: Fri Apr 1 11:24:30 2011 -0700 > > usb gadget: fix all Section mismatch warnings > > 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. > > Also remove __devinit from usb_ep_autoconfig_reset() to prevent > possible section mismatch problems with it. > > and the patch is: > > From: Randy Dunlap <randy.dunlap@xxxxxxxxxx> > > 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. > > Also remove __devinit from usb_ep_autoconfig_reset() to prevent > possible section mismatch problems with it. > > Signed-off-by: Randy Dunlap <randy.dunlap@xxxxxxxxxx> > Cc: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> > --- > include/linux/usb/gadget.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > --- lnx-2639-rc1.orig/include/linux/usb/gadget.h > +++ lnx-2639-rc1/include/linux/usb/gadget.h > @@ -890,8 +890,8 @@ 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; > +extern void usb_ep_autoconfig_reset(struct usb_gadget *); > > #endif /* __LINUX_USB_GADGET_H */ > > Problem solved ;) Thanks > --- > ~Randy > *** Remember to use Documentation/SubmitChecklist when testing your code *** > -- > To unsubscribe from this list: send the line "unsubscribe linux-usb" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html