devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] VEXPRESS: Fix VEXPRESS implicit declarations dependence errors.
@ 2013-10-08 10:41 Majunath Goudar
       [not found] ` <1381228895-24814-1-git-send-email-csmanjuvijay-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2013-10-08 14:51 ` Majunath Goudar
  0 siblings, 2 replies; 3+ messages in thread
From: Majunath Goudar @ 2013-10-08 10:41 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: nataraja.km, Majunath Goudar, Grant Likely, Rob Herring,
	Pawel Moll, Samuel Ortiz, Lee Jones, devicetree, linux-kernel

This patch adds a of_find_node_by_phandle() and of_get_next_parent()
function declaration dependence on"#ifdef CONFIG_OF" in "include/linux/of.h"
else part return inline dummy implementations (returning NULL). Without
this patch,build system can lead to issues. This was discovered during
randconfig testing,in which VEXPRESS_CONFIG was enabled w/o CONFIG_OF
being enabled,leading to the following error:

CC      drivers/mfd/vexpress-config.o
drivers/mfd/vexpress-config.c: In function ‘__vexpress_config_func_get’:
drivers/mfd/vexpress-config.c:117:4: error: implicit declaration of function
‘of_find_node_by_phandle’ [-Werror=implicit-function-declaration]
    bridge_node = of_find_node_by_phandle(
    ^
drivers/mfd/vexpress-config.c:117:16: warning: assignment makes pointer from
integer without a cast [enabled by default]
    bridge_node = of_find_node_by_phandle(

Signed-off-by: Manjunath Goudar <csmanjuvijay@gmail.com>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 include/linux/of.h |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/include/linux/of.h b/include/linux/of.h
index f95aee3..968787d 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -340,6 +340,15 @@ int of_device_is_stdout_path(struct device_node *dn);
 
 #else /* CONFIG_OF */
 
+static inline struct device_node *of_find_node_by_phandle(phandle handle)
+{
+	return NULL;
+}
+static inline struct device_node *of_get_next_parent(struct device_node *node)
+{
+	return NULL;
+}
+
 static inline const char* of_node_full_name(struct device_node *np)
 {
 	return "<no-node>";
-- 
1.7.9.5

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

* Re: [PATCH] VEXPRESS: Fix VEXPRESS implicit declarations dependence errors.
       [not found] ` <1381228895-24814-1-git-send-email-csmanjuvijay-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2013-10-08 13:07   ` Rob Herring
  0 siblings, 0 replies; 3+ messages in thread
From: Rob Herring @ 2013-10-08 13:07 UTC (permalink / raw)
  To: Majunath Goudar
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	nataraja.km-Hm3cg6mZ9cc, Grant Likely, Pawel Moll, Samuel Ortiz,
	Lee Jones, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On 10/08/2013 05:41 AM, Majunath Goudar wrote:
> This patch adds a of_find_node_by_phandle() and of_get_next_parent()
> function declaration dependence on"#ifdef CONFIG_OF" in "include/linux/of.h"
> else part return inline dummy implementations (returning NULL). Without
> this patch,build system can lead to issues. This was discovered during
> randconfig testing,in which VEXPRESS_CONFIG was enabled w/o CONFIG_OF
> being enabled,leading to the following error:

What is blocking making VExpress DT only?

The subject should reflect the subsystem you are changing and the
description is missing spaces at a minimum.

Rob

> 
> CC      drivers/mfd/vexpress-config.o
> drivers/mfd/vexpress-config.c: In function ‘__vexpress_config_func_get’:
> drivers/mfd/vexpress-config.c:117:4: error: implicit declaration of function
> ‘of_find_node_by_phandle’ [-Werror=implicit-function-declaration]
>     bridge_node = of_find_node_by_phandle(
>     ^
> drivers/mfd/vexpress-config.c:117:16: warning: assignment makes pointer from
> integer without a cast [enabled by default]
>     bridge_node = of_find_node_by_phandle(
> 
> Signed-off-by: Manjunath Goudar <csmanjuvijay-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Cc: Grant Likely <grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> Cc: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
> Cc: Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>
> Cc: Samuel Ortiz <sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
> Cc: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> ---
>  include/linux/of.h |    9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/include/linux/of.h b/include/linux/of.h
> index f95aee3..968787d 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -340,6 +340,15 @@ int of_device_is_stdout_path(struct device_node *dn);
>  
>  #else /* CONFIG_OF */
>  
> +static inline struct device_node *of_find_node_by_phandle(phandle handle)
> +{
> +	return NULL;
> +}
> +static inline struct device_node *of_get_next_parent(struct device_node *node)
> +{
> +	return NULL;
> +}
> +
>  static inline const char* of_node_full_name(struct device_node *np)
>  {
>  	return "<no-node>";
> 

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] VEXPRESS: Fix VEXPRESS implicit declarations dependence errors.
  2013-10-08 10:41 [PATCH] VEXPRESS: Fix VEXPRESS implicit declarations dependence errors Majunath Goudar
       [not found] ` <1381228895-24814-1-git-send-email-csmanjuvijay-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2013-10-08 14:51 ` Majunath Goudar
  1 sibling, 0 replies; 3+ messages in thread
From: Majunath Goudar @ 2013-10-08 14:51 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: nataraja.km, Majunath Goudar, Grant Likely, Rob Herring,
	Pawel Moll, Samuel Ortiz, Lee Jones, devicetree, linux-kernel

This patch adds a inline dummy implementations of_find_node_by_phandle()
and of_get_next_parent() in "#ifdef CONFIG_OF" else part. Without
this patch,build system can lead to issues. This was discovered during
randconfig testing,in which VEXPRESS_CONFIG was enabled w/o CONFIG_OF
being enabled,leading to the following error:

CC      drivers/mfd/vexpress-config.o
drivers/mfd/vexpress-config.c: In function ‘__vexpress_config_func_get’:
drivers/mfd/vexpress-config.c:117:4: error: implicit declaration of function
‘of_find_node_by_phandle’ [-Werror=implicit-function-declaration]
    bridge_node = of_find_node_by_phandle(
    ^
drivers/mfd/vexpress-config.c:117:16: warning: assignment makes pointer from
integer without a cast [enabled by default]
    bridge_node = of_find_node_by_phandle(

Signed-off-by: Manjunath Goudar <csmanjuvijay@gmail.com>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 include/linux/of.h |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/include/linux/of.h b/include/linux/of.h
index f95aee3..968787d 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -340,6 +340,15 @@ int of_device_is_stdout_path(struct device_node *dn);
 
 #else /* CONFIG_OF */
 
+static inline struct device_node *of_find_node_by_phandle(phandle handle)
+{
+	return NULL;
+}
+static inline struct device_node *of_get_next_parent(struct device_node *node)
+{
+	return NULL;
+}
+
 static inline const char* of_node_full_name(struct device_node *np)
 {
 	return "<no-node>";
-- 
1.7.9.5

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

end of thread, other threads:[~2013-10-08 14:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-08 10:41 [PATCH] VEXPRESS: Fix VEXPRESS implicit declarations dependence errors Majunath Goudar
     [not found] ` <1381228895-24814-1-git-send-email-csmanjuvijay-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-10-08 13:07   ` Rob Herring
2013-10-08 14:51 ` Majunath Goudar

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).