linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Documentation/spi/* compile warning fix
@ 2010-05-19 18:01 Prarit Bhargava
       [not found] ` <20100519175712.10378.62717.sendpatchset-lwyPSKVeczd+7Tl7ptjsKdvLeJWuRmrY@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Prarit Bhargava @ 2010-05-19 18:01 UTC (permalink / raw)
  To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f,
	grant.likely-s3s/WqlpOiPyB63q8FvJNQ,
	randy.dunlap-QHcLZuEGTsvQT0dZR+AlfA
  Cc: Prarit Bhargava

Fix this warning:

Documentation/spi/spidev_fdx.c: In function `do_msg':
Documentation/spi/spidev_fdx.c:61: warning: cast from pointer to integer of different size
Documentation/spi/spidev_fdx.c:64: warning: cast from pointer to integer of different size

buf should be unsigned long to match native arch on 32-bit x86 compile.

Signed-off-by: Prarit Bhargava <prarit-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

diff --git a/Documentation/spi/spidev_fdx.c b/Documentation/spi/spidev_fdx.c
index fc354f7..36ec077 100644
--- a/Documentation/spi/spidev_fdx.c
+++ b/Documentation/spi/spidev_fdx.c
@@ -58,10 +58,10 @@ static void do_msg(int fd, int len)
 		len = sizeof buf;
 
 	buf[0] = 0xaa;
-	xfer[0].tx_buf = (__u64) buf;
+	xfer[0].tx_buf = (unsigned long)buf;
 	xfer[0].len = 1;
 
-	xfer[1].rx_buf = (__u64) buf;
+	xfer[1].rx_buf = (unsigned long) buf;
 	xfer[1].len = len;
 
 	status = ioctl(fd, SPI_IOC_MESSAGE(2), xfer);

------------------------------------------------------------------------------

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

end of thread, other threads:[~2010-05-19 19:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-19 18:01 Documentation/spi/* compile warning fix Prarit Bhargava
     [not found] ` <20100519175712.10378.62717.sendpatchset-lwyPSKVeczd+7Tl7ptjsKdvLeJWuRmrY@public.gmane.org>
2010-05-19 19:25   ` Prarit Bhargava
     [not found]     ` <4BF43B47.5050906-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-05-19 19:36       ` Grant Likely

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).