Subject: Re: randconfig build error with next-20140909, in drivers/usb/dwc2/platform.c

From: Randy Dunlap <[email-masked]>
Date: Tue, 09 Sep 2014 10:32:11 -0700

On 09/09/14 07:46, Jim Davis wrote:
> Building with the attached random configuration file,
> 
> drivers/usb/dwc2/platform.o: In function `dwc2_platform_driver_init':
> platform.c:(.init.text+0x0): multiple definition of `init_module'
> drivers/usb/dwc2/gadget.o:gadget.c:(.init.text+0x0): first defined here
> drivers/usb/dwc2/platform.o: In function `dwc2_platform_driver_exit':
> platform.c:(.exit.text+0x0): multiple definition of `cleanup_module'
> drivers/usb/dwc2/gadget.o:gadget.c:(.exit.text+0x0): first defined here
> make[3]: *** [drivers/usb/dwc2/dwc2.o] Error 1
> 

There are other issues as well.

1.  On i386, with these configs:

CONFIG_USB_DWC2=m
# CONFIG_USB_DWC2_HOST is not set

#
# Gadget mode requires USB Gadget support to be enabled
#
CONFIG_USB_DWC2_PERIPHERAL=y
# CONFIG_USB_DWC2_DUAL_ROLE is not set
CONFIG_USB_DWC2_DEBUG=y
CONFIG_USB_DWC2_VERBOSE=y
# CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set
# CONFIG_USB_DWC2_DEBUG_PERIODIC is not set

ERROR: "dwc2_hcd_get_frame_number" [drivers/usb/dwc2/dwc2.ko] undefined!
ERROR: "dwc2_hcd_disconnect" [drivers/usb/dwc2/dwc2.ko] undefined!
ERROR: "dwc2_hcd_start" [drivers/usb/dwc2/dwc2.ko] undefined!

2.  on x86_64, with these configs:

CONFIG_USB_DWC2=y
# CONFIG_USB_DWC2_HOST is not set

#
# Gadget mode requires USB Gadget support to be enabled
#
CONFIG_USB_DWC2_PERIPHERAL=y
# CONFIG_USB_DWC2_DUAL_ROLE is not set
CONFIG_USB_DWC2_PLATFORM=y
CONFIG_USB_DWC2_DEBUG=y
CONFIG_USB_DWC2_VERBOSE=y
CONFIG_USB_DWC2_TRACK_MISSED_SOFS=y
# CONFIG_USB_DWC2_DEBUG_PERIODIC is not set

drivers/built-in.o: In function `dwc2_hc_set_even_odd_frame':
core.c:(.text+0x1aff55): undefined reference to `dwc2_hcd_get_frame_number'
drivers/built-in.o: In function `dwc2_handle_common_intr':
(.text+0x1b3a48): undefined reference to `dwc2_hcd_start'
drivers/built-in.o: In function `dwc2_handle_common_intr':
(.text+0x1b3b05): undefined reference to `dwc2_hcd_disconnect'
drivers/built-in.o: In function `dwc2_handle_common_intr':
(.text+0x1b3b38): undefined reference to `dwc2_hcd_start'
drivers/built-in.o: In function `dwc2_handle_common_intr':
(.text+0x1b3e38): undefined reference to `dwc2_hcd_start'
drivers/built-in.o: In function `dwc2_driver_remove':
platform.c:(.text+0x1b7b35): undefined reference to `dwc2_hcd_remove'
drivers/built-in.o: In function `dwc2_driver_probe':
platform.c:(.text+0x1b7b72): undefined reference to `dwc2_set_all_params'
platform.c:(.text+0x1b7c66): undefined reference to `dwc2_hcd_init'

-- 
~Randy
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email-masked]
More majordomo info at  http://vger.kernel.org/majordomo-info.html