[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH, v3] fix build with XEN and EARLY_PRINTK_DBGP enabled but USB_SUPPORT disabled

Since there's no possible caller of dbgp_external_startup() and
dbgp_reset_prep() when !USB, there's no point in building and exporting
these functions in that case. This eliminates a build error under the
conditions listed in the subject, introduced with the merge

Reported-by: Randy Dunlap <rdunlap@xxxxxxxxxxxx>
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Cc: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
Cc: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
(incremental patch attached, in case that one is preferred)

v3: Relax condition from USB_EHCI_HCD to just USB, to also cover the
    chipidea driver re-using code from ehci-hcd.
v2: Switch the dependency from USB_SUPPORT to USB_EHCI_HCD as requested
    by Alan (albeit I don't really agree to that change).

 drivers/usb/early/ehci-dbgp.c       |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

--- 3.7-rc3/drivers/usb/early/ehci-dbgp.c
+++ 3.7-rc3-ehci-dbgp-early-xen-no-usb/drivers/usb/early/ehci-dbgp.c
@@ -20,6 +20,7 @@
 #include <linux/usb/ehci_def.h>
 #include <linux/delay.h>
 #include <linux/serial_core.h>
+#include <linux/kconfig.h>
 #include <linux/kgdb.h>
 #include <linux/kthread.h>
 #include <asm/io.h>
@@ -614,12 +615,6 @@ err:
        return -ENODEV;
-int dbgp_external_startup(struct usb_hcd *hcd)
-       return xen_dbgp_external_startup(hcd) ?: _dbgp_external_startup();
 static int ehci_reset_port(int port)
        u32 portsc;
@@ -979,6 +974,7 @@ struct console early_dbgp_console = {
        .index =        -1,
 int dbgp_reset_prep(struct usb_hcd *hcd)
        int ret = xen_dbgp_reset_prep(hcd);
@@ -1007,6 +1003,13 @@ int dbgp_reset_prep(struct usb_hcd *hcd)
+int dbgp_external_startup(struct usb_hcd *hcd)
+       return xen_dbgp_external_startup(hcd) ?: _dbgp_external_startup();
+#endif /* USB */
 static char kgdbdbgp_buf[DBGP_MAX_PACKET];

Attachment: linux-3.7-rc3-ehci-dbgp-early-xen-no-usb-v3-incremental.patch
Description: Text document

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.