devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] ARM: CCI : Fix implicit declaration of function error
@ 2013-10-17 12:12 Dave Martin
  2013-11-21 12:56 ` Grant Likely
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Martin @ 2013-10-17 12:12 UTC (permalink / raw)
  To: Majunath Goudar
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Majunath Goudar,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Grant Likely,
	nataraja.km-Hm3cg6mZ9cc

On Mon, Oct 14, 2013 at 03:52:27PM +0530, Majunath Goudar wrote:
> This patch adds a inline dummy implementations of_find_matching_node()
> in "#ifdef CONFIG_OF" else part. Without this patch,build system can
> lead to issues. This was discovered during randconfig testing,in which
> ARM_CCI was enabled w/o CONFIG_OF being enabled,leading to the following error:

Without fetching config info from the DT, the CCI driver is not usable,
so it makes no sense to build this driver without CONFIG_OF.

Your previous patch [1] looked sensible, but I don't see any responses
on lakml.  Are you still pursuing that patch, or is this patch intended
as a replacement?


Dummy functions for things like of_find_matching_node() might be useful
for drivers that can fall back to other config mechanisms if OF is
unavailable, but that is a separate discussion.

arm-cci is not such a driver, and any such drivers that exist toady
must be coping without the dummy OF functions.

Cheers
---Dave

[1]  http://lists.infradead.org/pipermail/linux-arm-kernel/2013-October/202996.html
([PATCH] BUS: CCI : Fix arm-cci implicit declarations dependence errors.)

> 
> CC      drivers/bus/arm-cci.o
> drivers/bus/arm-cci.c: In function ‘cci_probe’:
> drivers/bus/arm-cci.c:971:2: error: implicit declaration of function
> ‘of_find_matching_node’ [-Werror=implicit-function-declaration]
> cc1: some warnings being treated as errors
> make[2]: *** [drivers/bus/arm-cci.o] Error 1
> make[1]: *** [drivers/bus] Error 2
> make: *** [drivers] Error 2
> 
> Signed-off-by: Manjunath Goudar <manju.goudar-Hm3cg6mZ9cc@public.gmane.org>
> Cc: Grant Likely <grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> Cc: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> ---
>  include/linux/of.h |    7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/include/linux/of.h b/include/linux/of.h
> index f95aee3..2c57aa2 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -340,6 +340,13 @@ int of_device_is_stdout_path(struct device_node *dn);
>  
>  #else /* CONFIG_OF */
>  
> +static inline struct device_node *of_find_matching_node(
> +	struct device_node *from,
> +	const struct of_device_id *matches)
> +{
> +	return NULL;
> +}
> +
>  static inline const char* of_node_full_name(struct device_node *np)
>  {
>  	return "<no-node>";
> -- 
> 1.7.9.5
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
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] ARM: CCI : Fix implicit declaration of function error
@ 2013-10-14 10:22 Majunath Goudar
  0 siblings, 0 replies; 3+ messages in thread
From: Majunath Goudar @ 2013-10-14 10:22 UTC (permalink / raw)
  To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: nataraja.km-Hm3cg6mZ9cc, Majunath Goudar, Grant Likely,
	Rob Herring, devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

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

CC      drivers/bus/arm-cci.o
drivers/bus/arm-cci.c: In function ‘cci_probe’:
drivers/bus/arm-cci.c:971:2: error: implicit declaration of function
‘of_find_matching_node’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[2]: *** [drivers/bus/arm-cci.o] Error 1
make[1]: *** [drivers/bus] Error 2
make: *** [drivers] Error 2

Signed-off-by: Manjunath Goudar <manju.goudar-Hm3cg6mZ9cc@public.gmane.org>
Cc: Grant Likely <grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
---
 include/linux/of.h |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/include/linux/of.h b/include/linux/of.h
index f95aee3..2c57aa2 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -340,6 +340,13 @@ int of_device_is_stdout_path(struct device_node *dn);
 
 #else /* CONFIG_OF */
 
+static inline struct device_node *of_find_matching_node(
+	struct device_node *from,
+	const struct of_device_id *matches)
+{
+	return NULL;
+}
+
 static inline const char* of_node_full_name(struct device_node *np)
 {
 	return "<no-node>";
-- 
1.7.9.5

--
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 related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-11-21 12:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-17 12:12 [PATCH] ARM: CCI : Fix implicit declaration of function error Dave Martin
2013-11-21 12:56 ` Grant Likely
  -- strict thread matches above, loose matches on Subject: below --
2013-10-14 10:22 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).