[PATCH 2/2] media, rc: Use static inline functions to kill warnings

From: penberg
Date: Fri Sep 23 2011 - 10:19:34 EST


From: Pekka Enberg <penberg@xxxxxxxxxx>

This patch converts some ifdef'd wrapper functions from macros to static inline
functions to kill the following warnings issued by GCC:

CC [M] drivers/media/rc/ir-raw.o
drivers/media/rc/ir-raw.c: In function âinit_decodersâ:
drivers/media/rc/ir-raw.c:353:2: warning: statement with no effect [-Wunused-value]
drivers/media/rc/ir-raw.c:354:2: warning: statement with no effect [-Wunused-value]
drivers/media/rc/ir-raw.c:355:2: warning: statement with no effect [-Wunused-value]
drivers/media/rc/ir-raw.c:356:2: warning: statement with no effect [-Wunused-value]
drivers/media/rc/ir-raw.c:357:2: warning: statement with no effect [-Wunused-value]
drivers/media/rc/ir-raw.c:359:2: warning: statement with no effect [-Wunused-value]

Cc: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxx>
Cc: "David HÃrdeman" <david@xxxxxxxxxxx>
Cc: Jarod Wilson <jarod@xxxxxxxxxx>
Cc: <linux-media@xxxxxxxxxxxxxxx>
Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxx>
---
drivers/media/rc/rc-core-priv.h | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/media/rc/rc-core-priv.h b/drivers/media/rc/rc-core-priv.h
index 04c2c72..c6ca870 100644
--- a/drivers/media/rc/rc-core-priv.h
+++ b/drivers/media/rc/rc-core-priv.h
@@ -162,49 +162,49 @@ void ir_raw_init(void);
#ifdef CONFIG_IR_NEC_DECODER_MODULE
#define load_nec_decode() request_module("ir-nec-decoder")
#else
-#define load_nec_decode() 0
+static inline void load_nec_decode(void) { }
#endif

/* from ir-rc5-decoder.c */
#ifdef CONFIG_IR_RC5_DECODER_MODULE
#define load_rc5_decode() request_module("ir-rc5-decoder")
#else
-#define load_rc5_decode() 0
+static inline void load_rc5_decode(void) { }
#endif

/* from ir-rc6-decoder.c */
#ifdef CONFIG_IR_RC6_DECODER_MODULE
#define load_rc6_decode() request_module("ir-rc6-decoder")
#else
-#define load_rc6_decode() 0
+static inline void load_rc6_decode(void) { }
#endif

/* from ir-jvc-decoder.c */
#ifdef CONFIG_IR_JVC_DECODER_MODULE
#define load_jvc_decode() request_module("ir-jvc-decoder")
#else
-#define load_jvc_decode() 0
+static inline void load_jvc_decode(void) { }
#endif

/* from ir-sony-decoder.c */
#ifdef CONFIG_IR_SONY_DECODER_MODULE
#define load_sony_decode() request_module("ir-sony-decoder")
#else
-#define load_sony_decode() 0
+static inline void load_sony_decode(void) { }
#endif

/* from ir-mce_kbd-decoder.c */
#ifdef CONFIG_IR_MCE_KBD_DECODER_MODULE
#define load_mce_kbd_decode() request_module("ir-mce_kbd-decoder")
#else
-#define load_mce_kbd_decode() 0
+static inline void load_mce_kbd_decode(void) { }
#endif

/* from ir-lirc-codec.c */
#ifdef CONFIG_IR_LIRC_CODEC_MODULE
#define load_lirc_codec() request_module("ir-lirc-codec")
#else
-#define load_lirc_codec() 0
+static inline void load_lirc_codec(void) { }
#endif


--
1.7.6.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/