Skip to content

Commit

Permalink
tty/console: fix warnings in drivers/tty/serial/kgdboc.c
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Anton Vorontsov <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Jason Wessel <[email protected]>
  • Loading branch information
arndb authored and jwessel committed Oct 12, 2012
1 parent 17b572e commit f2f0945
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions include/linux/console.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit f2f0945

Please sign in to comment.