Skip to contentSkip to conversation

FYI: needlessly exported symbols

PATCH NAK Johannes Berg 4 participants 8 messages Feb 19, 2010 – Jun 29, 2010

Subsystems (2)
lore
Share & tools
lore

Johannes Berg

author maintainer
#0 lore raw

According to a little analysis I did on wireless-testing, these symbols need not be exported because they're not imported by any module:

ath9k_hw_keyisvalid
ath9k_hw_keysetmac

ieee80211_queue_stopped
ieee80211_start_tx_ba_cb
ieee80211_stop_tx_ba_cb
(I wouldn't mind removing these from mac80211, if nobody wants to use them)

p54_parse_eeprom

iwl_apm_stop_master
iwl_internal_short_hw_scan
iwl_leds_background

johannes

#1 lore raw
Quoted 4 lines · Johannes Berg

According to a little analysis I did on wireless-testing, these symbols need not be exported because they're not imported by any module:

p54_parse_eeprom

p54spi(.ko) needs p54_parse_eeprom from p54common(.ko)

author maintainer
#2 lore raw
Quoted 9 lines · Christian Lamparter
Quoted 1 line · Johannes Berg

According to a little analysis I did on wireless-testing, these

symbols

Quoted 3 lines

need not be exported because they're not imported by any module:

p54_parse_eeprom

p54spi(.ko) needs p54_parse_eeprom from p54common(.ko)

Ah. I must have not built that p54spi.

johannes

#3 lore raw

PATCH 1/1 iwlwifi: do not export iwl_leds_background

In reply to Johannes Berg

It is only used from within the iwlcore module.

---
 drivers/net/wireless/iwlwifi/iwl-led.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
drivers/net/wireless/iwlwifi/iwl-led.c +0 -1
index db5bfcb..486244b 100644
@@ -214,7 +214,6 @@ void iwl_leds_background(struct iwl_priv *priv)
 	priv->last_blink_time = jiffies;
 	priv->last_blink_rate = blink_idx;
 }
-EXPORT_SYMBOL(iwl_leds_background);
 
 void iwl_leds_init(struct iwl_priv *priv)
 {
Signature · 1 line
1.7.0.1
#6 lore raw

PATCH 1/1 ath9k: make ath9k_hw_keysetmac static

In reply to Johannes Berg
---
 drivers/net/wireless/ath/ath9k/hw.c |    3 +--
 drivers/net/wireless/ath/ath9k/hw.h |    1 -
 2 files changed, 1 insertions(+), 3 deletions(-)
drivers/net/wireless/ath/ath9k/hw.c +1 -2
index 9d22444..6e87af4 100644
@@ -1498,7 +1498,7 @@ bool ath9k_hw_keyreset(struct ath_hw *ah, u16 entry)
 }
 EXPORT_SYMBOL(ath9k_hw_keyreset);
 
-bool ath9k_hw_keysetmac(struct ath_hw *ah, u16 entry, const u8 *mac)
+static bool ath9k_hw_keysetmac(struct ath_hw *ah, u16 entry, const u8 *mac)
 {
 	u32 macHi, macLo;
 	u32 unicast_flag = AR_KEYTABLE_VALID;
@@ -1536,7 +1536,6 @@ bool ath9k_hw_keysetmac(struct ath_hw *ah, u16 entry, const u8 *mac)
 
 	return true;
 }
