All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] serial: max310x: Fix sparse warnings
@ 2014-02-15 10:59 Alexander Shiyan
  2014-02-15 10:59 ` [PATCH 2/2] serial: max310x: Fix devicetree documentation for clock name Alexander Shiyan
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Shiyan @ 2014-02-15 10:59 UTC (permalink / raw)
  To: linux-serial; +Cc: Greg Kroah-Hartman, Jiri Slaby, Alexander Shiyan

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 2/2] serial: max310x: Fix devicetree documentation for clock name
  2014-02-15 10:59 [PATCH 1/2] serial: max310x: Fix sparse warnings Alexander Shiyan
@ 2014-02-15 10:59 ` Alexander Shiyan
  0 siblings, 0 replies; 2+ messages in thread
From: Alexander Shiyan @ 2014-02-15 10:59 UTC (permalink / raw)
  To: linux-serial; +Cc: Greg Kroah-Hartman, Jiri Slaby, Alexander Shiyan

Clock names mistakenly given opposite. This patch fix this issue.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 Documentation/devicetree/bindings/serial/maxim,max310x.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/serial/maxim,max310x.txt b/Documentation/devicetree/bindings/serial/maxim,max310x.txt
index 0daf780..83a919c 100644
--- a/Documentation/devicetree/bindings/serial/maxim,max310x.txt
+++ b/Documentation/devicetree/bindings/serial/maxim,max310x.txt
@@ -13,8 +13,8 @@ Required properties:
   controller. The format of the interrupt specifier depends on the
   parent interrupt controller.
 - clocks: phandle to the IC source clock.
-- clock-names: Should be "osc" if clock is an external crystal or
-  "xtal" if an external clock source is used.
+- clock-names: Should be "xtal" if clock is an external crystal or
+  "osc" if an external clock source is used.
 
 Optional properties:
 - gpio-controller: Marks the device node as a GPIO controller.
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-15 10:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-15 10:59 [PATCH 1/2] serial: max310x: Fix sparse warnings Alexander Shiyan
2014-02-15 10:59 ` [PATCH 2/2] serial: max310x: Fix devicetree documentation for clock name Alexander Shiyan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.