Jan Beulich
2012-Nov-02 08:38 UTC
[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 f1c6872e4980bc4078cfaead05f892b3d78dea64. Reported-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Jan Beulich <jbeulich@suse.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> --- (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(); -} -EXPORT_SYMBOL_GPL(dbgp_external_startup); - static int ehci_reset_port(int port) { u32 portsc; @@ -979,6 +974,7 @@ struct console early_dbgp_console = { .index = -1, }; +#if IS_ENABLED(CONFIG_USB) 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) } EXPORT_SYMBOL_GPL(dbgp_reset_prep); +int dbgp_external_startup(struct usb_hcd *hcd) +{ + return xen_dbgp_external_startup(hcd) ?: _dbgp_external_startup(); +} +EXPORT_SYMBOL_GPL(dbgp_external_startup); +#endif /* USB */ + #ifdef CONFIG_KGDB static char kgdbdbgp_buf[DBGP_MAX_PACKET]; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Greg KH
2012-Nov-02 16:23 UTC
Re: [PATCH, v3] fix build with XEN and EARLY_PRINTK_DBGP enabled but USB_SUPPORT disabled
On Fri, Nov 02, 2012 at 08:38:07AM +0000, Jan Beulich wrote:> Since there''s no possible caller of dbgp_external_startup() and<snip> Please just send the incremental patch, in a format that I can apply it (hint, as an attachment like this I can''t, as I would have to hand-edit the attachment, and I might get it wrong...) thanks, greg k-h
Jan Beulich
2012-Nov-02 16:54 UTC
Re: [PATCH, v3] fix build with XEN and EARLY_PRINTK_DBGP enabled but USB_SUPPORT disabled
>>> On 02.11.12 at 17:23, Greg KH <gregkh@linuxfoundation.org> wrote: > On Fri, Nov 02, 2012 at 08:38:07AM +0000, Jan Beulich wrote: >> Since there''s no possible caller of dbgp_external_startup() and > > <snip> > > Please just send the incremental patch, in a format that I can apply it > (hint, as an attachment like this I can''t, as I would have to hand-edit > the attachment, and I might get it wrong...)Here you go: fix build of EHCI debug port code when USB_CHIPIDEA but !USB_EHCI_HCD Relax condition of building the reset interface stubs in drivers/usb/early/ehci-dbgp.c from USB_EHCI_HCD to just USB, to also cover the chipidea driver re-using code from ehci-hcd. Reported-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> --- drivers/usb/early/ehci-dbgp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- 3.7-rc3.orig/drivers/usb/early/ehci-dbgp.c +++ 3.7-rc3/drivers/usb/early/ehci-dbgp.c @@ -974,7 +974,7 @@ struct console early_dbgp_console = { .index = -1, }; -#if IS_ENABLED(CONFIG_USB_EHCI_HCD) +#if IS_ENABLED(CONFIG_USB) int dbgp_reset_prep(struct usb_hcd *hcd) { int ret = xen_dbgp_reset_prep(hcd); @@ -1008,7 +1008,7 @@ int dbgp_external_startup(struct usb_hcd return xen_dbgp_external_startup(hcd) ?: _dbgp_external_startup(); } EXPORT_SYMBOL_GPL(dbgp_external_startup); -#endif /* USB_EHCI_HCD */ +#endif /* USB */ #ifdef CONFIG_KGDB
Greg KH
2012-Nov-02 17:01 UTC
Re: [PATCH, v3] fix build with XEN and EARLY_PRINTK_DBGP enabled but USB_SUPPORT disabled
On Fri, Nov 02, 2012 at 04:54:47PM +0000, Jan Beulich wrote:> >>> On 02.11.12 at 17:23, Greg KH <gregkh@linuxfoundation.org> wrote: > > On Fri, Nov 02, 2012 at 08:38:07AM +0000, Jan Beulich wrote: > >> Since there''s no possible caller of dbgp_external_startup() and > > > > <snip> > > > > Please just send the incremental patch, in a format that I can apply it > > (hint, as an attachment like this I can''t, as I would have to hand-edit > > the attachment, and I might get it wrong...) > > Here you go: > > fix build of EHCI debug port code when USB_CHIPIDEA but !USB_EHCI_HCD > > Relax condition of building the reset interface stubs in > drivers/usb/early/ehci-dbgp.c from USB_EHCI_HCD to just USB, to also > cover the chipidea driver re-using code from ehci-hcd.Ok, I''m going to be a pain here, but this isn''t in a form I can apply it. I would have to edit this by hand and then run it through git, making it a pain to apply. Please be nice to overworked maintainers and make it easy to apply your patches, send them in a format that they don''t have to edit _anything_. Third times a charm? greg k-h
Jan Beulich
2012-Nov-02 17:07 UTC
Re: [PATCH, v3] fix build with XEN and EARLY_PRINTK_DBGP enabled but USB_SUPPORT disabled
>>> On 02.11.12 at 18:01, Greg KH <gregkh@linuxfoundation.org> wrote: > On Fri, Nov 02, 2012 at 04:54:47PM +0000, Jan Beulich wrote: >> >>> On 02.11.12 at 17:23, Greg KH <gregkh@linuxfoundation.org> wrote: >> > On Fri, Nov 02, 2012 at 08:38:07AM +0000, Jan Beulich wrote: >> >> Since there''s no possible caller of dbgp_external_startup() and >> > >> > <snip> >> > >> > Please just send the incremental patch, in a format that I can apply it >> > (hint, as an attachment like this I can''t, as I would have to hand-edit >> > the attachment, and I might get it wrong...) >> >> Here you go: >> >> fix build of EHCI debug port code when USB_CHIPIDEA but !USB_EHCI_HCD >> >> Relax condition of building the reset interface stubs in >> drivers/usb/early/ehci-dbgp.c from USB_EHCI_HCD to just USB, to also >> cover the chipidea driver re-using code from ehci-hcd. > > Ok, I''m going to be a pain here, but this isn''t in a form I can apply > it. I would have to edit this by hand and then run it through git, > making it a pain to apply. Please be nice to overworked maintainers and > make it easy to apply your patches, send them in a format that they > don''t have to edit _anything_. > > Third times a charm?Assuming (since you didn''t mention what''s wrong) all this is about is the fact that the mail contains other text besides the patch, I''ll resend the patch alone. If that''s not your issue, you''ll have to tell me what it is I did wrong. Jan
Greg KH
2012-Nov-02 17:09 UTC
Re: [PATCH, v3] fix build with XEN and EARLY_PRINTK_DBGP enabled but USB_SUPPORT disabled
On Fri, Nov 02, 2012 at 05:07:35PM +0000, Jan Beulich wrote:> >>> On 02.11.12 at 18:01, Greg KH <gregkh@linuxfoundation.org> wrote: > > On Fri, Nov 02, 2012 at 04:54:47PM +0000, Jan Beulich wrote: > >> >>> On 02.11.12 at 17:23, Greg KH <gregkh@linuxfoundation.org> wrote: > >> > On Fri, Nov 02, 2012 at 08:38:07AM +0000, Jan Beulich wrote: > >> >> Since there''s no possible caller of dbgp_external_startup() and > >> > > >> > <snip> > >> > > >> > Please just send the incremental patch, in a format that I can apply it > >> > (hint, as an attachment like this I can''t, as I would have to hand-edit > >> > the attachment, and I might get it wrong...) > >> > >> Here you go: > >> > >> fix build of EHCI debug port code when USB_CHIPIDEA but !USB_EHCI_HCD > >> > >> Relax condition of building the reset interface stubs in > >> drivers/usb/early/ehci-dbgp.c from USB_EHCI_HCD to just USB, to also > >> cover the chipidea driver re-using code from ehci-hcd. > > > > Ok, I''m going to be a pain here, but this isn''t in a form I can apply > > it. I would have to edit this by hand and then run it through git, > > making it a pain to apply. Please be nice to overworked maintainers and > > make it easy to apply your patches, send them in a format that they > > don''t have to edit _anything_. > > > > Third times a charm? > > Assuming (since you didn''t mention what''s wrong) all this is about > is the fact that the mail contains other text besides the patch, I''ll > resend the patch alone. If that''s not your issue, you''ll have to > tell me what it is I did wrong.Yes, that is incorrect, along with the Subject: line. thanks, greg k-h