-EXPORT_SYMBOL(ath9k_hw_keysetmac);
 
 bool ath9k_hw_set_keycache_entry(struct ath_hw *ah, u16 entry,
 				 const struct ath9k_keyval *k,
drivers/net/wireless/ath/ath9k/hw.h +0 -1
index f0e0cc9..bb99e2e 100644
@@ -859,7 +859,6 @@ u32 ath9k_regd_get_ctl(struct ath_regulatory *reg, struct ath9k_channel *chan);
 
 /* Key Cache Management */
 bool ath9k_hw_keyreset(struct ath_hw *ah, u16 entry);
-bool ath9k_hw_keysetmac(struct ath_hw *ah, u16 entry, const u8 *mac);
 bool ath9k_hw_set_keycache_entry(struct ath_hw *ah, u16 entry,
 				 const struct ath9k_keyval *k,
 				 const u8 *mac);
Signature · 1 line
1.7.0.1
#7 lore raw

PATCH 1/1 ath9k: remove unused function ath9k_hw_keyisvalid

In reply to Johannes Berg
---
 drivers/net/wireless/ath/ath9k/hw.c |   11 -----------
 drivers/net/wireless/ath/ath9k/hw.h |    1 -
 2 files changed, 0 insertions(+), 12 deletions(-)
drivers/net/wireless/ath/ath9k/hw.c +0 -11
index 1ed1440..9d22444 100644
@@ -1737,17 +1737,6 @@ bool ath9k_hw_set_keycache_entry(struct ath_hw *ah, u16 entry,
 }
 EXPORT_SYMBOL(ath9k_hw_set_keycache_entry);
 
-bool ath9k_hw_keyisvalid(struct ath_hw *ah, u16 entry)
-{
-	if (entry < ah->caps.keycache_size) {
-		u32 val = REG_READ(ah, AR_KEYTABLE_MAC1(entry));
-		if (val & AR_KEYTABLE_VALID)
-			return true;
-	}
-	return false;
-}
-EXPORT_SYMBOL(ath9k_hw_keyisvalid);
-
 /******************************/
 /* Power Management (Chipset) */
 /******************************/
drivers/net/wireless/ath/ath9k/hw.h +0 -1
index e9578a4..f0e0cc9 100644
@@ -863,7 +863,6 @@ bool ath9k_hw_keysetmac(struct ath_hw *ah, u16 entry, const u8 *mac);
 bool ath9k_hw_set_keycache_entry(struct ath_hw *ah, u16 entry,
 				 const struct ath9k_keyval *k,
 				 const u8 *mac);
-bool ath9k_hw_keyisvalid(struct ath_hw *ah, u16 entry);
 
 /* GPIO / RFKILL / Antennae */
 void ath9k_hw_cfg_gpio_input(struct ath_hw *ah, u32 gpio);
Signature · 1 line
1.7.0.1
#4 lore raw

Re: [PATCH] iwlwifi: do not export iwl_leds_background

In reply to John W. Linville
Quoted 13 lines · John W. Linville

It is only used from within the iwlcore module.

---
 drivers/net/wireless/iwlwifi/iwl-led.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
drivers/net/wireless/iwlwifi/iwl-led.c +0 -0
index db5bfcb..486244b 100644

drivers/net/wireless/iwlwifi/iwl-led.c void iwl_leds_background(struct iwl_priv *priv) · line 219

Quoted 7 lines
drivers/net/wireless/iwlwifi/iwl-led.c +0 -1
@@ -214,7 +214,6 @@ void iwl_leds_background(struct iwl_priv *priv)
 	priv->last_blink_time = jiffies;
 	priv->last_blink_rate = blink_idx;
 }
-EXPORT_SYMBOL(iwl_leds_background);
 
 void iwl_leds_init(struct iwl_priv *priv)
 {

Nack.

Please take a closer look at how it is used ... it is used in iwl-core.h in an inline (iwl_update_stats) function that is used by both iwlagn and iwl3945.

Reinette

#5 lore raw

Re: [PATCH] iwlwifi: do not export iwl_leds_background

Quoted 19 lines · reinette chatre
Quoted 18 lines · John W. Linville

It is only used from within the iwlcore module.

---
 drivers/net/wireless/iwlwifi/iwl-led.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
drivers/net/wireless/iwlwifi/iwl-led.c +0 -1
index db5bfcb..486244b 100644
@@ -214,7 +214,6 @@ void iwl_leds_background(struct iwl_priv *priv)
 	priv->last_blink_time = jiffies;
 	priv->last_blink_rate = blink_idx;
 }
-EXPORT_SYMBOL(iwl_leds_background);
 
Quoted 8 lines

drivers/net/wireless/iwlwifi/iwl-led.c void iwl_leds_background(struct iwl_priv *priv) · line 219

Quoted 2 lines
drivers/net/wireless/iwlwifi/iwl-led.c +0 -0
 void iwl_leds_init(struct iwl_priv *priv)
 {

Nack.

Please take a closer look at how it is used ... it is used in iwl-core.h in an inline (iwl_update_stats) function that is used by both iwlagn and iwl3945.

OK

Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
[email protected]			might be all we have.  Be ready.