From: Stephen Rothwell on
Hi Greg,

Today's linux-next build (x86_64 allmodconfig) produced this warning:

drivers/usb/serial/ti_usb_3410_5052.c: In function 'ti_download_firmware':
drivers/usb/serial/ti_usb_3410_5052.c:1738: warning: format '%d' expects type 'int', but argument 5 has type 'size_t'

Introduced by commit cdc04834ce70343aa6f87c5332ec66c35d968967 ("USB:
ti_usb_3410_5052: adding multitech dialup fax/modem devices").

--
Cheers,
Stephen Rothwell sfr(a)canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
From: Greg KH on
On Tue, Apr 27, 2010 at 09:30:19AM +1000, Stephen Rothwell wrote:
> Hi Greg,
>
> Today's linux-next build (x86_64 allmodconfig) produced this warning:
>
> drivers/usb/serial/ti_usb_3410_5052.c: In function 'ti_download_firmware':
> drivers/usb/serial/ti_usb_3410_5052.c:1738: warning: format '%d' expects type 'int', but argument 5 has type 'size_t'
>
> Introduced by commit cdc04834ce70343aa6f87c5332ec66c35d968967 ("USB:
> ti_usb_3410_5052: adding multitech dialup fax/modem devices").

Thanks, Randy has already sent me a fix for this, I'm working on apply
it to my tree soon (doing must-fix things first...)

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Stephen Rothwell on
Hi Greg,

On Mon, 26 Apr 2010 16:42:50 -0700 Greg KH <greg(a)kroah.com> wrote:
>
> Thanks, Randy has already sent me a fix for this, I'm working on apply
> it to my tree soon (doing must-fix things first...)

Of course, I just note these sort of warnings in case they get missed.

Thanks.

--
Cheers,
Stephen Rothwell sfr(a)canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
From: David Miller on
From: Stephen Rothwell <sfr(a)canb.auug.org.au>
Date: Tue, 25 May 2010 11:46:14 +1000

> Hi Dave,
>
> Today's linux-next build (x86_64 allmodconfig) produced this warning:
>
> drivers/net/usb/asix.c: In function 'asix_rx_fixup':
> drivers/net/usb/asix.c:325: warning: cast from pointer to integer of different size
> drivers/net/usb/asix.c:354: warning: cast from pointer to integer of different size
>
> Introduced by commit 3f78d1f210ff89af77f042ab7f4a8fee39feb1c9
> ("drivers/net/usb/asix.c: Fix unaligned accesses"). This commit casts
> skb->data to u32.

Thanks I'll look into this.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: David Miller on
From: David Miller <davem(a)davemloft.net>
Date: Mon, 24 May 2010 21:58:22 -0700 (PDT)

> From: Stephen Rothwell <sfr(a)canb.auug.org.au>
> Date: Tue, 25 May 2010 11:46:14 +1000
>
>> Hi Dave,
>>
>> Today's linux-next build (x86_64 allmodconfig) produced this warning:
>>
>> drivers/net/usb/asix.c: In function 'asix_rx_fixup':
>> drivers/net/usb/asix.c:325: warning: cast from pointer to integer of different size
>> drivers/net/usb/asix.c:354: warning: cast from pointer to integer of different size
>>
>> Introduced by commit 3f78d1f210ff89af77f042ab7f4a8fee39feb1c9
>> ("drivers/net/usb/asix.c: Fix unaligned accesses"). This commit casts
>> skb->data to u32.
>
> Thanks I'll look into this.

Here is how I fixed this:

--------------------
drivers/net/usb/asix.c: Fix pointer cast.

Stephen Rothwell reports the following new warning:

drivers/net/usb/asix.c: In function 'asix_rx_fixup':
drivers/net/usb/asix.c:325: warning: cast from pointer to integer of different size
drivers/net/usb/asix.c:354: warning: cast from pointer to integer of different size

The code just cares about the low alignment bits, so use
an "unsigned long" cast instead of one to "u32".

Signed-off-by: David S. Miller <davem(a)davemloft.net>
---
drivers/net/usb/asix.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c
index 31b7331..ea75f47 100644
--- a/drivers/net/usb/asix.c
+++ b/drivers/net/usb/asix.c
@@ -322,7 +322,7 @@ static int asix_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
size = (u16) (header & 0x0000ffff);

if ((skb->len) - ((size + 1) & 0xfffe) == 0) {
- u8 alignment = (u32)skb->data & 0x3;
+ u8 alignment = (unsigned long)skb->data & 0x3;
if (alignment != 0x2) {
/*
* not 16bit aligned so use the room provided by
--
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/