From: Alexander Shiyan <shc_work@mail.ru>
To: linux-serial@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.cz>, Alexander Shiyan <shc_work@mail.ru>
Subject: [PATCH 1/2] serial: max310x: Fix sparse warnings
Date: Sat, 15 Feb 2014 14:59:01 +0400 [thread overview]
Message-ID: <1392461942-19328-1-git-send-email-shc_work@mail.ru> (raw)
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 <fengguang.wu@intel.com>
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
drivers/tty/serial/max310x.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c
index 5836168..471dbc1 100644
--- a/drivers/tty/serial/max310x.c
+++ b/drivers/tty/serial/max310x.c
@@ -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:
--
1.8.3.2
next reply other threads:[~2014-02-15 10:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-15 10:59 Alexander Shiyan [this message]
2014-02-15 10:59 ` [PATCH 2/2] serial: max310x: Fix devicetree documentation for clock name Alexander Shiyan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1392461942-19328-1-git-send-email-shc_work@mail.ru \
--to=shc_work@mail.ru \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=linux-serial@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).