Skip to content

Commit

Permalink
[SERIAL]: Avoid 'statement with no effect' warnings.
Browse files Browse the repository at this point in the history
When SUPPORT_SYSRQ is false, gcc can emit warnings for
the uart_handle_sysrq_char() that results.  Using an
empty inline returning zero kills the warning.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Sep 6, 2005
1 parent 4706df3 commit 93c37f2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions include/linux/serial_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@ int uart_resume_port(struct uart_driver *reg, struct uart_port *port);
/*
* The following are helper functions for the low level drivers.
*/
#ifdef SUPPORT_SYSRQ
static inline int
uart_handle_sysrq_char(struct uart_port *port, unsigned int ch,
struct pt_regs *regs)
{
#ifdef SUPPORT_SYSRQ
if (port->sysrq) {
if (ch && time_before(jiffies, port->sysrq)) {
handle_sysrq(ch, regs, NULL);
Expand All @@ -398,11 +398,9 @@ uart_handle_sysrq_char(struct uart_port *port, unsigned int ch,
}
port->sysrq = 0;
}
#endif
return 0;
}
#else
#define uart_handle_sysrq_char(port,ch,regs) (0)
#endif

/*
* We do the SysRQ and SAK checking like this...
Expand Down

0 comments on commit 93c37f2

Please sign in to comment.