diff mbox

[1/3] rtlwifi: rtl8192cu: remove duplicated routine in _rtl92c_phy_rf6052_config_parafile

Message ID 1433512898-30137-1-git-send-email-ap420073@gmail.com (mailing list archive)
State Changes Requested
Delegated to: Kalle Valo
Headers show

Commit Message

Taehee Yoo June 5, 2015, 2:01 p.m. UTC
in the _rtl92c_phy_rf6052_config_parafile(), RF90_PATH_A and
RF90_PATH_B are same routine. so i remove one of these routine.
also the return routine is duplicated. so i remove it.

Signed-off-by: Taehee Yoo <ap420073@gmail.com>
---
 drivers/net/wireless/rtlwifi/rtl8192cu/rf.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Larry Finger June 5, 2015, 3:37 p.m. UTC | #1
On 06/05/2015 09:01 AM, Taehee Yoo wrote:
> in the _rtl92c_phy_rf6052_config_parafile(), RF90_PATH_A and
> RF90_PATH_B are same routine. so i remove one of these routine.
> also the return routine is duplicated. so i remove it.
>
> Signed-off-by: Taehee Yoo <ap420073@gmail.com>
> ---
>   drivers/net/wireless/rtlwifi/rtl8192cu/rf.c | 4 ----
>   1 file changed, 4 deletions(-)
>

The code changes are OK, but the commit message needs some work. The phrase 
"RF90_PATH_A and RF90_PATH_B are same routine" should be changed to "cases 
RF90_PATH_A and RF90_PATH_B call the same routine".

Larry

> diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c b/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c
> index b878d56..8ce055c 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c
> @@ -452,9 +452,6 @@ static bool _rtl92c_phy_rf6052_config_parafile(struct ieee80211_hw *hw)
>   		udelay(1);
>   		switch (rfpath) {
>   		case RF90_PATH_A:
> -			rtstatus = rtl92cu_phy_config_rf_with_headerfile(hw,
> -					(enum radio_path) rfpath);
> -			break;
>   		case RF90_PATH_B:
>   			rtstatus = rtl92cu_phy_config_rf_with_headerfile(hw,
>   					(enum radio_path) rfpath);
> @@ -483,7 +480,6 @@ static bool _rtl92c_phy_rf6052_config_parafile(struct ieee80211_hw *hw)
>   		}
>   	}
>   	RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, "<---\n");
> -	return rtstatus;
>   phy_rf_cfg_fail:
>   	return rtstatus;
>   }
>

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Taehee Yoo June 6, 2015, 4:57 a.m. UTC | #2
2015-06-06 0:37 GMT+09:00 Larry Finger <Larry.Finger@lwfinger.net>:
> On 06/05/2015 09:01 AM, Taehee Yoo wrote:
>>
>> in the _rtl92c_phy_rf6052_config_parafile(), RF90_PATH_A and
>> RF90_PATH_B are same routine. so i remove one of these routine.
>> also the return routine is duplicated. so i remove it.
>>
>> Signed-off-by: Taehee Yoo <ap420073@gmail.com>
>> ---
>>   drivers/net/wireless/rtlwifi/rtl8192cu/rf.c | 4 ----
>>   1 file changed, 4 deletions(-)
>>
>
> The code changes are OK, but the commit message needs some work. The phrase
> "RF90_PATH_A and RF90_PATH_B are same routine" should be changed to "cases
> RF90_PATH_A and RF90_PATH_B call the same routine".
>
> Larry
>
>
>> diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c
>> b/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c
>> index b878d56..8ce055c 100644
>> --- a/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c
>> +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c
>> @@ -452,9 +452,6 @@ static bool _rtl92c_phy_rf6052_config_parafile(struct
>> ieee80211_hw *hw)
>>                 udelay(1);
>>                 switch (rfpath) {
>>                 case RF90_PATH_A:
>> -                       rtstatus =
>> rtl92cu_phy_config_rf_with_headerfile(hw,
>> -                                       (enum radio_path) rfpath);
>> -                       break;
>>                 case RF90_PATH_B:
>>                         rtstatus =
>> rtl92cu_phy_config_rf_with_headerfile(hw,
>>                                         (enum radio_path) rfpath);
>> @@ -483,7 +480,6 @@ static bool _rtl92c_phy_rf6052_config_parafile(struct
>> ieee80211_hw *hw)
>>                 }
>>         }
>>         RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, "<---\n");
>> -       return rtstatus;
>>   phy_rf_cfg_fail:
>>         return rtstatus;
>>   }
>>
>


Thank you for your review!
I will resend a patch as V2.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c b/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c
index b878d56..8ce055c 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c
@@ -452,9 +452,6 @@  static bool _rtl92c_phy_rf6052_config_parafile(struct ieee80211_hw *hw)
 		udelay(1);
 		switch (rfpath) {
 		case RF90_PATH_A:
-			rtstatus = rtl92cu_phy_config_rf_with_headerfile(hw,
-					(enum radio_path) rfpath);
-			break;
 		case RF90_PATH_B:
 			rtstatus = rtl92cu_phy_config_rf_with_headerfile(hw,
 					(enum radio_path) rfpath);
@@ -483,7 +480,6 @@  static bool _rtl92c_phy_rf6052_config_parafile(struct ieee80211_hw *hw)
 		}
 	}
 	RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, "<---\n");
-	return rtstatus;
 phy_rf_cfg_fail:
 	return rtstatus;
 }