diff options
author | Amitkumar Karwar <akarwar@marvell.com> | 2011-10-12 23:29:33 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-10-14 14:48:20 -0400 |
commit | 711825a06bb288e04f8236d77c4e12eba9a1c478 (patch) | |
tree | 8095d8e79c50370fafa03f0c340489e1a98df563 /drivers/net/wireless/mwifiex/txrx.c | |
parent | efaaa8b8414e0ab4ba09aaaf79ab92a34b75797b (diff) |
mwifiex: fix make namespacecheck warnings
This patch takes care of warnings found by running
'make namespacecheck':
1. Remove dead code.
2. Reorder function definitions to avoid forward declarations.
3. Remove unnecessary function/structure declarations and mark
them as static.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/txrx.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/txrx.c | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/drivers/net/wireless/mwifiex/txrx.c b/drivers/net/wireless/mwifiex/txrx.c index 4c3421eb6f40..a206f412875f 100644 --- a/drivers/net/wireless/mwifiex/txrx.c +++ b/drivers/net/wireless/mwifiex/txrx.c | |||
@@ -161,43 +161,3 @@ done: | |||
161 | return 0; | 161 | return 0; |
162 | } | 162 | } |
163 | 163 | ||
164 | /* | ||
165 | * Packet receive completion callback handler. | ||
166 | * | ||
167 | * This function calls another completion callback handler which | ||
168 | * updates the statistics, and optionally updates the parent buffer | ||
169 | * use count before freeing the received packet. | ||
170 | */ | ||
171 | int mwifiex_recv_packet_complete(struct mwifiex_adapter *adapter, | ||
172 | struct sk_buff *skb, int status) | ||
173 | { | ||
174 | struct mwifiex_rxinfo *rx_info = MWIFIEX_SKB_RXCB(skb); | ||
175 | struct mwifiex_rxinfo *rx_info_parent; | ||
176 | struct mwifiex_private *priv; | ||
177 | struct sk_buff *skb_parent; | ||
178 | unsigned long flags; | ||
179 | |||
180 | priv = adapter->priv[rx_info->bss_index]; | ||
181 | |||
182 | if (priv && (status == -1)) | ||
183 | priv->stats.rx_dropped++; | ||
184 | |||
185 | if (rx_info->parent) { | ||
186 | skb_parent = rx_info->parent; | ||
187 | rx_info_parent = MWIFIEX_SKB_RXCB(skb_parent); | ||
188 | |||
189 | spin_lock_irqsave(&priv->rx_pkt_lock, flags); | ||
190 | --rx_info_parent->use_count; | ||
191 | |||
192 | if (!rx_info_parent->use_count) { | ||
193 | spin_unlock_irqrestore(&priv->rx_pkt_lock, flags); | ||
194 | dev_kfree_skb_any(skb_parent); | ||
195 | } else { | ||
196 | spin_unlock_irqrestore(&priv->rx_pkt_lock, flags); | ||
197 | } | ||
198 | } else { | ||
199 | dev_kfree_skb_any(skb); | ||
200 | } | ||
201 | |||
202 | return 0; | ||
203 | } | ||