From: Arnd Bergmann Date: Fri, 28 Sep 2012 21:36:14 +0000 (+0200) Subject: tty/console: fix warnings in drivers/tty/serial/kgdboc.c X-Git-Tag: v3.7-rc1~18^2 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=f2f0945e356daef87cdb01c0302801fb11cf382a;p=~emulex%2Finfiniband.git tty/console: fix warnings in drivers/tty/serial/kgdboc.c The con_debug_leave/con_debug_enter functions are stubbed out by defining them to (0), which causes harmless build warnings. Using proper inline functions is the normal way to deal with this. Without this patch, building the ARM bcm2835_defconfig results in: drivers/tty/serial/kgdboc.c: In function 'kgdboc_pre_exp_handler': drivers/tty/serial/kgdboc.c:279:3: warning: statement with no effect [-Wunused-value] drivers/tty/serial/kgdboc.c: In function 'kgdboc_post_exp_handler': drivers/tty/serial/kgdboc.c:293:3: warning: statement with no effect [-Wunused-value] Signed-off-by: Arnd Bergmann Cc: Anton Vorontsov Cc: Greg Kroah-Hartman Signed-off-by: Jason Wessel --- diff --git a/include/linux/console.h b/include/linux/console.h index 7201ce4280c..dedb082fe50 100644 --- a/include/linux/console.h +++ b/include/linux/console.h @@ -83,8 +83,14 @@ void give_up_console(const struct consw *sw); int con_debug_enter(struct vc_data *vc); int con_debug_leave(void); #else -#define con_debug_enter(vc) (0) -#define con_debug_leave() (0) +static inline int con_debug_enter(struct vc_data *vc) +{ + return 0; +} +static inline int con_debug_leave(void) +{ + return 0; +} #endif /* scroll */