OSDN Git Service

ARM: mv78xx0: avoid unused function warning
authorArnd Bergmann <arnd@arndb.de>
Tue, 23 Feb 2016 14:06:38 +0000 (15:06 +0100)
committerGregory CLEMENT <gregory.clement@free-electrons.com>
Thu, 25 Feb 2016 14:38:38 +0000 (15:38 +0100)
mv78xx0 produces a harmless warning when CONFIG_CACHE_FEROCEON_L2 is
disabled:

arch/arm/mach-mv78xx0/common.c:385:19: warning: 'is_l2_writethrough' defined but not used [-Wunused-function]

This avoids the warning by changing the #ifdef to an if(IS_ENABLED())
check with the same resulting object code.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
arch/arm/mach-mv78xx0/common.c

index a1a04df..99cc939 100644 (file)
@@ -405,9 +405,8 @@ void __init mv78xx0_init(void)
        printk("HCLK = %dMHz, ", (hclk + 499999) / 1000000);
        printk("TCLK = %dMHz\n", (get_tclk() + 499999) / 1000000);
 
-#ifdef CONFIG_CACHE_FEROCEON_L2
-       feroceon_l2_init(is_l2_writethrough());
-#endif
+       if (IS_ENABLED(CONFIG_CACHE_FEROCEON_L2))
+               feroceon_l2_init(is_l2_writethrough());
 
        /* Setup root of clk tree */
        clk_init();