[media] media, rc: Use static inline functions to kill warnings
authorPekka Enberg <penberg@kernel.org>
Fri, 23 Sep 2011 13:19:07 +0000 (10:19 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 24 Sep 2011 02:50:52 +0000 (23:50 -0300)
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@infradead.org>
Cc: "David Härdeman" <david@hardeman.nu>
Cc: Jarod Wilson <jarod@redhat.com>
Cc: <linux-media@vger.kernel.org>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/rc/rc-core-priv.h

index 04c2c722b6ece48d9ead508e952b6e4ab4927328..c6ca870e8b7eb1e2a112b8da1670cd896ed12e1d 100644 (file)
@@ -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