All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] staging: rtlwifi: Remove unnecessary functions
@ 2018-10-25  1:16 Maya Nakamura
  2018-10-25  1:17 ` [PATCH 1/3] staging: rtlwifi: Remove function that only returns the second argument Maya Nakamura
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Maya Nakamura @ 2018-10-25  1:16 UTC (permalink / raw)
  To: gregkh, outreachy-kernel

This patchset removes functions that only return zero or the second
argument. It also removes the functions that are not used at all.

Maya Nakamura (3):
  staging: rtlwifi: Remove function that only returns the second
    argument
  staging: rtlwifi: Remove function that only returns zero
  staging: rtlwifi: Remove unused functions

 .../staging/rtlwifi/phydm/phydm_hwconfig.c    | 73 ++-----------------
 .../staging/rtlwifi/phydm/phydm_hwconfig.h    | 12 ---
 2 files changed, 6 insertions(+), 79 deletions(-)

-- 
2.17.1



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/3] staging: rtlwifi: Remove function that only returns the second argument
  2018-10-25  1:16 [PATCH 0/3] staging: rtlwifi: Remove unnecessary functions Maya Nakamura
@ 2018-10-25  1:17 ` Maya Nakamura
  2018-10-25 14:29   ` [Outreachy kernel] " Julia Lawall
  2018-10-25  1:18 ` [PATCH 2/3] staging: rtlwifi: Remove function that only returns zero Maya Nakamura
  2018-10-25  1:19 ` [PATCH 3/3] staging: rtlwifi: Remove unused functions Maya Nakamura
  2 siblings, 1 reply; 7+ messages in thread
From: Maya Nakamura @ 2018-10-25  1:17 UTC (permalink / raw)
  To: gregkh, outreachy-kernel

Because the odm_signal_scale_mapping function is only called to return the
second argument, remove the unnecessary function and change five
statements that call it.

Signed-off-by: Maya Nakamura <m.maya.nakamura@gmail.com>
---
 .../staging/rtlwifi/phydm/phydm_hwconfig.c    | 27 ++++---------------
 .../staging/rtlwifi/phydm/phydm_hwconfig.h    |  2 --
 2 files changed, 5 insertions(+), 24 deletions(-)

diff --git a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
index 4bf86e5a451f..fd208581d857 100644
--- a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
+++ b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
@@ -477,18 +477,6 @@ static u8 odm_query_rx_pwr_percentage(s8 ant_power)
 		return 100 + ant_power;
 }
 
-/*
- * 2012/01/12 MH MOve some signal strength smooth method to MP HAL layer.
- * IF other SW team do not support the feature, remove this section.??
- */
-
-s32 odm_signal_scale_mapping(struct phy_dm_struct *dm, s32 curr_sig)
-{
-	{
-		return curr_sig;
-	}
-}
-
 static u8 odm_sq_process_patch_rt_cid_819x_lenovo(struct phy_dm_struct *dm,
 						  u8 is_cck_rate, u8 pwdb_all,
 						  u8 path, u8 RSSI)
@@ -749,13 +737,11 @@ static void odm_rx_phy_status92c_series_parsing(
 	 */
 	/* It is assigned to the BSS List in GetValueFromBeaconOrProbeRsp(). */
 	if (is_cck_rate) {
-		phy_info->signal_strength = (u8)(
-			odm_signal_scale_mapping(dm, pwdb_all)); /*pwdb_all;*/
+		phy_info->signal_strength = (u8)pwdb_all;
 	} else {
 		if (rf_rx_num != 0) {
 			phy_info->signal_strength =
-				(u8)(odm_signal_scale_mapping(dm, total_rssi /=
-								  rf_rx_num));
+				(u8)(total_rssi /= rf_rx_num);
 		}
 	}
 
@@ -1051,8 +1037,7 @@ static void odm_rx_phy_status_jaguar_series_parsing(
 	 */
 	/*It is assigned to the BSS List in GetValueFromBeaconOrProbeRsp().*/
 	if (is_cck_rate) {
-		phy_info->signal_strength = (u8)(
-			odm_signal_scale_mapping(dm, pwdb_all)); /*pwdb_all;*/
+		phy_info->signal_strength = (u8)pwdb_all;
 	} else {
 		if (rf_rx_num != 0) {
 			/* 2015/01 Sean, use the best two RSSI only,
@@ -1062,8 +1047,7 @@ static void odm_rx_phy_status_jaguar_series_parsing(
 				avg_rssi = best_rssi;
 			else
 				avg_rssi = (best_rssi + second_rssi) / 2;
-			phy_info->signal_strength =
-				(u8)(odm_signal_scale_mapping(dm, avg_rssi));
+			phy_info->signal_strength = (u8)avg_rssi;
 		}
 	}
 	dm->rx_pwdb_ave = dm->rx_pwdb_ave + phy_info->rx_pwdb_all;
@@ -1874,8 +1858,7 @@ void phydm_rx_phy_status_new_type(struct phy_dm_struct *phydm, u8 *phy_status,
 	/* Update signal strength to UI, and phy_info->rx_pwdb_all is the
 	 * maximum RSSI of all path
 	 */
-	phy_info->signal_strength =
-		(u8)(odm_signal_scale_mapping(phydm, phy_info->rx_pwdb_all));
+	phy_info->signal_strength = (u8)phy_info->rx_pwdb_all;
 
 	/* Calculate average RSSI and smoothed RSSI */
 	phydm_process_rssi_for_dm_new_type(phydm, phy_info, pktinfo);
diff --git a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.h b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.h
index 6ad5e0292a97..c9833889688c 100644
--- a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.h
+++ b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.h
@@ -216,8 +216,6 @@ odm_config_fw_with_header_file(struct phy_dm_struct *dm,
 
 u32 odm_get_hw_img_version(struct phy_dm_struct *dm);
 
-s32 odm_signal_scale_mapping(struct phy_dm_struct *dm, s32 curr_sig);
-
 /*For 8822B only!! need to move to FW finally */
 /*==============================================*/
 void phydm_rx_phy_status_new_type(struct phy_dm_struct *phydm, u8 *phy_status,
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/3] staging: rtlwifi: Remove function that only returns zero
  2018-10-25  1:16 [PATCH 0/3] staging: rtlwifi: Remove unnecessary functions Maya Nakamura
  2018-10-25  1:17 ` [PATCH 1/3] staging: rtlwifi: Remove function that only returns the second argument Maya Nakamura
