* 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
* Re: Documentation/spi/* compile warning fix
[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>
0 siblings, 1 reply; 3+ messages in thread
From: Prarit Bhargava @ 2010-05-19 19:25 UTC (permalink / raw)
To: Prarit Bhargava
Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
randy.dunlap-QHcLZuEGTsvQT0dZR+AlfA,
dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f
Sorry everyone ... I left off [PATCH]: ... will resend shortly.
(And then I top-posted too...)
P.
On 05/19/2010 02:01 PM, Prarit Bhargava wrote:
> 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 [flat|nested] 3+ messages in thread
* Re: Documentation/spi/* compile warning fix
[not found] ` <4BF43B47.5050906-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2010-05-19 19:36 ` Grant Likely
0 siblings, 0 replies; 3+ messages in thread
From: Grant Likely @ 2010-05-19 19:36 UTC (permalink / raw)
To: Prarit Bhargava
Cc: randy.dunlap-QHcLZuEGTsvQT0dZR+AlfA,
spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f
On Wed, May 19, 2010 at 1:25 PM, Prarit Bhargava <prarit-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> Sorry everyone ... I left off [PATCH]: ... will resend shortly.
>
> (And then I top-posted too...)
[PATCH] is trivial and unnecessary. As long as it shows up in
patchwork, then I won't forget about it:
https://patchwork.kernel.org/patch/100984/
(It may take me a while to pick it up, but I won't forget about it).
g.
------------------------------------------------------------------------------
^ permalink raw reply [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).