[PATCH] arm: mach-davinci: mark __maybe_unused struct

Brian Norris computersforpeace at gmail.com
Wed Sep 4 14:00:46 EDT 2013


If neither CONFIG_SND_DM365_AIC3X_CODEC nor CONFIG_SND_DM365_VOICE_CODEC
are defined, we may get warnings like:

    arch/arm/mach-davinci/board-dm365-evm.c:179:33: warning: 'dm365_evm_snd_data' defined but not used [-Wunused-variable]

To fix this, just mark the struct as __maybe_unused.

Signed-off-by: Brian Norris <computersforpeace at gmail.com>
Cc: Sekhar Nori <nsekhar at ti.com>
Cc: Kevin Hilman <khilman at deeprootsystems.com>
Cc: Russell King <linux at arm.linux.org.uk>
---
 arch/arm/mach-davinci/board-dm365-evm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c
index 4cdb61c..9be953e 100644
--- a/arch/arm/mach-davinci/board-dm365-evm.c
+++ b/arch/arm/mach-davinci/board-dm365-evm.c
@@ -176,7 +176,7 @@ static struct at24_platform_data eeprom_info = {
 	.context	= (void *)0x7f00,
 };
 
-static struct snd_platform_data dm365_evm_snd_data = {
+static struct snd_platform_data dm365_evm_snd_data __maybe_unused = {
 	.asp_chan_q = EVENTQ_3,
 };
 
-- 
1.8.4




More information about the linux-arm-kernel mailing list