Skip to contentSkip to conversation

ath9k: remove useless NULL initialisers

PATCH New Luis R. Rodriguez 2 participants 2 messages Oct 28, 2008 1 message not in the archive Networking drivers (wireless)

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Seems you forgot to cc linux-wireless so I'll leave the entire patch in my reply. Seems right for stable too, so sending a reduced version which applies to it (using gmail right now, will send shortly inline).

Quoted 6 lines · Johannes Berg

When I added .set_frag_threshold I didn't realise it was already there which now generated a sparse warning. Therefore, remove the .set_frag_threshold NULL initialiser, and while at it all the other useless ones.

Luis

Quoted 20 lines
---
 drivers/net/wireless/ath9k/main.c |    8 --------
 1 file changed, 8 deletions(-)
drivers/net/wireless/ath9k/main.c 2008-10-28 16:57:45.000000000 +0100 renamed from drivers/net/wireless/ath9k/main.c 2008-10-28 16:57:36.000000000 +0100 +0 -3
@@ -1651,20 +1651,12 @@ static struct ieee80211_ops ath9k_ops =
       .config             = ath9k_config,
       .config_interface   = ath9k_config_interface,
       .configure_filter   = ath9k_configure_filter,
-       .get_stats          = NULL,
       .sta_notify         = ath9k_sta_notify,
       .conf_tx            = ath9k_conf_tx,
-       .get_tx_stats       = NULL,
       .bss_info_changed   = ath9k_bss_info_changed,
-       .set_tim            = NULL,
       .set_key            = ath9k_set_key,

drivers/net/wireless/ath9k/main.c 2008-10-28 16:57:45.000000000 +0100 static struct ieee80211_ops ath9k_ops = · line 1662

Quoted 10 lines
drivers/net/wireless/ath9k/main.c 2008-10-28 16:57:45.000000000 +0100 renamed from drivers/net/wireless/ath9k/main.c 2008-10-28 16:57:36.000000000 +0100 +0 -5
-       .hw_scan            = NULL,
-       .get_tkip_seq       = NULL,
-       .set_rts_threshold  = NULL,
-       .set_frag_threshold = NULL,
       .get_tsf            = ath9k_get_tsf,
       .reset_tsf          = ath9k_reset_tsf,
-       .tx_last_beacon     = NULL,
       .ampdu_action       = ath9k_ampdu_action,
       .set_frag_threshold = ath9k_no_fragmentation,
 };
drivers/net/wireless/ath9k/main.c renamed from drivers/net/wireless/ath9k/main.c.orig +0 -1
@@ -1031,7 +1031,6 @@
 	.hw_scan            = NULL,
 	.get_tkip_seq       = NULL,
 	.set_rts_threshold  = NULL,
-	.set_frag_threshold = NULL,
 	.set_retry_limit    = NULL,
 	.get_tsf 	    = ath9k_get_tsf,
 	.reset_tsf 	    = ath9k_reset_tsf,
#2 lore raw

PATCH 1/1 ath9k: remove duplicate set_frag_threshold

This removes a duplicate set_frag_threshold which was overlooked. The last set_frag_threshold simply overwrites the pointer for set_rts_threshold so no harm is currently done.

---

Feel free to ignore this patch for stable as I see no issue with the current behaviour which would cause an oops.

drivers/net/wireless/ath9k/main.c renamed from drivers/net/wireless/ath9k/main.c.orig +0 -1
@@ -1031,7 +1031,6 @@
 	.hw_scan            = NULL,
 	.get_tkip_seq       = NULL,
 	.set_rts_threshold  = NULL,
-	.set_frag_threshold = NULL,
 	.set_retry_limit    = NULL,
 	.get_tsf 	    = ath9k_get_tsf,
 	.reset_tsf 	    = ath9k_reset_tsf,