@ 2018-10-25  1:18 ` Maya Nakamura
  2018-10-25 14:24   ` [Outreachy kernel] " Julia Lawall
  2018-10-25  1:19 ` [PATCH 3/3] staging: rtlwifi: Remove unused functions Maya Nakamura
  2 siblings, 1 reply; 7+ messages in thread
From: Maya Nakamura @ 2018-10-25  1:18 UTC (permalink / raw)
  To: gregkh, outreachy-kernel

Because the odm_sq_process_patch_rt_cid_819x_lenovo function is only
called to return zero, remove the unnecessary function and change one
statement that calls it. Issue found by Coccinelle's semantic patch
results for returnvar.cocci.

Signed-off-by: Maya Nakamura <m.maya.nakamura@gmail.com>
---
 drivers/staging/rtlwifi/phydm/phydm_hwconfig.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
index fd208581d857..335a435caa2c 100644
--- a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
+++ b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
@@ -477,14 +477,6 @@ static u8 odm_query_rx_pwr_percentage(s8 ant_power)
 		return 100 + ant_power;
 }
 
-static u8 odm_sq_process_patch_rt_cid_819x_lenovo(struct phy_dm_struct *dm,
-						  u8 is_cck_rate, u8 pwdb_all,
-						  u8 path, u8 RSSI)
-{
-	u8 sq = 0;
-	return sq;
-}
-
 static u8 odm_evm_db_to_percentage(s8 value)
 {
 	/* -33dB~0dB to 0%~99% */
@@ -891,8 +883,7 @@ static void odm_rx_phy_status_jaguar_series_parsing(
 
 			if ((dm->support_platform == ODM_WIN) &&
 			    (dm->patch_id == RT_CID_819X_LENOVO))
-				sq = odm_sq_process_patch_rt_cid_819x_lenovo(
-					dm, is_cck_rate, pwdb_all, 0, 0);
+				sq = 0;
 			else
 				sq = phydm_get_signal_quality_8812(phy_info, dm,
 								   phy_sta_rpt);
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/3] staging: rtlwifi: Remove unused functions
  2018-10-25  1:16 [PATCH 0/3] staging: rtlwifi: Remove unnecessary functions Maya Nakamura
  2018-10-25  1:17 ` [PATCH 1/3] staging: rtlwifi: Remove function that only returns the second argument Maya Nakamura
  2018-10-25  1:18 ` [PATCH 2/3] staging: rtlwifi: Remove function that only returns zero Maya Nakamura
@ 2018-10-25  1:19 ` Maya Nakamura
  2 siblings, 0 replies; 7+ messages in thread
