* [PATCH] of: unittest: move misplaced function declaration
@ 2018-03-13 13:15 Arnd Bergmann
2018-03-18 12:49 ` Rob Herring
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2018-03-13 13:15 UTC (permalink / raw)
To: Rob Herring, Frank Rowand; +Cc: Arnd Bergmann, devicetree, linux-kernel
The overlay_data_apply() declaration is outside of the #ifdef that contains
both the user and the definition, causing a compile-time warning in
some configurations:
drivers/of/unittest.c:48:19: error: 'overlay_data_apply' declared 'static' but never defined [-Werror=unused-function]
static int __init overlay_data_apply(const char *overlay_name, int *overlay_id);
This moves the declaration into the #ifdef section.
Fixes: 39a751a4cb7e ("of: change overlay apply input data from unflattened to FDT")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/of/unittest.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index dede77a79820..260d5245491b 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -45,8 +45,6 @@ static struct unittest_results {
failed; \
})
-static int __init overlay_data_apply(const char *overlay_name, int *overlay_id);
-
static void __init of_unittest_find_node_by_name(void)
{
struct device_node *np;
@@ -1185,6 +1183,7 @@ static int __init unittest_data_add(void)
}
#ifdef CONFIG_OF_OVERLAY
+static int __init overlay_data_apply(const char *overlay_name, int *overlay_id);
static int unittest_probe(struct platform_device *pdev)
{
--
2.9.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] of: unittest: move misplaced function declaration
2018-03-13 13:15 [PATCH] of: unittest: move misplaced function declaration Arnd Bergmann
@ 2018-03-18 12:49 ` Rob Herring
0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2018-03-18 12:49 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: Frank Rowand, devicetree, linux-kernel
On Tue, Mar 13, 2018 at 02:15:42PM +0100, Arnd Bergmann wrote:
> The overlay_data_apply() declaration is outside of the #ifdef that contains
> both the user and the definition, causing a compile-time warning in
> some configurations:
>
> drivers/of/unittest.c:48:19: error: 'overlay_data_apply' declared 'static' but never defined [-Werror=unused-function]
> static int __init overlay_data_apply(const char *overlay_name, int *overlay_id);
>
> This moves the declaration into the #ifdef section.
>
> Fixes: 39a751a4cb7e ("of: change overlay apply input data from unflattened to FDT")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/of/unittest.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-03-18 12:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-13 13:15 [PATCH] of: unittest: move misplaced function declaration Arnd Bergmann
2018-03-18 12:49 ` Rob Herring
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.