2010-02-19 09:40:16

by Johannes Berg

[permalink] [raw]
Subject: FYI: needlessly exported symbols

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



2010-02-19 14:16:14

by Christian Lamparter

[permalink] [raw]
Subject: Re: FYI: needlessly exported symbols

On Fri, Feb 19, 2010 at 10:40 AM, Johannes Berg
<[email protected]> wrote:
> 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)

2010-02-19 14:19:50

by Johannes Berg

[permalink] [raw]
Subject: Re: FYI: needlessly exported symbols

On Fri, 2010-02-19 at 15:16 +0100, Christian Lamparter wrote:
> On Fri, Feb 19, 2010 at 10:40 AM, Johannes Berg
> <[email protected]> wrote:
> > 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)

Ah. I must have not built that p54spi.

johannes


Attachments:
signature.asc (801.00 B)
This is a digitally signed message part

2010-06-29 19:45:17

by John W. Linville

[permalink] [raw]
Subject: [PATCH] ath9k: remove unused function ath9k_hw_keyisvalid

Reported-by: Johannes Berg <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
---
drivers/net/wireless/ath/ath9k/hw.c | 11 -----------
drivers/net/wireless/ath/ath9k/hw.h | 1 -
2 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 1ed1440..9d22444 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -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) */
/******************************/
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index e9578a4..f0e0cc9 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -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);
--
1.7.0.1


2010-06-29 20:45:26

by John W. Linville

[permalink] [raw]
Subject: Re: [PATCH] iwlwifi: do not export iwl_leds_background

On Tue, Jun 29, 2010 at 01:18:59PM -0700, reinette chatre wrote:
> On Tue, 2010-06-29 at 12:39 -0700, John W. Linville wrote:
> > It is only used from within the iwlcore module.
> >
> > Reported-by: Johannes Berg <[email protected]>
> > Signed-off-by: John W. Linville <[email protected]>
> > ---
> > drivers/net/wireless/iwlwifi/iwl-led.c | 1 -
> > 1 files changed, 0 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/net/wireless/iwlwifi/iwl-led.c b/drivers/net/wireless/iwlwifi/iwl-led.c
> > index db5bfcb..486244b 100644
> > --- a/drivers/net/wireless/iwlwifi/iwl-led.c
> > +++ b/drivers/net/wireless/iwlwifi/iwl-led.c
> > @@ -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.

OK

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

2010-06-29 19:45:15

by John W. Linville

[permalink] [raw]
Subject: [PATCH] iwlwifi: do not export iwl_leds_background

It is only used from within the iwlcore module.

Reported-by: Johannes Berg <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
---
drivers/net/wireless/iwlwifi/iwl-led.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-led.c b/drivers/net/wireless/iwlwifi/iwl-led.c
index db5bfcb..486244b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-led.c
+++ b/drivers/net/wireless/iwlwifi/iwl-led.c
@@ -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)
{
--
1.7.0.1


2010-06-29 20:19:00

by Reinette Chatre

[permalink] [raw]
Subject: Re: [PATCH] iwlwifi: do not export iwl_leds_background

On Tue, 2010-06-29 at 12:39 -0700, John W. Linville wrote:
> It is only used from within the iwlcore module.
>
> Reported-by: Johannes Berg <[email protected]>
> Signed-off-by: John W. Linville <[email protected]>
> ---
> drivers/net/wireless/iwlwifi/iwl-led.c | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/iwlwifi/iwl-led.c b/drivers/net/wireless/iwlwifi/iwl-led.c
> index db5bfcb..486244b 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-led.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-led.c
> @@ -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




2010-06-29 19:45:16

by John W. Linville

[permalink] [raw]
Subject: [PATCH] ath9k: make ath9k_hw_keysetmac static

Reported-by: Johannes Berg <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
---
drivers/net/wireless/ath/ath9k/hw.c | 3 +--
drivers/net/wireless/ath/ath9k/hw.h | 1 -
2 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 9d22444..6e87af4 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -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,
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index f0e0cc9..bb99e2e 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -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);
--
1.7.0.1