From d900d98ad6429374333d526db2d6c1180e432223 Mon Sep 17 00:00:00 2001 From: Felipe Balbi Date: Wed, 23 Apr 2014 09:58:36 -0500 Subject: tty: serial: omap: fix Sparse warnings Fix the following Sparse warnings: drivers/tty/serial/omap-serial.c:1418:49: warning: incorrect \ type in argument 2 (different address spaces) drivers/tty/serial/omap-serial.c:1418:49: expected void const \ [noderef] *from drivers/tty/serial/omap-serial.c:1418:49: got struct serial_rs485 \ * drivers/tty/serial/omap-serial.c:1426:35: warning: incorrect \ type in argument 1 (different address spaces) drivers/tty/serial/omap-serial.c:1426:35: expected void [noderef] \ *to drivers/tty/serial/omap-serial.c:1426:35: got struct serial_rs485 \ * Reported-by: Nishanth Menon Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/omap-serial.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/tty/serial/omap-serial.c') diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index ab22dabfb37e..d017cec8a34a 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -1398,7 +1398,7 @@ serial_omap_ioctl(struct uart_port *port, unsigned int cmd, unsigned long arg) switch (cmd) { case TIOCSRS485: - if (copy_from_user(&rs485conf, (struct serial_rs485 *) arg, + if (copy_from_user(&rs485conf, (void __user *) arg, sizeof(rs485conf))) return -EFAULT; @@ -1406,7 +1406,7 @@ serial_omap_ioctl(struct uart_port *port, unsigned int cmd, unsigned long arg) break; case TIOCGRS485: - if (copy_to_user((struct serial_rs485 *) arg, + if (copy_to_user((void __user *) arg, &(to_uart_omap_port(port)->rs485), sizeof(rs485conf))) return -EFAULT; -- cgit v1.2.3-59-g8ed1b