From: Arnd Bergmann Date: Tue, 13 Mar 2018 13:15:42 +0000 (+0100) Subject: of: unittest: move misplaced function declaration X-Git-Tag: v4.19~1284^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=202fbf4865e97b64ca2d94b7dc1a4efd6f7b0729;p=platform%2Fkernel%2Flinux-rpi3.git of: unittest: move misplaced function declaration 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 Signed-off-by: Rob Herring --- diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index df93149..a08c9e2 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; @@ -1192,6 +1190,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) {