This patch adds a Kconfig dependency on an ARCH_VEXPRESS(it is for both ARM and ARM64) or ARCH_VEXPRESS_CA9X being available before VEXPRESS_CONFIG can be enabled. Without this patch,build system can lead to issues. This was discovered during randconfig testing, in which VEXPRESS_CONFIG was enabled w/o ARCH_VEXPRESS or VEXPRESS_CONFIG 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 manjunath.goudar@linaro.org Cc: Arnd Bergmann arnd@arndb.de Cc: Deepak Saxena dsaxena@linaro.org Cc: Samuel Ortiz sameo@linux.intel.com Cc: Lee Jones lee.jones@linaro.org --- drivers/mfd/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 633ee43..c9202f6 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -1174,7 +1174,7 @@ endmenu
config VEXPRESS_CONFIG bool "ARM Versatile Express platform infrastructure" - depends on ARM || ARM64 + depends on ARCH_VEXPRESS || ARCH_VEXPRESS_CA9X4 help Platform configuration infrastructure for the ARM Ltd. Versatile Express.
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 manjunath.goudar@linaro.org Cc: Arnd Bergmann arnd@arndb.de Cc: Pawel Moll pawel.moll@arm.com Cc: Deepak Saxena dsaxena@linaro.org Cc: Samuel Ortiz sameo@linux.intel.com Cc: Lee Jones lee.jones@linaro.org
V2: -Made of_find_node_by_phandle() and of_get_next_parent() function declaration dependence on"#ifdef CONFIG_OF" in "include/linux/of.h" instead of Kconfig dependence setting in V1 patch and else part return inline dummy implementations (returning NULL) to fix the above randconfig error. --- include/linux/of.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/include/linux/of.h b/include/linux/of.h index 90a8811..4be252a 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -196,10 +196,22 @@ static inline struct device_node *of_find_matching_node( #define for_each_matching_node_and_match(dn, matches, match) \ for (dn = of_find_matching_node_and_match(NULL, matches, match); \ dn; dn = of_find_matching_node_and_match(dn, matches, match)) -extern struct device_node *of_find_node_by_path(const char *path); + +#ifdef CONFIG_OF extern struct device_node *of_find_node_by_phandle(phandle handle); -extern struct device_node *of_get_parent(const struct device_node *node); extern struct device_node *of_get_next_parent(struct device_node *node); +#else +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; +} +#endif +extern struct device_node *of_find_node_by_path(const char *path); +extern struct device_node *of_get_parent(const struct device_node *node); extern struct device_node *of_get_next_child(const struct device_node *node, struct device_node *prev); extern struct device_node *of_get_next_available_child(
On Mon, 2013-08-12 at 13:55 +0100, Manjunath 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:
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 manjunath.goudar@linaro.org Cc: Arnd Bergmann arnd@arndb.de Cc: Pawel Moll pawel.moll@arm.com Cc: Deepak Saxena dsaxena@linaro.org Cc: Samuel Ortiz sameo@linux.intel.com Cc: Lee Jones lee.jones@linaro.org
V2: -Made of_find_node_by_phandle() and of_get_next_parent() function declaration dependence on"#ifdef CONFIG_OF" in "include/linux/of.h" instead of Kconfig dependence setting in V1 patch and else part return inline dummy implementations (returning NULL) to fix the above randconfig error.
include/linux/of.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-)
It's all cool, but the subject line doesn't make any sense now, does it? ;-) As in: it's not a vexpress- nor mfd-related patch any more.
Pawel
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 manjunath.goudar@linaro.org Cc: Arnd Bergmann arnd@arndb.de Cc: Pawel Moll pawel.moll@arm.com Cc: Deepak Saxena dsaxena@linaro.org Cc: Samuel Ortiz sameo@linux.intel.com Cc: Lee Jones lee.jones@linaro.org
V2: -Made of_find_node_by_phandle() and of_get_next_parent() function declaration dependence on"#ifdef CONFIG_OF" in "include/linux/of.h" instead of Kconfig dependence setting in V1 patch and else part return inline dummy implementations (returning NULL) to fix the above randconfig error. --- include/linux/of.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/include/linux/of.h b/include/linux/of.h index 90a8811..4be252a 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -196,10 +196,22 @@ static inline struct device_node *of_find_matching_node( #define for_each_matching_node_and_match(dn, matches, match) \ for (dn = of_find_matching_node_and_match(NULL, matches, match); \ dn; dn = of_find_matching_node_and_match(dn, matches, match)) -extern struct device_node *of_find_node_by_path(const char *path); + +#ifdef CONFIG_OF extern struct device_node *of_find_node_by_phandle(phandle handle); -extern struct device_node *of_get_parent(const struct device_node *node); extern struct device_node *of_get_next_parent(struct device_node *node); +#else +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; +} +#endif +extern struct device_node *of_find_node_by_path(const char *path); +extern struct device_node *of_get_parent(const struct device_node *node); extern struct device_node *of_get_next_child(const struct device_node *node, struct device_node *prev); extern struct device_node *of_get_next_available_child(
linaro-kernel@lists.linaro.org