提交 202fbf48 编写于 作者: A Arnd Bergmann 提交者: Rob Herring

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: 39a751a4 ("of: change overlay apply input data from unflattened to FDT")
Signed-off-by: NArnd Bergmann <arnd@arndb.de>
Signed-off-by: NRob Herring <robh@kernel.org>
上级 d4b9e425
......@@ -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)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册