From: Maya Nakamura @ 2018-10-25  1:19 UTC (permalink / raw)
  To: gregkh, outreachy-kernel

Remove the five functions that are not used from the source and header
files. Issue found by Coccinelle's semantic patch results for
returnvar.cocci.

Signed-off-by: Maya Nakamura <m.maya.nakamura@gmail.com>
---
 .../staging/rtlwifi/phydm/phydm_hwconfig.c    | 35 -------------------
 .../staging/rtlwifi/phydm/phydm_hwconfig.h    | 10 ------
 2 files changed, 45 deletions(-)

diff --git a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
index 335a435caa2c..397352de46bc 100644
--- a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
+++ b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
@@ -1854,38 +1854,3 @@ void phydm_rx_phy_status_new_type(struct phy_dm_struct *phydm, u8 *phy_status,
 	/* Calculate average RSSI and smoothed RSSI */
 	phydm_process_rssi_for_dm_new_type(phydm, phy_info, pktinfo);
 }
-
-u32 query_phydm_trx_capability(struct phy_dm_struct *dm)
-{
-	u32 value32 = 0xFFFFFFFF;
-
-	return value32;
-}
-
-u32 query_phydm_stbc_capability(struct phy_dm_struct *dm)
-{
-	u32 value32 = 0xFFFFFFFF;
-
-	return value32;
-}
-
-u32 query_phydm_ldpc_capability(struct phy_dm_struct *dm)
-{
-	u32 value32 = 0xFFFFFFFF;
-
-	return value32;
-}
-
-u32 query_phydm_txbf_parameters(struct phy_dm_struct *dm)
-{
-	u32 value32 = 0xFFFFFFFF;
-
-	return value32;
-}
-
-u32 query_phydm_txbf_capability(struct phy_dm_struct *dm)
-{
-	u32 value32 = 0xFFFFFFFF;
-
-	return value32;
-}
diff --git a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.h b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.h
index c9833889688c..ee4b9f0af2a1 100644
--- a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.h
+++ b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.h
@@ -484,14 +484,4 @@ struct phy_status_rpt_jaguar2_type2 {
 #endif
 };
 
