Commit f925b130 authored by David S. Miller's avatar David S. Miller

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: default avatarDavid S. Miller <davem@davemloft.net>
parent dd131e76
...@@ -322,7 +322,7 @@ static int asix_rx_fixup(struct usbnet *dev, struct sk_buff *skb) ...@@ -322,7 +322,7 @@ static int asix_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
size = (u16) (header & 0x0000ffff); size = (u16) (header & 0x0000ffff);
if ((skb->len) - ((size + 1) & 0xfffe) == 0) { if ((skb->len) - ((size + 1) & 0xfffe) == 0) {
u8 alignment = (u32)skb->data & 0x3; u8 alignment = (unsigned long)skb->data & 0x3;
if (alignment != 0x2) { if (alignment != 0x2) {
/* /*
* not 16bit aligned so use the room provided by * not 16bit aligned so use the room provided by
...@@ -351,7 +351,7 @@ static int asix_rx_fixup(struct usbnet *dev, struct sk_buff *skb) ...@@ -351,7 +351,7 @@ static int asix_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
} }
ax_skb = skb_clone(skb, GFP_ATOMIC); ax_skb = skb_clone(skb, GFP_ATOMIC);
if (ax_skb) { if (ax_skb) {
u8 alignment = (u32)packet & 0x3; u8 alignment = (unsigned long)packet & 0x3;
ax_skb->len = size; ax_skb->len = size;
if (alignment != 0x2) { if (alignment != 0x2) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment