linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] usb: core: of.c: fix defined but not declare warning
@ 2016-06-15  3:25 Peter Chen
  2016-07-07  9:19 ` Peter Chen
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Chen @ 2016-06-15  3:25 UTC (permalink / raw)
  To: stern, gregkh
  Cc: linux-usb, Peter Chen, Arnd Bergmann, linux-kernel, Ben Dooks,
	linux-kernel

The helper usb_of_get_child_node is defined at of.c, but missing its
declare as a global function. Fix it by adding related header file
as well as compile it on conditional of CONFIG_OF.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Ben Dooks <ben.dooks@codethink.co.uk>
Cc: linux-kernel@lists.codethink.co.uk

Signed-off-by: Peter Chen <peter.chen@nxp.com>
Reported-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
 drivers/usb/core/Makefile | 3 ++-
 drivers/usb/core/of.c     | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/core/Makefile b/drivers/usb/core/Makefile
index 9780877..da36b78 100644
--- a/drivers/usb/core/Makefile
+++ b/drivers/usb/core/Makefile
@@ -5,8 +5,9 @@
 usbcore-y := usb.o hub.o hcd.o urb.o message.o driver.o
 usbcore-y += config.o file.o buffer.o sysfs.o endpoint.o
 usbcore-y += devio.o notify.o generic.o quirks.o devices.o
-usbcore-y += port.o of.o
+usbcore-y += port.o
 
+usbcore-$(CONFIG_OF)		+= of.o
 usbcore-$(CONFIG_PCI)		+= hcd-pci.o
 usbcore-$(CONFIG_ACPI)		+= usb-acpi.o
 
diff --git a/drivers/usb/core/of.c b/drivers/usb/core/of.c
index 2289700..3de4f88 100644
--- a/drivers/usb/core/of.c
+++ b/drivers/usb/core/of.c
@@ -18,6 +18,7 @@
  */
 
 #include <linux/of.h>
+#include <linux/usb/of.h>
 
 /**
  * usb_of_get_child_node - Find the device node match port number
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] usb: core: of.c: fix defined but not declare warning
  2016-06-15  3:25 [PATCH 1/1] usb: core: of.c: fix defined but not declare warning Peter Chen
@ 2016-07-07  9:19 ` Peter Chen
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Chen @ 2016-07-07  9:19 UTC (permalink / raw)
  To: Peter Chen, gregkh
  Cc: stern, linux-usb, Arnd Bergmann, linux-kernel, Ben Dooks, linux-kernel

On Wed, Jun 15, 2016 at 11:25:43AM +0800, Peter Chen wrote:
> The helper usb_of_get_child_node is defined at of.c, but missing its
> declare as a global function. Fix it by adding related header file
> as well as compile it on conditional of CONFIG_OF.
> 
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Alan Stern <stern@rowland.harvard.edu>
> Cc: linux-usb@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Cc: Ben Dooks <ben.dooks@codethink.co.uk>
> Cc: linux-kernel@lists.codethink.co.uk
> 
> Signed-off-by: Peter Chen <peter.chen@nxp.com>
> Reported-by: Ben Dooks <ben.dooks@codethink.co.uk>
> ---
>  drivers/usb/core/Makefile | 3 ++-
>  drivers/usb/core/of.c     | 1 +
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/core/Makefile b/drivers/usb/core/Makefile
> index 9780877..da36b78 100644
> --- a/drivers/usb/core/Makefile
> +++ b/drivers/usb/core/Makefile
> @@ -5,8 +5,9 @@
>  usbcore-y := usb.o hub.o hcd.o urb.o message.o driver.o
>  usbcore-y += config.o file.o buffer.o sysfs.o endpoint.o
>  usbcore-y += devio.o notify.o generic.o quirks.o devices.o
> -usbcore-y += port.o of.o
> +usbcore-y += port.o
>  
> +usbcore-$(CONFIG_OF)		+= of.o
>  usbcore-$(CONFIG_PCI)		+= hcd-pci.o
>  usbcore-$(CONFIG_ACPI)		+= usb-acpi.o
>  
> diff --git a/drivers/usb/core/of.c b/drivers/usb/core/of.c
> index 2289700..3de4f88 100644
> --- a/drivers/usb/core/of.c
> +++ b/drivers/usb/core/of.c
> @@ -18,6 +18,7 @@
>   */
>  
>  #include <linux/of.h>
> +#include <linux/usb/of.h>
>  

ping...

-- 

Best Regards,
Peter Chen

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-07-07  9:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-15  3:25 [PATCH 1/1] usb: core: of.c: fix defined but not declare warning Peter Chen
2016-07-07  9:19 ` Peter Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).