-u32 query_phydm_trx_capability(struct phy_dm_struct *dm);
-
-u32 query_phydm_stbc_capability(struct phy_dm_struct *dm);
-
-u32 query_phydm_ldpc_capability(struct phy_dm_struct *dm);
-
-u32 query_phydm_txbf_parameters(struct phy_dm_struct *dm);
-
-u32 query_phydm_txbf_capability(struct phy_dm_struct *dm);
-
 #endif /*#ifndef	__HALHWOUTSRC_H__*/
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [Outreachy kernel] [PATCH 2/3] staging: rtlwifi: Remove function that only returns zero
  2018-10-25  1:18 ` [PATCH 2/3] staging: rtlwifi: Remove function that only returns zero Maya Nakamura
@ 2018-10-25 14:24   ` Julia Lawall
  2018-10-26  0:34     ` Maya Nakamura
  0 siblings, 1 reply; 7+ messages in thread
From: Julia Lawall @ 2018-10-25 14:24 UTC (permalink / raw)
  To: Maya Nakamura; +Cc: gregkh, outreachy-kernel



On Wed, 24 Oct 2018, Maya Nakamura wrote:

> Because the odm_sq_process_patch_rt_cid_819x_lenovo function is only
> called to return zero, remove the unnecessary function and change one
> statement that calls it. Issue found by Coccinelle's semantic patch
> results for returnvar.cocci.
>
> Signed-off-by: Maya Nakamura <m.maya.nakamura@gmail.com>
> ---
>  drivers/staging/rtlwifi/phydm/phydm_hwconfig.c | 11 +----------
>  1 file changed, 1 insertion(+), 10 deletions(-)
>
> diff --git a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
> index fd208581d857..335a435caa2c 100644
> --- a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
> +++ b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
> @@ -477,14 +477,6 @@ static u8 odm_query_rx_pwr_percentage(s8 ant_power)
>  		return 100 + ant_power;
>  }
>
> -static u8 odm_sq_process_patch_rt_cid_819x_lenovo(struct phy_dm_struct *dm,
> -						  u8 is_cck_rate, u8 pwdb_all,
> -						  u8 path, u8 RSSI)
> -{
> -	u8 sq = 0;
> -	return sq;
> -}
> -
>  static u8 odm_evm_db_to_percentage(s8 value)
>  {
>  	/* -33dB~0dB to 0%~99% */
> @@ -891,8 +883,7 @@ static void odm_rx_phy_status_jaguar_series_parsing(
>
>  			if ((dm->support_platform == ODM_WIN) &&
>  			    (dm->patch_id == RT_CID_819X_LENOVO))
> -				sq = odm_sq_process_patch_rt_cid_819x_lenovo(
> -					dm, is_cck_rate, pwdb_all, 0, 0);
> +				sq = 0;
>  			else
>  				sq = phydm_get_signal_quality_8812(phy_info, dm,
>  								   phy_sta_rpt);

Would it be better to just put u8 sq = 0; ?  Then you could negate the
condition and drop one of the branches.

julia


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Outreachy kernel] [PATCH 1/3] staging: rtlwifi: Remove function that only returns the second argument
  2018-10-25  1:17 ` [PATCH 1/3] staging: rtlwifi: Remove function that only returns the second argument Maya Nakamura
