Commit 25cf62e4 authored by Axel K's avatar Axel K Committed by Greg Kroah-Hartman

Staging: rt2860/rt2870/rt3070/rt3090: fix compiler warning on x86_64

When compiling rt2860/rt2870/rt3070 or rt3090 on x86_64, the following warning
is displayed:

drivers/staging/rt3090/rt_linux.c: In function 'duplicate_pkt':
drivers/staging/rt3090/rt_linux.c:531: warning: passing argument 1 of 'memmove' makes pointer from integer without a cast
include2/asm/string_64.h:58: note: expected 'void *' but argument is of type 'sk_buff_data_t'
drivers/staging/rt3090/rt_linux.c:533: warning: passing argument 1 of 'memmove' makes pointer from integer without a cast
include2/asm/string_64.h:58: note: expected 'void *' but argument is of type 'sk_buff_data_t'

The following patch fixes this warning.

Credits go to Helmut Schaa <hschaa@suse.de> for his kind advice/help on this
patch.
Signed-off-by: default avatarAxel Koellhofer <rain_maker@root-forum.org>
Cc: Helmut Schaa <hschaa@suse.de>
Acked-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a85236c3
...@@ -537,9 +537,9 @@ PNDIS_PACKET duplicate_pkt( ...@@ -537,9 +537,9 @@ PNDIS_PACKET duplicate_pkt(
if ((skb = __dev_alloc_skb(HdrLen + DataSize + 2, MEM_ALLOC_FLAG)) != NULL) if ((skb = __dev_alloc_skb(HdrLen + DataSize + 2, MEM_ALLOC_FLAG)) != NULL)
{ {
skb_reserve(skb, 2); skb_reserve(skb, 2);
NdisMoveMemory(skb->tail, pHeader802_3, HdrLen); NdisMoveMemory(skb_tail_pointer(skb), pHeader802_3, HdrLen);
skb_put(skb, HdrLen); skb_put(skb, HdrLen);
NdisMoveMemory(skb->tail, pData, DataSize); NdisMoveMemory(skb_tail_pointer(skb), pData, DataSize);
skb_put(skb, DataSize); skb_put(skb, DataSize);
skb->dev = get_netdev_from_bssid(pAd, FromWhichBSSID); skb->dev = get_netdev_from_bssid(pAd, FromWhichBSSID);
pPacket = OSPKT_TO_RTPKT(skb); pPacket = OSPKT_TO_RTPKT(skb);
......
...@@ -528,9 +528,9 @@ PNDIS_PACKET duplicate_pkt( ...@@ -528,9 +528,9 @@ PNDIS_PACKET duplicate_pkt(
if ((skb = __dev_alloc_skb(HdrLen + DataSize + 2, MEM_ALLOC_FLAG)) != NULL) if ((skb = __dev_alloc_skb(HdrLen + DataSize + 2, MEM_ALLOC_FLAG)) != NULL)
{ {
skb_reserve(skb, 2); skb_reserve(skb, 2);
NdisMoveMemory(skb->tail, pHeader802_3, HdrLen); NdisMoveMemory(skb_tail_pointer(skb), pHeader802_3, HdrLen);
skb_put(skb, HdrLen); skb_put(skb, HdrLen);
NdisMoveMemory(skb->tail, pData, DataSize); NdisMoveMemory(skb_tail_pointer(skb), pData, DataSize);
skb_put(skb, DataSize); skb_put(skb, DataSize);
skb->dev = get_netdev_from_bssid(pAd, FromWhichBSSID); skb->dev = get_netdev_from_bssid(pAd, FromWhichBSSID);
pPacket = OSPKT_TO_RTPKT(skb); pPacket = OSPKT_TO_RTPKT(skb);
......
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