Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1421772 > unrolled thread

Re: [PATCH] USB: core: fix missing include <linux/usb/of.h>

Started byArnd Bergmann <arnd@arndb.de>
First post2016-06-14 13:10 +0200
Last post2016-06-17 03:40 +0200
Articles 5 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] USB: core: fix missing include <linux/usb/of.h> Arnd Bergmann <arnd@arndb.de> - 2016-06-14 13:10 +0200
    Re: [PATCH] USB: core: fix missing include <linux/usb/of.h> Peter Chen <hzpeterchen@gmail.com> - 2016-06-15 05:00 +0200
      Re: [PATCH] USB: core: fix missing include <linux/usb/of.h> Ben Dooks <ben.dooks@codethink.co.uk> - 2016-06-16 14:50 +0200
    Re: [PATCH] USB: core: fix missing include <linux/usb/of.h> Ben Dooks <ben.dooks@codethink.co.uk> - 2016-06-16 15:10 +0200
      Re: [PATCH] USB: core: fix missing include <linux/usb/of.h> Peter Chen <hzpeterchen@gmail.com> - 2016-06-17 03:40 +0200

#1421772 — Re: [PATCH] USB: core: fix missing include <linux/usb/of.h>

FromArnd Bergmann <arnd@arndb.de>
Date2016-06-14 13:10 +0200
SubjectRe: [PATCH] USB: core: fix missing include <linux/usb/of.h>
Message-ID<rJUoi-41y-9@gated-at.bofh.it>
On Wednesday, June 8, 2016 3:04:27 AM CEST kbuild test robot wrote:
> >> drivers/usb/core/of.c:32:21: error: redefinition of 'usb_of_get_child_node'
>     struct device_node *usb_of_get_child_node(struct device_node *parent,
>                         ^~~~~~~~~~~~~~~~~~~~~
>    In file included from drivers/usb/core/of.c:21:0:
>    include/linux/usb/of.h:36:35: note: previous definition of 'usb_of_get_child_node' was here
>     static inline struct device_node *usb_of_get_child_node
>                                       ^~~~~~~~~~~~~~~~~~~~~
> 
> vim +/usb_of_get_child_node +32 drivers/usb/core/of.c
> 
> 69bec725 Peter Chen 2016-02-19  26   * @portnum: the port number which device is connecting
> 69bec725 Peter Chen 2016-02-19  27   *
> 69bec725 Peter Chen 2016-02-19  28   * Find the node from device tree according to its port number.
> 69bec725 Peter Chen 2016-02-19  29   *
> 69bec725 Peter Chen 2016-02-19  30   * Return: On success, a pointer to the device node, %NULL on failure.
> 69bec725 Peter Chen 2016-02-19  31   */
> 69bec725 Peter Chen 2016-02-19 @32  struct device_node *usb_of_get_child_node(struct device_node *parent,
> 69bec725 Peter Chen 2016-02-19  33                                      int portnum)
> 69bec725 Peter Chen 2016-02-19  34  {
> 69bec725 Peter Chen 2016-02-19  35      struct device_node *node;
> 
> 

I think what we want here is to make the compilation of of.o conditional on
CONFIG_OF, so we get only one of the two definitions.

	Arnd

[toc] | [next] | [standalone]


#1422521

FromPeter Chen <hzpeterchen@gmail.com>
Date2016-06-15 05:00 +0200
Message-ID<rK9dE-55g-3@gated-at.bofh.it>
In reply to#1421772
On Tue, Jun 14, 2016 at 01:08:08PM +0200, Arnd Bergmann wrote:
> On Wednesday, June 8, 2016 3:04:27 AM CEST kbuild test robot wrote:
> > >> drivers/usb/core/of.c:32:21: error: redefinition of 'usb_of_get_child_node'
> >     struct device_node *usb_of_get_child_node(struct device_node *parent,
> >                         ^~~~~~~~~~~~~~~~~~~~~
> >    In file included from drivers/usb/core/of.c:21:0:
> >    include/linux/usb/of.h:36:35: note: previous definition of 'usb_of_get_child_node' was here
> >     static inline struct device_node *usb_of_get_child_node
> >                                       ^~~~~~~~~~~~~~~~~~~~~
> > 
> > vim +/usb_of_get_child_node +32 drivers/usb/core/of.c
> > 
> > 69bec725 Peter Chen 2016-02-19  26   * @portnum: the port number which device is connecting
> > 69bec725 Peter Chen 2016-02-19  27   *
> > 69bec725 Peter Chen 2016-02-19  28   * Find the node from device tree according to its port number.
> > 69bec725 Peter Chen 2016-02-19  29   *
> > 69bec725 Peter Chen 2016-02-19  30   * Return: On success, a pointer to the device node, %NULL on failure.
> > 69bec725 Peter Chen 2016-02-19  31   */
> > 69bec725 Peter Chen 2016-02-19 @32  struct device_node *usb_of_get_child_node(struct device_node *parent,
> > 69bec725 Peter Chen 2016-02-19  33                                      int portnum)
> > 69bec725 Peter Chen 2016-02-19  34  {
> > 69bec725 Peter Chen 2016-02-19  35      struct device_node *node;
> > 
> > 
> 
> I think what we want here is to make the compilation of of.o conditional on
> CONFIG_OF, so we get only one of the two definitions.
> 
> 	Arnd

Thanks, Arnd. It is the correct solution, I will send patch soon.

-- 

Best Regards,
Peter Chen

[toc] | [prev] | [next] | [standalone]


#1424020

FromBen Dooks <ben.dooks@codethink.co.uk>
Date2016-06-16 14:50 +0200
Message-ID<rKEUa-8qv-15@gated-at.bofh.it>
In reply to#1422521
On 15/06/16 03:43, Peter Chen wrote:
> On Tue, Jun 14, 2016 at 01:08:08PM +0200, Arnd Bergmann wrote:
>> On Wednesday, June 8, 2016 3:04:27 AM CEST kbuild test robot wrote:
>>>>> drivers/usb/core/of.c:32:21: error: redefinition of 'usb_of_get_child_node'
>>>     struct device_node *usb_of_get_child_node(struct device_node *parent,
>>>                         ^~~~~~~~~~~~~~~~~~~~~
>>>    In file included from drivers/usb/core/of.c:21:0:
>>>    include/linux/usb/of.h:36:35: note: previous definition of 'usb_of_get_child_node' was here
>>>     static inline struct device_node *usb_of_get_child_node
>>>                                       ^~~~~~~~~~~~~~~~~~~~~
>>>
>>> vim +/usb_of_get_child_node +32 drivers/usb/core/of.c
>>>
>>> 69bec725 Peter Chen 2016-02-19  26   * @portnum: the port number which device is connecting
>>> 69bec725 Peter Chen 2016-02-19  27   *
>>> 69bec725 Peter Chen 2016-02-19  28   * Find the node from device tree according to its port number.
>>> 69bec725 Peter Chen 2016-02-19  29   *
>>> 69bec725 Peter Chen 2016-02-19  30   * Return: On success, a pointer to the device node, %NULL on failure.
>>> 69bec725 Peter Chen 2016-02-19  31   */
>>> 69bec725 Peter Chen 2016-02-19 @32  struct device_node *usb_of_get_child_node(struct device_node *parent,
>>> 69bec725 Peter Chen 2016-02-19  33                                      int portnum)
>>> 69bec725 Peter Chen 2016-02-19  34  {
>>> 69bec725 Peter Chen 2016-02-19  35      struct device_node *node;
>>>
>>>
>>
>> I think what we want here is to make the compilation of of.o conditional on
>> CONFIG_OF, so we get only one of the two definitions.
>>
>> 	Arnd
> 
> Thanks, Arnd. It is the correct solution, I will send patch soon.

Aha, I didn't think of that. Thanks.


-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

[toc] | [prev] | [next] | [standalone]


#1424039

FromBen Dooks <ben.dooks@codethink.co.uk>
Date2016-06-16 15:10 +0200
Message-ID<rKFdw-lG-31@gated-at.bofh.it>
In reply to#1421772
On 14/06/16 12:08, Arnd Bergmann wrote:
> On Wednesday, June 8, 2016 3:04:27 AM CEST kbuild test robot wrote:
>>>> drivers/usb/core/of.c:32:21: error: redefinition of 'usb_of_get_child_node'
>>     struct device_node *usb_of_get_child_node(struct device_node *parent,
>>                         ^~~~~~~~~~~~~~~~~~~~~
>>    In file included from drivers/usb/core/of.c:21:0:
>>    include/linux/usb/of.h:36:35: note: previous definition of 'usb_of_get_child_node' was here
>>     static inline struct device_node *usb_of_get_child_node
>>                                       ^~~~~~~~~~~~~~~~~~~~~
>>
>> vim +/usb_of_get_child_node +32 drivers/usb/core/of.c
>>
>> 69bec725 Peter Chen 2016-02-19  26   * @portnum: the port number which device is connecting
>> 69bec725 Peter Chen 2016-02-19  27   *
>> 69bec725 Peter Chen 2016-02-19  28   * Find the node from device tree according to its port number.
>> 69bec725 Peter Chen 2016-02-19  29   *
>> 69bec725 Peter Chen 2016-02-19  30   * Return: On success, a pointer to the device node, %NULL on failure.
>> 69bec725 Peter Chen 2016-02-19  31   */
>> 69bec725 Peter Chen 2016-02-19 @32  struct device_node *usb_of_get_child_node(struct device_node *parent,
>> 69bec725 Peter Chen 2016-02-19  33                                      int portnum)
>> 69bec725 Peter Chen 2016-02-19  34  {
>> 69bec725 Peter Chen 2016-02-19  35      struct device_node *node;
>>
>>
> 
> I think what we want here is to make the compilation of of.o conditional on
> CONFIG_OF, so we get only one of the two definitions.

Ah, so make the of.o conditional, and also apply my patch for when
it is compiled.

Should I submit one for that, or is someone else on the case?

-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

[toc] | [prev] | [next] | [standalone]


#1424591

FromPeter Chen <hzpeterchen@gmail.com>
Date2016-06-17 03:40 +0200
Message-ID<rKQVk-8e5-9@gated-at.bofh.it>
In reply to#1424039
On Thu, Jun 16, 2016 at 02:02:37PM +0100, Ben Dooks wrote:
> On 14/06/16 12:08, Arnd Bergmann wrote:
> > On Wednesday, June 8, 2016 3:04:27 AM CEST kbuild test robot wrote:
> >>>> drivers/usb/core/of.c:32:21: error: redefinition of 'usb_of_get_child_node'
> >>     struct device_node *usb_of_get_child_node(struct device_node *parent,
> >>                         ^~~~~~~~~~~~~~~~~~~~~
> >>    In file included from drivers/usb/core/of.c:21:0:
> >>    include/linux/usb/of.h:36:35: note: previous definition of 'usb_of_get_child_node' was here
> >>     static inline struct device_node *usb_of_get_child_node
> >>                                       ^~~~~~~~~~~~~~~~~~~~~
> >>
> >> vim +/usb_of_get_child_node +32 drivers/usb/core/of.c
> >>
> >> 69bec725 Peter Chen 2016-02-19  26   * @portnum: the port number which device is connecting
> >> 69bec725 Peter Chen 2016-02-19  27   *
> >> 69bec725 Peter Chen 2016-02-19  28   * Find the node from device tree according to its port number.
> >> 69bec725 Peter Chen 2016-02-19  29   *
> >> 69bec725 Peter Chen 2016-02-19  30   * Return: On success, a pointer to the device node, %NULL on failure.
> >> 69bec725 Peter Chen 2016-02-19  31   */
> >> 69bec725 Peter Chen 2016-02-19 @32  struct device_node *usb_of_get_child_node(struct device_node *parent,
> >> 69bec725 Peter Chen 2016-02-19  33                                      int portnum)
> >> 69bec725 Peter Chen 2016-02-19  34  {
> >> 69bec725 Peter Chen 2016-02-19  35      struct device_node *node;
> >>
> >>
> > 
> > I think what we want here is to make the compilation of of.o conditional on
> > CONFIG_OF, so we get only one of the two definitions.
> 
> Ah, so make the of.o conditional, and also apply my patch for when
> it is compiled.
> 
> Should I submit one for that, or is someone else on the case?
> 

Yes, Ben. I have already done it.

http://www.spinics.net/lists/linux-usb/msg142676.html

-- 

Best Regards,
Peter Chen

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web