@ 2018-10-25 14:29   ` Julia Lawall
  0 siblings, 0 replies; 7+ messages in thread
From: Julia Lawall @ 2018-10-25 14:29 UTC (permalink / raw)
  To: Maya Nakamura; +Cc: gregkh, outreachy-kernel



On Wed, 24 Oct 2018, Maya Nakamura wrote:

> Because the odm_signal_scale_mapping function is only called to return the
> second argument, remove the unnecessary function and change five
> statements that call it.
>
> Signed-off-by: Maya Nakamura <m.maya.nakamura@gmail.com>
> ---
>  .../staging/rtlwifi/phydm/phydm_hwconfig.c    | 27 ++++---------------
>  .../staging/rtlwifi/phydm/phydm_hwconfig.h    |  2 --
>  2 files changed, 5 insertions(+), 24 deletions(-)
>
> diff --git a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
> index 4bf86e5a451f..fd208581d857 100644
> --- a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
> +++ b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
> @@ -477,18 +477,6 @@ static u8 odm_query_rx_pwr_percentage(s8 ant_power)
>  		return 100 + ant_power;
>  }
>
> -/*
> - * 2012/01/12 MH MOve some signal strength smooth method to MP HAL layer.
> - * IF other SW team do not support the feature, remove this section.??
> - */
> -
> -s32 odm_signal_scale_mapping(struct phy_dm_struct *dm, s32 curr_sig)
> -{
> -	{
> -		return curr_sig;
> -	}
> -}
> -
>  static u8 odm_sq_process_patch_rt_cid_819x_lenovo(struct phy_dm_struct *dm,
>  						  u8 is_cck_rate, u8 pwdb_all,
>  						  u8 path, u8 RSSI)
> @@ -749,13 +737,11 @@ static void odm_rx_phy_status92c_series_parsing(
>  	 */
>  	/* It is assigned to the BSS List in GetValueFromBeaconOrProbeRsp(). */
>  	if (is_cck_rate) {
> -		phy_info->signal_strength = (u8)(
> -			odm_signal_scale_mapping(dm, pwdb_all)); /*pwdb_all;*/
> +		phy_info->signal_strength = (u8)pwdb_all;

pwdb_all was already a u8 value.  The original code was taking a u8 value,
casting it to s32 and then casting it back to u8.  It would be good to
explain whether this can have an impact.  The comment on the
signal_strength structure field says that the value should be between 0
and 100.

julia

>  	} else {
>  		if (rf_rx_num != 0) {
>  			phy_info->signal_strength =
> -				(u8)(odm_signal_scale_mapping(dm, total_rssi /=
> -								  rf_rx_num));
> +				(u8)(total_rssi /= rf_rx_num);
>  		}
>  	}
>
> @@ -1051,8 +1037,7 @@ static void odm_rx_phy_status_jaguar_series_parsing(
>  	 */
>  	/*It is assigned to the BSS List in GetValueFromBeaconOrProbeRsp().*/
>  	if (is_cck_rate) {
> -		phy_info->signal_strength = (u8)(
> -			odm_signal_scale_mapping(dm, pwdb_all)); /*pwdb_all;*/
> +		phy_info->signal_strength = (u8)pwdb_all;
>  	} else {
>  		if (rf_rx_num != 0) {
>  			/* 2015/01 Sean, use the best two RSSI only,
> @@ -1062,8 +1047,7 @@ static void odm_rx_phy_status_jaguar_series_parsing(
>  				avg_rssi = best_rssi;
>  			else
>  				avg_rssi = (best_rssi + second_rssi) / 2;
> -			phy_info->signal_strength =
> -				(u8)(odm_signal_scale_mapping(dm, avg_rssi));
> +			phy_info->signal_strength = (u8)avg_rssi;
>  		}
>  	}
>  	dm->rx_pwdb_ave = dm->rx_pwdb_ave + phy_info->rx_pwdb_all;
> @@ -1874,8 +1858,7 @@ void phydm_rx_phy_status_new_type(struct phy_dm_struct *phydm, u8 *phy_status,
>  	/* Update signal strength to UI, and phy_info->rx_pwdb_all is the
>  	 * maximum RSSI of all path
>  	 */
> -	phy_info->signal_strength =
> -		(u8)(odm_signal_scale_mapping(phydm, phy_info->rx_pwdb_all));
> +	phy_info->signal_strength = (u8)phy_info->rx_pwdb_all;
>
>  	/* Calculate average RSSI and smoothed RSSI */
>  	phydm_process_rssi_for_dm_new_type(phydm, phy_info, pktinfo);
> diff --git a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.h b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.h
> index 6ad5e0292a97..c9833889688c 100644
> --- a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.h
> +++ b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.h
> @@ -216,8 +216,6 @@ odm_config_fw_with_header_file(struct phy_dm_struct *dm,
>
>  u32 odm_get_hw_img_version(struct phy_dm_struct *dm);
>
> -s32 odm_signal_scale_mapping(struct phy_dm_struct *dm, s32 curr_sig);
> -
>  /*For 8822B only!! need to move to FW finally */
>  /*==============================================*/
>  void phydm_rx_phy_status_new_type(struct phy_dm_struct *phydm, u8 *phy_status,
> --
> 2.17.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/0140568914059cf5d16dfd298964983ab3ca1f28.1540428705.git.m.maya.nakamura%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Outreachy kernel] [PATCH 2/3] staging: rtlwifi: Remove function that only returns zero
  2018-10-25 14:24   ` [Outreachy kernel] " Julia Lawall
