On Tue, Nov 30, 2010 at 10:01:50AM -0800, Sarah Sharp wrote: > On Tue, Nov 30, 2010 at 06:33:06PM +0800, Ming Lei wrote: > > 2010/11/30 Sarah Sharp <sarah.a.sharp@xxxxxxxxxxxxxxx>: > > > Â16 files changed, 136 insertions(+), 46 deletions(-) > > > > > > diff --git a/drivers/staging/usbip/vhci_hcd.c b/drivers/staging/usbip/vhci_hcd.c > > > index 832608d..7ec3e74 100644 > > > --- a/drivers/staging/usbip/vhci_hcd.c > > > +++ b/drivers/staging/usbip/vhci_hcd.c > > > @@ -257,8 +257,8 @@ static inline void hub_descriptor(struct usb_hub_descriptor *desc) > > > Â Â Â Âdesc->wHubCharacteristics = (__force __u16) > > > Â Â Â Â Â Â Â Â(__constant_cpu_to_le16(0x0001)); > > > Â Â Â Âdesc->bNbrPorts = VHCI_NPORTS; > > > - Â Â Â desc->bitmap[0] = 0xff; > > > - Â Â Â desc->bitmap[1] = 0xff; > > > + Â Â Â desc->u.hs.bitmap[0] = 0xff; > > > + Â Â Â desc->u.hs.bitmap[1] = 0xff; > > > > Maybe redefining bitmap as u.hs.bitmap is cleverer fix, isn't it? > > Redefining a misleading #define? Ohh, that's evilly clever. I like it. :) Ack, that produces some ugly results: In file included from include/linux/fsnotify_backend.h:13, from include/linux/fsnotify.h:15, from include/linux/security.h:27, from drivers/usb/core/devio.c:50: include/linux/idr.h:52: error: expected â:â, â,â, â;â, â}â or â__attribute__â before â.â token In file included from include/linux/fsnotify_backend.h:13, from include/linux/fsnotify.h:15, from include/linux/security.h:27, from drivers/usb/core/devio.c:50: include/linux/idr.h:131: error: expected â:â, â,â, â;â, â}â or â__attribute__â before â.â token In file included from include/linux/security.h:37, from drivers/usb/core/devio.c:50: include/linux/xfrm.h:84: error: expected â:â, â,â, â;â, â}â or â__attribute__â before â.â token make[3]: *** [drivers/usb/core/devio.o] Error 1 make[2]: *** [drivers/usb/core] Error 2 make[1]: *** [drivers/usb] Error 2 make: *** [drivers] Error 2 That's because include/linux/idr.h has variables named bitmap. Since devio.c includes include/linux/hcd.h before that file, the preprocessor was renaming those variables to DeviceRemovable. Yuck! The quick fix is to always include hcd.h last, but a more complete fix would be to get rid of the bitmap #define entirely to avoid confusion with similarly named variables. Which do you think would be better? Sarah Sharp -- 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