mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
serial: max310x: Fix sparse warnings
sparse warnings: (new ones prefixed by >>) >> drivers/tty/serial/max310x.c:906:45: sparse: incorrect type in argument 2 (different address spaces) drivers/tty/serial/max310x.c:906:45: expected void const [noderef] <asn:1>*from drivers/tty/serial/max310x.c:906:45: got struct serial_rs485 *<noident> >> drivers/tty/serial/max310x.c:938:35: sparse: incorrect type in argument 1 (different address spaces) drivers/tty/serial/max310x.c:938:35: expected void [noderef] <asn:1>*to drivers/tty/serial/max310x.c:938:35: got struct serial_rs485 *<noident> Reported-by: kbuild test robot <[email protected]> Signed-off-by: Alexander Shiyan <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
b2b2d6067d
commit
0fd927f578
1 changed files with 2 additions and 4 deletions
|
|
@ -882,8 +882,7 @@ static int max310x_ioctl(struct uart_port *port, unsigned int cmd,
|
|||
|
||||
switch (cmd) {
|
||||
case TIOCSRS485:
|
||||
if (copy_from_user(&rs485, (struct serial_rs485 *)arg,
|
||||
sizeof(rs485)))
|
||||
if (copy_from_user(&rs485, (void __user *)arg, sizeof(rs485)))
|
||||
return -EFAULT;
|
||||
if (rs485.delay_rts_before_send > 0x0f ||
|
||||
rs485.delay_rts_after_send > 0x0f)
|
||||
|
|
@ -914,8 +913,7 @@ static int max310x_ioctl(struct uart_port *port, unsigned int cmd,
|
|||
val = max310x_port_read(port, MAX310X_HDPIXDELAY_REG);
|
||||
rs485.delay_rts_before_send = val >> 4;
|
||||
rs485.delay_rts_after_send = val & 0x0f;
|
||||
if (copy_to_user((struct serial_rs485 *)arg, &rs485,
|
||||
sizeof(rs485)))
|
||||
if (copy_to_user((void __user *)arg, &rs485, sizeof(rs485)))
|
||||
return -EFAULT;
|
||||
return 0;
|
||||
default:
|
||||
|
|
|
|||
Loading…
Reference in a new issue