Skip to content

Commit

Permalink
tty: serial: omap: fix Sparse warnings
Browse files Browse the repository at this point in the history
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] <asn:1>*from
drivers/tty/serial/omap-serial.c:1418:49:    got struct serial_rs485 \
	*<noident>
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] \
	<asn:1>*to
drivers/tty/serial/omap-serial.c:1426:35:    got struct serial_rs485 \
	*<noident>

Reported-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Felipe Balbi authored and Greg Kroah-Hartman committed Apr 24, 2014
1 parent 5c3f4bd commit d900d98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/tty/serial/omap-serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -1398,15 +1398,15 @@ 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;

serial_omap_config_rs485(port, &rs485conf);
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;
Expand Down

0 comments on commit d900d98

Please sign in to comment.