* [PATCH] net: wireless: rtlwifi: rtl8723be: phy.c: Remove unused function
@ 2014-12-20 22:59 Rickard Strandqvist
2014-12-21 0:46 ` Larry Finger
2014-12-24 16:59 ` Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: Rickard Strandqvist @ 2014-12-20 22:59 UTC (permalink / raw)
To: Larry Finger, Chaoming Li
Cc: Rickard Strandqvist, John W. Linville, linux-wireless, netdev,
linux-kernel
Remove the function rtl8723be_phy_get_txpower_level() that is not used anywhere.
This was partially found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
drivers/net/wireless/rtlwifi/rtl8723be/phy.c | 25 -------------------------
drivers/net/wireless/rtlwifi/rtl8723be/phy.h | 2 --
2 files changed, 27 deletions(-)
diff --git a/drivers/net/wireless/rtlwifi/rtl8723be/phy.c b/drivers/net/wireless/rtlwifi/rtl8723be/phy.c
index 20dcc25..b7b73cb 100644
--- a/drivers/net/wireless/rtlwifi/rtl8723be/phy.c
+++ b/drivers/net/wireless/rtlwifi/rtl8723be/phy.c
@@ -874,31 +874,6 @@ void rtl8723be_phy_get_hw_reg_originalvalue(struct ieee80211_hw *hw)
ROFDM0_RXDETECTOR3, rtlphy->framesync);
}
-void rtl8723be_phy_get_txpower_level(struct ieee80211_hw *hw, long *powerlevel)
-{
- struct rtl_priv *rtlpriv = rtl_priv(hw);
- struct rtl_phy *rtlphy = &rtlpriv->phy;
- u8 txpwr_level;
- long txpwr_dbm;
-
- txpwr_level = rtlphy->cur_cck_txpwridx;
- txpwr_dbm = rtl8723_phy_txpwr_idx_to_dbm(hw, WIRELESS_MODE_B,
- txpwr_level);
- txpwr_level = rtlphy->cur_ofdm24g_txpwridx;
- if (rtl8723_phy_txpwr_idx_to_dbm(hw, WIRELESS_MODE_G, txpwr_level) >
- txpwr_dbm)
- txpwr_dbm =
- rtl8723_phy_txpwr_idx_to_dbm(hw, WIRELESS_MODE_G,
- txpwr_level);
- txpwr_level = rtlphy->cur_ofdm24g_txpwridx;
- if (rtl8723_phy_txpwr_idx_to_dbm(hw, WIRELESS_MODE_N_24G,
- txpwr_level) > txpwr_dbm)
- txpwr_dbm =
- rtl8723_phy_txpwr_idx_to_dbm(hw, WIRELESS_MODE_N_24G,
- txpwr_level);
- *powerlevel = txpwr_dbm;
-}
-
static u8 _rtl8723be_phy_get_ratesection_intxpower_byrate(enum radio_path path,
u8 rate)
{
diff --git a/drivers/net/wireless/rtlwifi/rtl8723be/phy.h b/drivers/net/wireless/rtlwifi/rtl8723be/phy.h
index 6339738..9021d47 100644
--- a/drivers/net/wireless/rtlwifi/rtl8723be/phy.h
+++ b/drivers/net/wireless/rtlwifi/rtl8723be/phy.h
@@ -114,8 +114,6 @@ bool rtl8723be_phy_mac_config(struct ieee80211_hw *hw);
bool rtl8723be_phy_bb_config(struct ieee80211_hw *hw);
bool rtl8723be_phy_rf_config(struct ieee80211_hw *hw);
void rtl8723be_phy_get_hw_reg_originalvalue(struct ieee80211_hw *hw);
-void rtl8723be_phy_get_txpower_level(struct ieee80211_hw *hw,
- long *powerlevel);
void rtl8723be_phy_set_txpower_level(struct ieee80211_hw *hw,
u8 channel);
void rtl8723be_phy_scan_operation_backup(struct ieee80211_hw *hw,
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net: wireless: rtlwifi: rtl8723be: phy.c: Remove unused function
2014-12-20 22:59 [PATCH] net: wireless: rtlwifi: rtl8723be: phy.c: Remove unused function Rickard Strandqvist
@ 2014-12-21 0:46 ` Larry Finger
2014-12-24 16:59 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Larry Finger @ 2014-12-21 0:46 UTC (permalink / raw)
To: Rickard Strandqvist, Chaoming Li; +Cc: linux-wireless, netdev, linux-kernel
On 12/20/2014 04:59 PM, Rickard Strandqvist wrote:
> Remove the function rtl8723be_phy_get_txpower_level() that is not used anywhere.
>
> This was partially found by using a static code analysis program called cppcheck.
>
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
> ---
> drivers/net/wireless/rtlwifi/rtl8723be/phy.c | 25 -------------------------
> drivers/net/wireless/rtlwifi/rtl8723be/phy.h | 2 --
> 2 files changed, 27 deletions(-)
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Larry
>
> diff --git a/drivers/net/wireless/rtlwifi/rtl8723be/phy.c b/drivers/net/wireless/rtlwifi/rtl8723be/phy.c
> index 20dcc25..b7b73cb 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8723be/phy.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8723be/phy.c
> @@ -874,31 +874,6 @@ void rtl8723be_phy_get_hw_reg_originalvalue(struct ieee80211_hw *hw)
> ROFDM0_RXDETECTOR3, rtlphy->framesync);
> }
>
> -void rtl8723be_phy_get_txpower_level(struct ieee80211_hw *hw, long *powerlevel)
> -{
> - struct rtl_priv *rtlpriv = rtl_priv(hw);
> - struct rtl_phy *rtlphy = &rtlpriv->phy;
> - u8 txpwr_level;
> - long txpwr_dbm;
> -
> - txpwr_level = rtlphy->cur_cck_txpwridx;
> - txpwr_dbm = rtl8723_phy_txpwr_idx_to_dbm(hw, WIRELESS_MODE_B,
> - txpwr_level);
> - txpwr_level = rtlphy->cur_ofdm24g_txpwridx;
> - if (rtl8723_phy_txpwr_idx_to_dbm(hw, WIRELESS_MODE_G, txpwr_level) >
> - txpwr_dbm)
> - txpwr_dbm =
> - rtl8723_phy_txpwr_idx_to_dbm(hw, WIRELESS_MODE_G,
> - txpwr_level);
> - txpwr_level = rtlphy->cur_ofdm24g_txpwridx;
> - if (rtl8723_phy_txpwr_idx_to_dbm(hw, WIRELESS_MODE_N_24G,
> - txpwr_level) > txpwr_dbm)
> - txpwr_dbm =
> - rtl8723_phy_txpwr_idx_to_dbm(hw, WIRELESS_MODE_N_24G,
> - txpwr_level);
> - *powerlevel = txpwr_dbm;
> -}
> -
> static u8 _rtl8723be_phy_get_ratesection_intxpower_byrate(enum radio_path path,
> u8 rate)
> {
> diff --git a/drivers/net/wireless/rtlwifi/rtl8723be/phy.h b/drivers/net/wireless/rtlwifi/rtl8723be/phy.h
> index 6339738..9021d47 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8723be/phy.h
> +++ b/drivers/net/wireless/rtlwifi/rtl8723be/phy.h
> @@ -114,8 +114,6 @@ bool rtl8723be_phy_mac_config(struct ieee80211_hw *hw);
> bool rtl8723be_phy_bb_config(struct ieee80211_hw *hw);
> bool rtl8723be_phy_rf_config(struct ieee80211_hw *hw);
> void rtl8723be_phy_get_hw_reg_originalvalue(struct ieee80211_hw *hw);
> -void rtl8723be_phy_get_txpower_level(struct ieee80211_hw *hw,
> - long *powerlevel);
> void rtl8723be_phy_set_txpower_level(struct ieee80211_hw *hw,
> u8 channel);
> void rtl8723be_phy_scan_operation_backup(struct ieee80211_hw *hw,
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: wireless: rtlwifi: rtl8723be: phy.c: Remove unused function
2014-12-20 22:59 [PATCH] net: wireless: rtlwifi: rtl8723be: phy.c: Remove unused function Rickard Strandqvist
2014-12-21 0:46 ` Larry Finger
@ 2014-12-24 16:59 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2014-12-24 16:59 UTC (permalink / raw)
To: Rickard Strandqvist
Cc: Larry Finger, Chaoming Li, John W. Linville, linux-wireless,
netdev, linux-kernel
Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> writes:
> Remove the function rtl8723be_phy_get_txpower_level() that is not used anywhere.
>
> This was partially found by using a static code analysis program called cppcheck.
>
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Thanks, applied to wireless-drivers-next.git.
--
Kalle Valo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-12-24 16:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-20 22:59 [PATCH] net: wireless: rtlwifi: rtl8723be: phy.c: Remove unused function Rickard Strandqvist
2014-12-21 0:46 ` Larry Finger
2014-12-24 16:59 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).