2016-05-04 06:19:28

by Dan Carpenter

[permalink] [raw]
Subject: [patch] iwlwifi: mvm: remove an unused variable

We never initalize ampdu_status so it causes a static checker warning
when we pass it to iwl_mvm_pass_packet_to_mac80211(). Fortunately, it's
never used so we can just remove it.

Signed-off-by: Dan Carpenter <[email protected]>

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rx.c b/drivers/net/wireless/intel/iwlwifi/mvm/rx.c
index 263e8a8..c9d419f 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rx.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rx.c
@@ -100,7 +100,7 @@ static void iwl_mvm_pass_packet_to_mac80211(struct iwl_mvm *mvm,
struct napi_struct *napi,
struct sk_buff *skb,
struct ieee80211_hdr *hdr, u16 len,
- u32 ampdu_status, u8 crypt_len,
+ u8 crypt_len,
struct iwl_rx_cmd_buffer *rxb)
{
unsigned int hdrlen, fraglen;
@@ -267,7 +267,6 @@ void iwl_mvm_rx_rx_mpdu(struct iwl_mvm *mvm, struct napi_struct *napi,
struct ieee80211_sta *sta = NULL;
struct sk_buff *skb;
u32 len;
- u32 ampdu_status;
u32 rate_n_flags;
u32 rx_pkt_status;
u8 crypt_len = 0;
@@ -453,8 +452,8 @@ void iwl_mvm_rx_rx_mpdu(struct iwl_mvm *mvm, struct napi_struct *napi,
mvm->sched_scan_pass_all == SCHED_SCAN_PASS_ALL_ENABLED))
mvm->sched_scan_pass_all = SCHED_SCAN_PASS_ALL_FOUND;

- iwl_mvm_pass_packet_to_mac80211(mvm, napi, skb, hdr, len, ampdu_status,
- crypt_len, rxb);
+ iwl_mvm_pass_packet_to_mac80211(mvm, napi, skb, hdr, len, crypt_len,
+ rxb);
}

static void iwl_mvm_update_rx_statistics(struct iwl_mvm *mvm,


2016-05-09 11:44:37

by Luciano Coelho

[permalink] [raw]
Subject: Re: [patch] iwlwifi: mvm: remove an unused variable

T24gV2VkLCAyMDE2LTA1LTA0IGF0IDA5OjE5ICswMzAwLCBEYW4gQ2FycGVudGVyIHdyb3RlOg0K
PiBXZSBuZXZlciBpbml0YWxpemUgYW1wZHVfc3RhdHVzIHNvIGl0IGNhdXNlcyBhIHN0YXRpYyBj
aGVja2VyIHdhcm5pbmcNCj4gd2hlbiB3ZSBwYXNzIGl0IHRvIGl3bF9tdm1fcGFzc19wYWNrZXRf
dG9fbWFjODAyMTEoKS7CoMKgRm9ydHVuYXRlbHksDQo+IGl0J3MNCj4gbmV2ZXIgdXNlZCBzbyB3
ZSBjYW4ganVzdCByZW1vdmUgaXQuDQo+IA0KPiBTaWduZWQtb2ZmLWJ5OiBEYW4gQ2FycGVudGVy
IDxkYW4uY2FycGVudGVyQG9yYWNsZS5jb20+DQoNClRoYW5rcyBEYW4hDQoNCkknbGwgcHVzaCB0
aGlzIHBhdGNoIHRocm91Z2ggb3VyIGludGVybmFsIHRyZWUuDQoNCi0tDQpDaGVlcnMsDQpMdWNh
Lg==