tree c260bc770ee4c1e343d5c79979f26d0f62d16f57
parent 4706df3d3c42af802597d82c8b1542c3d52eab23
author David S. Miller <[EMAIL PROTECTED]> Wed, 07 Sep 2005 03:57:08 -0700
committer David S. Miller <[EMAIL PROTECTED]> Wed, 07 Sep 2005 03:57:08 -0700

[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 <[EMAIL PROTECTED]>

 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
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -385,11 +385,11 @@ int uart_resume_port(struct uart_driver 
 /*
  * 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);
@@ -398,11 +398,9 @@ uart_handle_sysrq_char(struct uart_port 
                }
                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...
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to