提交 da274686 编写于 作者: G Govindraj.R 提交者: Kevin Hilman

ARM: OMAP2+: UART: Fix compilation/sparse warnings

Fixes below compilation warning.

drivers/tty/serial/omap-serial.c: In function 'serial_omap_irq':
drivers/tty/serial/omap-serial.c:228:29: warning: 'ch' may be used uninitialized in this function [-Wuninitialized]

Fix below sparse warning.

drivers/tty/serial/omap-serial.c:392:52: warning: incorrect type in argument 2 (different signedness)
drivers/tty/serial/omap-serial.c:392:52:    expected int *status
drivers/tty/serial/omap-serial.c:392:52:    got unsigned int *<noident>
Reported-by: NKevin Hilman <khilman@ti.com>
Signed-off-by: NGovindraj.R <govindraj.raja@ti.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de> (for drivers/tty changes)
Signed-off-by: NKevin Hilman <khilman@ti.com>
上级 2fd14964
...@@ -166,11 +166,12 @@ static void serial_omap_stop_rx(struct uart_port *port) ...@@ -166,11 +166,12 @@ static void serial_omap_stop_rx(struct uart_port *port)
pm_runtime_put_autosuspend(&up->pdev->dev); pm_runtime_put_autosuspend(&up->pdev->dev);
} }
static inline void receive_chars(struct uart_omap_port *up, int *status) static inline void receive_chars(struct uart_omap_port *up,
unsigned int *status)
{ {
struct tty_struct *tty = up->port.state->port.tty; struct tty_struct *tty = up->port.state->port.tty;
unsigned int flag; unsigned int flag, lsr = *status;
unsigned char ch, lsr = *status; unsigned char ch = 0;
int max_count = 256; int max_count = 256;
do { do {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册