From: David S. Miller Date: Tue, 6 Sep 2005 20:57:08 +0000 (-0700) Subject: [SERIAL]: Avoid 'statement with no effect' warnings. X-Git-Tag: firefly_0821_release~41682^2~1 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=93c37f292110a37dd77e4cc0aaf1c341d79bf6aa;p=firefly-linux-kernel-4.4.55.git [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 --- 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); /* * 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, 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...