提交 93c37f29 编写于 作者: D David S. Miller

[SERIAL]: Avoid 'statement with no effect' warnings.

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: NDavid S. Miller <davem@davemloft.net>
上级 4706df3d
...@@ -385,11 +385,11 @@ int uart_resume_port(struct uart_driver *reg, struct uart_port *port); ...@@ -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. * The following are helper functions for the low level drivers.
*/ */
#ifdef SUPPORT_SYSRQ
static inline int static inline int
uart_handle_sysrq_char(struct uart_port *port, unsigned int ch, uart_handle_sysrq_char(struct uart_port *port, unsigned int ch,
struct pt_regs *regs) struct pt_regs *regs)
{ {
#ifdef SUPPORT_SYSRQ
if (port->sysrq) { if (port->sysrq) {
if (ch && time_before(jiffies, port->sysrq)) { if (ch && time_before(jiffies, port->sysrq)) {
handle_sysrq(ch, regs, NULL); handle_sysrq(ch, regs, NULL);
...@@ -398,11 +398,9 @@ uart_handle_sysrq_char(struct uart_port *port, unsigned int ch, ...@@ -398,11 +398,9 @@ uart_handle_sysrq_char(struct uart_port *port, unsigned int ch,
} }
port->sysrq = 0; port->sysrq = 0;
} }
#endif
return 0; return 0;
} }
#else
#define uart_handle_sysrq_char(port,ch,regs) (0)
#endif
/* /*
* We do the SysRQ and SAK checking like this... * We do the SysRQ and SAK checking like this...
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册