2012-11-02 04:08:40

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build warning after merge of the usb tree

Hi Greg,

After merging the usb tree, today's linux-next build (x86_64 allmodconfig)
produced this warning:

WARNING: drivers/usb/host/ehci-hcd: 'ehci_init_driver' exported twice. Previous export was in drivers/usb/chipidea/ci_hdrc.ko
WARNING: drivers/usb/host/ehci-hcd: 'ehci_resume' exported twice. Previous export was in drivers/usb/chipidea/ci_hdrc.ko
WARNING: drivers/usb/host/ehci-hcd: 'ehci_suspend' exported twice. Previous export was in drivers/usb/chipidea/ci_hdrc.ko
WARNING: drivers/usb/host/ehci-hcd: 'ehci_setup' exported twice. Previous export was in drivers/usb/chipidea/ci_hdrc.ko

Introduced by commit 3e0232039967 ("USB: EHCI: prepare to make ehci-hcd a
library module").
--
Cheers,
Stephen Rothwell [email protected]


Attachments:
(No filename) (760.00 B)
(No filename) (836.00 B)
Download all attachments

2012-11-02 09:13:54

by Felipe Balbi

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the usb tree

Hi,

On Fri, Nov 02, 2012 at 03:08:28PM +1100, Stephen Rothwell wrote:
> Hi Greg,
>
> After merging the usb tree, today's linux-next build (x86_64 allmodconfig)
> produced this warning:
>
> WARNING: drivers/usb/host/ehci-hcd: 'ehci_init_driver' exported twice. Previous export was in drivers/usb/chipidea/ci_hdrc.ko
> WARNING: drivers/usb/host/ehci-hcd: 'ehci_resume' exported twice. Previous export was in drivers/usb/chipidea/ci_hdrc.ko
> WARNING: drivers/usb/host/ehci-hcd: 'ehci_suspend' exported twice. Previous export was in drivers/usb/chipidea/ci_hdrc.ko
> WARNING: drivers/usb/host/ehci-hcd: 'ehci_setup' exported twice. Previous export was in drivers/usb/chipidea/ci_hdrc.ko
>
> Introduced by commit 3e0232039967 ("USB: EHCI: prepare to make ehci-hcd a
> library module").

Alex, why on earth is chipidea exporting symbols it doesn't own ?

--
balbi


Attachments:
(No filename) (864.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments

2012-11-02 14:19:01

by Alan Stern

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the usb tree

On Fri, 2 Nov 2012, Felipe Balbi wrote:

> Hi,
>
> On Fri, Nov 02, 2012 at 03:08:28PM +1100, Stephen Rothwell wrote:
> > Hi Greg,
> >
> > After merging the usb tree, today's linux-next build (x86_64 allmodconfig)
> > produced this warning:
> >
> > WARNING: drivers/usb/host/ehci-hcd: 'ehci_init_driver' exported twice. Previous export was in drivers/usb/chipidea/ci_hdrc.ko
> > WARNING: drivers/usb/host/ehci-hcd: 'ehci_resume' exported twice. Previous export was in drivers/usb/chipidea/ci_hdrc.ko
> > WARNING: drivers/usb/host/ehci-hcd: 'ehci_suspend' exported twice. Previous export was in drivers/usb/chipidea/ci_hdrc.ko
> > WARNING: drivers/usb/host/ehci-hcd: 'ehci_setup' exported twice. Previous export was in drivers/usb/chipidea/ci_hdrc.ko
> >
> > Introduced by commit 3e0232039967 ("USB: EHCI: prepare to make ehci-hcd a
> > library module").
>
> Alex, why on earth is chipidea exporting symbols it doesn't own ?

That's at least partly my fault. ehci-hcd.c now exports four symbols
that it didn't before. Since the ChipIdea driver does

#include "../host/ehci-hcd.c"

it now exports them too, unintentionally. A quick band-aid fix would
be to protect those functions with

#ifndef CHIPIDEA_EHCI

but the real fix is the patch I posted yesterday -- assuming it works
right. If we don't hear back from Alex soon, I will post the band-aid
fix as a temporary stop-gap.

Alan Stern