diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-02-20 06:05:59 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-02-20 20:11:49 -0500 |
commit | 1955fd0b533d05828bff7ed290213d2a0fc0f04f (patch) | |
tree | dfbcf6a25ea530f969acf455350af9d4e73f234f /drivers/net | |
parent | 7cb4461520f307a6e3fb2bb32cb8daee45aa1fae (diff) |
rtl818x: fix sparse warnings
This silences a few sparse warnings. There are two more where
I can't follow the code.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/rtl8180_dev.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/rtl8187_dev.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/wireless/rtl8180_dev.c b/drivers/net/wireless/rtl8180_dev.c index 27ebd689aa21..5e9a8ace0d81 100644 --- a/drivers/net/wireless/rtl8180_dev.c +++ b/drivers/net/wireless/rtl8180_dev.c | |||
@@ -135,13 +135,15 @@ static void rtl8180_handle_tx(struct ieee80211_hw *dev, unsigned int prio) | |||
135 | while (skb_queue_len(&ring->queue)) { | 135 | while (skb_queue_len(&ring->queue)) { |
136 | struct rtl8180_tx_desc *entry = &ring->desc[ring->idx]; | 136 | struct rtl8180_tx_desc *entry = &ring->desc[ring->idx]; |
137 | struct sk_buff *skb; | 137 | struct sk_buff *skb; |
138 | struct ieee80211_tx_status status = { {0} }; | 138 | struct ieee80211_tx_status status; |
139 | struct ieee80211_tx_control *control; | 139 | struct ieee80211_tx_control *control; |
140 | u32 flags = le32_to_cpu(entry->flags); | 140 | u32 flags = le32_to_cpu(entry->flags); |
141 | 141 | ||
142 | if (flags & RTL8180_TX_DESC_FLAG_OWN) | 142 | if (flags & RTL8180_TX_DESC_FLAG_OWN) |
143 | return; | 143 | return; |
144 | 144 | ||
145 | memset(&status, 0, sizeof(status)); | ||
146 | |||
145 | ring->idx = (ring->idx + 1) % ring->entries; | 147 | ring->idx = (ring->idx + 1) % ring->entries; |
146 | skb = __skb_dequeue(&ring->queue); | 148 | skb = __skb_dequeue(&ring->queue); |
147 | pci_unmap_single(priv->pdev, le32_to_cpu(entry->tx_buf), | 149 | pci_unmap_single(priv->pdev, le32_to_cpu(entry->tx_buf), |
diff --git a/drivers/net/wireless/rtl8187_dev.c b/drivers/net/wireless/rtl8187_dev.c index 0d71716d750d..f44505994a0e 100644 --- a/drivers/net/wireless/rtl8187_dev.c +++ b/drivers/net/wireless/rtl8187_dev.c | |||
@@ -113,10 +113,12 @@ void rtl8187_write_phy(struct ieee80211_hw *dev, u8 addr, u32 data) | |||
113 | 113 | ||
114 | static void rtl8187_tx_cb(struct urb *urb) | 114 | static void rtl8187_tx_cb(struct urb *urb) |
115 | { | 115 | { |
116 | struct ieee80211_tx_status status = { {0} }; | 116 | struct ieee80211_tx_status status; |
117 | struct sk_buff *skb = (struct sk_buff *)urb->context; | 117 | struct sk_buff *skb = (struct sk_buff *)urb->context; |
118 | struct rtl8187_tx_info *info = (struct rtl8187_tx_info *)skb->cb; | 118 | struct rtl8187_tx_info *info = (struct rtl8187_tx_info *)skb->cb; |
119 | 119 | ||
120 | memset(&status, 0, sizeof(status)); | ||
121 | |||
120 | usb_free_urb(info->urb); | 122 | usb_free_urb(info->urb); |
121 | if (info->control) | 123 | if (info->control) |
122 | memcpy(&status.control, info->control, sizeof(status.control)); | 124 | memcpy(&status.control, info->control, sizeof(status.control)); |