RE: [balbi-usb:next 38/65] (.text+0x0): multiple definition of `of_usb_get_dr_mode_by_phy'

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

 



Hi,

David Laight <David.Laight@xxxxxxxxxx> writes:
> From: Bin Liu
>> Sent: 17 December 2015 15:55
> ...
>> >>     drivers/usb/common/built-in.o: In function `of_usb_get_dr_mode_by_phy':
>> >>>> (.text+0x0): multiple definition of `of_usb_get_dr_mode_by_phy'
>> >>     drivers/usb/chipidea/built-in.o:(.text+0xd61): first defined here
>> >
>> >
>> > seems like a false positive to me. There's only one definition of
>> > of_usb_get_dr_mode_by_phy(). Oh no, wait. Bin missed a static inline.
>> >
>> > diff --git a/include/linux/usb/of.h b/include/linux/usb/of.h
>> > index 3805757dcdc2..974bce93aa28 100644
>> > --- a/include/linux/usb/of.h
>> > +++ b/include/linux/usb/of.h
>> > @@ -17,7 +17,8 @@ bool of_usb_host_tpl_support(struct device_node *np);
>> >   int of_usb_update_otg_caps(struct device_node *np,
>> >   			struct usb_otg_caps *otg_caps);
>> >   #else
>> > -enum usb_dr_mode of_usb_get_dr_mode_by_phy(struct device_node *phy_np)
>> > +static inline enum usb_dr_mode
>> > +of_usb_get_dr_mode_by_phy(struct device_node *phy_np)
>> >   {
>> >   	return USB_DR_MODE_UNKNOWN;
>> >   }
>> >
>> > I'll apply this to my 'next'.
>> >
>> 
>> Thanks for fixing it.
>
> Having static and non-static functions with the same name in
> different drivers seems like a recipe for disaster just waiting to happen.
>
> If nothing else it makes grepping the source tree more painful.

huh ? There's no static vs non-static crap. Just the stub for when OF is
disabled missed a static inline, that's all.

-- 
balbi

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux