diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2005-09-06 16:57:08 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-09-06 16:57:08 -0400 |
commit | 93c37f292110a37dd77e4cc0aaf1c341d79bf6aa (patch) | |
tree | c260bc770ee4c1e343d5c79979f26d0f62d16f57 | |
parent | 4706df3d3c42af802597d82c8b1542c3d52eab23 (diff) |
[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: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/linux/serial_core.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index cf0f64ea2bc0..9b12fe731612 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -385,11 +385,11 @@ int uart_resume_port(struct uart_driver *reg, struct uart_port *port); | |||
385 | /* | 385 | /* |
386 | * The following are helper functions for the low level drivers. | 386 | * The following are helper functions for the low level drivers. |
387 | */ | 387 | */ |
388 | #ifdef SUPPORT_SYSRQ | ||
389 | static inline int | 388 | static inline int |
390 | uart_handle_sysrq_char(struct uart_port *port, unsigned int ch, | 389 | uart_handle_sysrq_char(struct uart_port *port, unsigned int ch, |
391 | struct pt_regs *regs) | 390 | struct pt_regs *regs) |
392 | { | 391 | { |
392 | #ifdef SUPPORT_SYSRQ | ||
393 | if (port->sysrq) { | 393 | if (port->sysrq) { |
394 | if (ch && time_before(jiffies, port->sysrq)) { | 394 | if (ch && time_before(jiffies, port->sysrq)) { |
395 | handle_sysrq(ch, regs, NULL); | 395 | handle_sysrq(ch, regs, NULL); |
@@ -398,11 +398,9 @@ uart_handle_sysrq_char(struct uart_port *port, unsigned int ch, | |||
398 | } | 398 | } |
399 | port->sysrq = 0; | 399 | port->sysrq = 0; |
400 | } | 400 | } |
401 | #endif | ||
401 | return 0; | 402 | return 0; |
402 | } | 403 | } |
403 | #else | ||
404 | #define uart_handle_sysrq_char(port,ch,regs) (0) | ||
405 | #endif | ||
406 | 404 | ||
407 | /* | 405 | /* |
408 | * We do the SysRQ and SAK checking like this... | 406 | * We do the SysRQ and SAK checking like this... |