Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Documentation/spi/* compile warning fix

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@redhat.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>

authored by

Prarit Bhargava and committed by
Grant Likely
1dcf57ce 99f1a43f

+2 -2
+2 -2
Documentation/spi/spidev_fdx.c
··· 58 58 len = sizeof buf; 59 59 60 60 buf[0] = 0xaa; 61 - xfer[0].tx_buf = (__u64) buf; 61 + xfer[0].tx_buf = (unsigned long)buf; 62 62 xfer[0].len = 1; 63 63 64 - xfer[1].rx_buf = (__u64) buf; 64 + xfer[1].rx_buf = (unsigned long) buf; 65 65 xfer[1].len = len; 66 66 67 67 status = ioctl(fd, SPI_IOC_MESSAGE(2), xfer);