@ 2018-10-26  0:34     ` Maya Nakamura
  0 siblings, 0 replies; 7+ messages in thread
From: Maya Nakamura @ 2018-10-26  0:34 UTC (permalink / raw)
  To: Julia Lawall; +Cc: gregkh, outreachy-kernel

On Thu, Oct 25, 2018 at 03:24:32PM +0100, Julia Lawall wrote:
> 
> 
> On Wed, 24 Oct 2018, Maya Nakamura wrote:
> 
> > Because the odm_sq_process_patch_rt_cid_819x_lenovo function is only
> > called to return zero, remove the unnecessary function and change one
> > statement that calls it. Issue found by Coccinelle's semantic patch
> > results for returnvar.cocci.
> >
> > Signed-off-by: Maya Nakamura <m.maya.nakamura@gmail.com>
> > ---
> >  drivers/staging/rtlwifi/phydm/phydm_hwconfig.c | 11 +----------
> >  1 file changed, 1 insertion(+), 10 deletions(-)
> >
> > diff --git a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
> > index fd208581d857..335a435caa2c 100644
> > --- a/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
> > +++ b/drivers/staging/rtlwifi/phydm/phydm_hwconfig.c
> > @@ -477,14 +477,6 @@ static u8 odm_query_rx_pwr_percentage(s8 ant_power)
> >  		return 100 + ant_power;
> >  }
> >
> > -static u8 odm_sq_process_patch_rt_cid_819x_lenovo(struct phy_dm_struct *dm,
> > -						  u8 is_cck_rate, u8 pwdb_all,
> > -						  u8 path, u8 RSSI)
> > -{
> > -	u8 sq = 0;
> > -	return sq;
> > -}
> > -
> >  static u8 odm_evm_db_to_percentage(s8 value)
> >  {
> >  	/* -33dB~0dB to 0%~99% */
> > @@ -891,8 +883,7 @@ static void odm_rx_phy_status_jaguar_series_parsing(
> >
> >  			if ((dm->support_platform == ODM_WIN) &&
> >  			    (dm->patch_id == RT_CID_819X_LENOVO))
> > -				sq = odm_sq_process_patch_rt_cid_819x_lenovo(
> > -					dm, is_cck_rate, pwdb_all, 0, 0);
> > +				sq = 0;
> >  			else
> >  				sq = phydm_get_signal_quality_8812(phy_info, dm,
> >  								   phy_sta_rpt);
> 
> Would it be better to just put u8 sq = 0; ?  Then you could negate the
> condition and drop one of the branches.
> 
> julia

Thank you for teaching me, Julia! I will try to change this and the
other (1/3) and resubmit the set.

Maya

> -- 
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/alpine.DEB.2.21.1810251523520.2363%40hadrien.
> For more options, visit https://groups.google.com/d/optout.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-10-26  0:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-25  1:16 [PATCH 0/3] staging: rtlwifi: Remove unnecessary functions Maya Nakamura
2018-10-25  1:17 ` [PATCH 1/3] staging: rtlwifi: Remove function that only returns the second argument Maya Nakamura
2018-10-25 14:29   ` [Outreachy kernel] " Julia Lawall
2018-10-25  1:18 ` [PATCH 2/3] staging: rtlwifi: Remove function that only returns zero Maya Nakamura
2018-10-25 14:24   ` [Outreachy kernel] " Julia Lawall
2018-10-26  0:34     ` Maya Nakamura
2018-10-25  1:19 ` [PATCH 3/3] staging: rtlwifi: Remove unused functions Maya Nakamura

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.