diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-04-30 09:00:32 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-10-04 10:59:51 -0400 |
commit | 9e0e4e11623e57c0f6635f5dc6972244ce511f77 (patch) | |
tree | 695428b6b4f70457aad8e6cf5aa8fd02d6f48aa8 /arch/arm/mach-at91 | |
parent | ac09281a026aad1fe489419bc948ba88b910e242 (diff) |
ARM: at91: unused variable in at91_pm_verify_clocks
The code using the variable 'i' in this function is conditional which
results in a harmless compiler warning. Using the IS_ENABLED macro
instead of #ifdef makes the code look nicer and gets rid of the
warning.
Without this patch, building at91sam9263_defconfig results in:
/home/arnd/linux-arm/arch/arm/mach-at91/pm.c: In function 'at91_pm_verify_clocks':
/home/arnd/linux-arm/arch/arm/mach-at91/pm.c:137:6: warning: unused variable 'i' [-Wunused-variable]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Diffstat (limited to 'arch/arm/mach-at91')
-rw-r--r-- | arch/arm/mach-at91/pm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index 2c2d86505a54..5315f05896e9 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c | |||
@@ -153,7 +153,9 @@ static int at91_pm_verify_clocks(void) | |||
153 | } | 153 | } |
154 | } | 154 | } |
155 | 155 | ||
156 | #ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS | 156 | if (!IS_ENABLED(CONFIG_AT91_PROGRAMMABLE_CLOCKS)) |
157 | return 1; | ||
158 | |||
157 | /* PCK0..PCK3 must be disabled, or configured to use clk32k */ | 159 | /* PCK0..PCK3 must be disabled, or configured to use clk32k */ |
158 | for (i = 0; i < 4; i++) { | 160 | for (i = 0; i < 4; i++) { |
159 | u32 css; | 161 | u32 css; |
@@ -167,7 +169,6 @@ static int at91_pm_verify_clocks(void) | |||
167 | return 0; | 169 | return 0; |
168 | } | 170 | } |
169 | } | 171 | } |
170 | #endif | ||
171 | 172 | ||
172 | return 1; | 173 | return 1; |
173 | } | 174 | } |