Staging: rtl8192e: Fix incorrect type in assignment in rtl_core.c

This patch fixes the following sparse warning in rtl8192e/rtl_core.c-

drivers/staging/rtl8192e/rtl8192e/rtl_core.c:565:10: warning: incorrect type in initializer (different base types)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:565:10:    expected  restricted __le16
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:565:10:    got int

drivers/staging/rtl8192e/rtl8192e/rtl_core.c:565:13: warning: incorrect type in initializer (different base types)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:565:13:    expected restricted __le16
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:565:13:    got int

drivers/staging/rtl8192e/rtl8192e/rtl_core.c:565:16: warning: incorrect type in initializer (different base types)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:565:16:    expected restricted __le16
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:565:16:    got int

drivers/staging/rtl8192e/rtl8192e/rtl_core.c:565:19: warning: incorrect type in initializer (different base types)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:565:19:        expected restricted __le16
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:565:19:    got int

drivers/staging/rtl8192e/rtl8192e/rtl_core.c:566:10: warning: incorrect type in initializer (different base types)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:566:10:    expected restricted __le16
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:566:10:    got int

drivers/staging/rtl8192e/rtl8192e/rtl_core.c:566:13: warning: incorrect type in initializer (different base types)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:566:13:         expected restricted __le16
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:566:13:         got int

drivers/staging/rtl8192e/rtl8192e/rtl_core.c:566:16: warning: incorrect type in initializer (different base types)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:566:16:    expected restricted __le16
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:566:16:    got int

drivers/staging/rtl8192e/rtl8192e/rtl_core.c:566:19: warning: incorrect type in initializer (different base types)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:566:19:    expected restricted __le16
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:566:19:    got int

drivers/staging/rtl8192e/rtl8192e/rtl_core.c:2012:12: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:2012:12:        expected unsigned short [unsigned] [usertype] fc
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:2012:12:        got restricted __le16 [usertype] frame_ctl

drivers/staging/rtl8192e/rtl8192e/rtl_core.c:2102:46: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:2102:46:   expected unsigned int [unsigned] [usertype] BufferAddress
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:2102:46:   got restricted __le32 [usertype] <noident>

drivers/staging/rtl8192e/rtl8192e/rtl_core.c:2137:41: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:2137:41:   expected unsigned int [unsigned] [usertype] NextDescAddress
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:2137:41:         got restricted __le32 [usertype] <noident>

drivers/staging/rtl8192e/rtl8192e/rtl_core.c:2401:38: warning: incorrect type in assignment rtllib_softmac.c(different base types)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:2401:38:         expected unsigned int [unsigned] [usertype] BufferAddress
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:2401:38:   got restricted __le32 [usertype] <noident>

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Rashika Kheria 2013-11-07 19:15:48 +05:30 committed by Greg Kroah-Hartman
parent fa63c9ce86
commit 34e987e6ff
1 changed files with 7 additions and 7 deletions

View File

@ -562,8 +562,8 @@ void rtl8192_update_cap(struct net_device *dev, u16 cap)
}
static struct rtllib_qos_parameters def_qos_parameters = {
{3, 3, 3, 3},
{7, 7, 7, 7},
{cpu_to_le16(3), cpu_to_le16(3), cpu_to_le16(3), cpu_to_le16(3)},
{cpu_to_le16(7), cpu_to_le16(7), cpu_to_le16(7), cpu_to_le16(7)},
{2, 2, 2, 2},
{0, 0, 0, 0},
{0, 0, 0, 0}
@ -2009,7 +2009,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
fwinfo_size = sizeof(struct tx_fwinfo_8190pci);
header = (struct rtllib_hdr_1addr *)(((u8 *)skb->data) + fwinfo_size);
fc = header->frame_ctl;
fc = le16_to_cpu(header->frame_ctl);
type = WLAN_FC_GET_TYPE(fc);
stype = WLAN_FC_GET_STYPE(fc);
pda_addr = header->addr1;
@ -2099,7 +2099,7 @@ static short rtl8192_alloc_rx_desc_ring(struct net_device *dev)
dev_kfree_skb_any(skb);
return -1;
}
entry->BufferAddress = cpu_to_le32(*mapping);
entry->BufferAddress = *mapping;
entry->Length = priv->rxbuffersize;
entry->OWN = 1;
@ -2135,8 +2135,8 @@ static int rtl8192_alloc_tx_desc_ring(struct net_device *dev,
for (i = 0; i < entries; i++)
ring[i].NextDescAddress =
cpu_to_le32((u32)dma + ((i + 1) % entries) *
sizeof(*ring));
(u32)dma + ((i + 1) % entries) *
sizeof(*ring);
return 0;
}
@ -2398,7 +2398,7 @@ static void rtl8192_rx_normal(struct net_device *dev)
}
}
done:
pdesc->BufferAddress = cpu_to_le32(*((dma_addr_t *)skb->cb));
pdesc->BufferAddress = *((dma_addr_t *)skb->cb);
pdesc->OWN = 1;
pdesc->Length = priv->rxbuffersize;
if (priv->rx_idx[rx_queue_idx] == priv->rxringcount-1)