ARM: CCI : Fix implicit declaration of function error
Quoted 4 lines · Majunath Goudar
This patch adds a inline dummy implementations
of_find_matching_node()in "#ifdefCONFIG_OF" else part. Without this patch,build system can lead to issues. This was discovered during randconfig testing,in whichARM_CCIwas enabled w/oCONFIG_OFbeing 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.)
Quoted 45 lines
CC
drivers/bus/arm-cci.odrivers/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 2Signed-off-by Manjunath Goudar <[email protected]>Cc Grant Likely <[email protected]>Cc Rob Herring <rob.herring-bsGFqQB8/[email protected]>--- include/linux/of.h | 7 +++++++ 1 file changed, 7 insertions(+)include/linux/of.h +7
-0@@ -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>" ;Signature · 7 lines
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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 8 lines · Dave Martin
Quoted 4 lines · Majunath Goudar
This patch adds a inline dummy implementations
of_find_matching_node()in "#ifdefCONFIG_OF" else part. Without this patch,build system can lead to issues. This was discovered during randconfig testing,in whichARM_CCIwas enabled w/oCONFIG_OFbeing 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.
I agree here, and that is the big reason why I'm resistant to blanket implementation of empty OF related functions. If those functions are called, then most likely the code strongly depends on CONFIG_OF. Leaving the blank ones out catches scenarios like this.
g.