Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1632452 > unrolled thread

[PATCH 0/7] staging: rtl8732: Various checkpatch fixes

Started byJustin Vreeland <justin@jvreeland.com>
First post2017-04-28 02:20 +0200
Last post2017-04-28 12:00 +0200
Articles 9 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/7] staging: rtl8732: Various checkpatch fixes Justin Vreeland <justin@jvreeland.com> - 2017-04-28 02:20 +0200
    [PATCH 2/7] staging: rtl8723bs: Wrap multi-line macros in do-while loop Justin Vreeland <justin@jvreeland.com> - 2017-04-28 02:30 +0200
    [PATCH 7/7] staging: rtl8723bs: Do not use assignment in if condition Justin Vreeland <justin@jvreeland.com> - 2017-04-28 02:30 +0200
    [PATCH 4/7] staging: rtl8723bs: Move braces to same line as conditional Justin Vreeland <justin@jvreeland.com> - 2017-04-28 02:30 +0200
      Re: [PATCH 4/7] staging: rtl8723bs: Move braces to same line as  conditional Larry Finger <Larry.Finger@lwfinger.net> - 2017-04-28 02:30 +0200
        Re: [PATCH 4/7] staging: rtl8723bs: Move braces to same line as  conditional Joe Perches <joe@perches.com> - 2017-04-28 02:30 +0200
    [PATCH 6/7] staging: rtl8723bs: Fix spacing around '<' Justin Vreeland <justin@jvreeland.com> - 2017-04-28 02:30 +0200
    [PATCH 1/7] staging: rtl8723bs: Fix initialization of static variables Justin Vreeland <justin@jvreeland.com> - 2017-04-28 02:30 +0200
    Re: [PATCH 0/7] staging: rtl8732: Various checkpatch fixes Bastien Nocera <hadess@hadess.net> - 2017-04-28 12:00 +0200

#1632452 — [PATCH 0/7] staging: rtl8732: Various checkpatch fixes

FromJustin Vreeland <justin@jvreeland.com>
Date2017-04-28 02:20 +0200
Subject[PATCH 0/7] staging: rtl8732: Various checkpatch fixes
Message-ID<tB1ND-8at-3@gated-at.bofh.it>
Justin Vreeland (7):
  staging: rtl8723bs: Fix initialization of static variables
  staging: rtl8723bs: Wrap multi-line macros in do-while loop
  staging: rtl8723bs: Macros with complex values should be enclosed in
    parentheses
  staging: rtl8723bs: Move braces to same line as conditional
  staging: rtl8723bs: Fix pointer style
  staging: rtl8723bs: Fix spacing around '<'
  staging: rtl8723bs: Do not use assignment in if condition

 drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c |  8 +--
 drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.c |  4 +-
 drivers/staging/rtl8723bs/hal/hal_btcoex.c      |  2 +-
 drivers/staging/rtl8723bs/hal/odm.h             |  2 +-
 drivers/staging/rtl8723bs/hal/odm_DIG.c         |  2 +-
 drivers/staging/rtl8723bs/hal/odm_debug.h       | 80 ++++++++++++++-----------
 drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c | 15 ++---
 drivers/staging/rtl8723bs/hal/rtl8723b_rf6052.c |  9 +--
 drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c  | 17 +++---
 9 files changed, 69 insertions(+), 70 deletions(-)

-- 
2.12.2

[toc] | [next] | [standalone]


#1632453 — [PATCH 2/7] staging: rtl8723bs: Wrap multi-line macros in do-while loop

FromJustin Vreeland <justin@jvreeland.com>
Date2017-04-28 02:30 +0200
Subject[PATCH 2/7] staging: rtl8723bs: Wrap multi-line macros in do-while loop
Message-ID<tB1NE-8at-5@gated-at.bofh.it>
In reply to#1632452
Signed-off-by: Justin Vreeland <justin@jvreeland.com>
---
 drivers/staging/rtl8723bs/hal/odm_debug.h | 80 +++++++++++++++++--------------
 1 file changed, 44 insertions(+), 36 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/odm_debug.h b/drivers/staging/rtl8723bs/hal/odm_debug.h
index a89690ea6ba9..f720eafe46fe 100644
--- a/drivers/staging/rtl8723bs/hal/odm_debug.h
+++ b/drivers/staging/rtl8723bs/hal/odm_debug.h
@@ -105,51 +105,59 @@
 
 #if DBG
 #define ODM_RT_TRACE(pDM_Odm, comp, level, fmt)\
-	if (\
-		(comp & pDM_Odm->DebugComponents) &&\
-		(level <= pDM_Odm->DebugLevel || level == ODM_DBG_SERIOUS)\
-	) {\
-		RT_PRINTK fmt;\
-	}
+	do {\
+		if (\
+			(comp & pDM_Odm->DebugComponents) &&\
+			(level <= pDM_Odm->DebugLevel || level == ODM_DBG_SERIOUS)\
+		) {\
+			RT_PRINTK fmt;\
+		} \
+	} while (0)
 
 #define ODM_RT_TRACE_F(pDM_Odm, comp, level, fmt)\
-	if (\
-		(comp & pDM_Odm->DebugComponents) &&\
-		(level <= pDM_Odm->DebugLevel)\
-	) {\
-		RT_PRINTK fmt;\
-	}
+	do {\
+		if (\
+			(comp & pDM_Odm->DebugComponents) &&\
+			(level <= pDM_Odm->DebugLevel)\
+		) {\
+			RT_PRINTK fmt;\
+		} \
+	} while (0)
 
 #define ODM_RT_ASSERT(pDM_Odm, expr, fmt)\
-	if (!expr) {\
-		DbgPrint("Assertion failed! %s at ......\n", #expr);\
-		DbgPrint(\
-			"      ......%s,%s, line =%d\n",\
-			__FILE__,\
-			__func__,\
-			__LINE__\
-		);\
-		RT_PRINTK fmt;\
-		ASSERT(false);\
-	}
+	do {\
+		if (!expr) {\
+			DbgPrint("Assertion failed! %s at ......\n", #expr);\
+			DbgPrint(\
+				"      ......%s,%s, line =%d\n",\
+				__FILE__,\
+				__func__,\
+				__LINE__\
+			);\
+			RT_PRINTK fmt;\
+			ASSERT(false);\
+		} \
+	} while (0)
 #define ODM_dbg_enter() { DbgPrint("==> %s\n", __func__); }
 #define ODM_dbg_exit() { DbgPrint("<== %s\n", __func__); }
 #define ODM_dbg_trace(str) { DbgPrint("%s:%s\n", __func__, str); }
 
 #define ODM_PRINT_ADDR(pDM_Odm, comp, level, title_str, ptr)\
-	if (\
-		(comp & pDM_Odm->DebugComponents) &&\
-		(level <= pDM_Odm->DebugLevel)\
-	) {\
-		int __i;\
-		u8 *__ptr = (u8 *)ptr;\
-		DbgPrint("[ODM] ");\
-		DbgPrint(title_str);\
-		DbgPrint(" ");\
-		for (__i = 0; __i < 6; __i++)\
-			DbgPrint("%02X%s", __ptr[__i], (__i == 5) ? "" : "-");\
-		DbgPrint("\n");\
-	}
+	do {\
+		if (\
+			(comp & pDM_Odm->DebugComponents) &&\
+			(level <= pDM_Odm->DebugLevel)\
+		) {\
+			int __i;\
+			u8 *__ptr = (u8 *)ptr;\
+			DbgPrint("[ODM] ");\
+			DbgPrint(title_str);\
+			DbgPrint(" ");\
+			for (__i = 0; __i < 6; __i++)\
+				DbgPrint("%02X%s", __ptr[__i], (__i == 5) ? "" : "-");\
+			DbgPrint("\n");\
+		} \
+	} while (0)
 #else
 #define ODM_RT_TRACE(pDM_Odm, comp, level, fmt)
 #define ODM_RT_TRACE_F(pDM_Odm, comp, level, fmt)
-- 
2.12.2

[toc] | [prev] | [next] | [standalone]


#1632454 — [PATCH 7/7] staging: rtl8723bs: Do not use assignment in if condition

FromJustin Vreeland <justin@jvreeland.com>
Date2017-04-28 02:30 +0200
Subject[PATCH 7/7] staging: rtl8723bs: Do not use assignment in if condition
Message-ID<tB1Xk-8eA-1@gated-at.bofh.it>
In reply to#1632452
Signed-off-by: Justin Vreeland <justin@jvreeland.com>
---
 drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
index cc6eb32c5f71..c189eb575654 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
@@ -609,7 +609,8 @@ s32	rtl8723bs_hal_xmitframe_enqueue(
 	struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
 	s32 err;
 
-	if ((err = rtw_xmitframe_enqueue(padapter, pxmitframe)) != _SUCCESS) {
+	err = rtw_xmitframe_enqueue(padapter, pxmitframe);
+	if (err != _SUCCESS) {
 		rtw_free_xmitframe(pxmitpriv, pxmitframe);
 
 		pxmitpriv->tx_drop++;
-- 
2.12.2

[toc] | [prev] | [next] | [standalone]


#1632456 — [PATCH 4/7] staging: rtl8723bs: Move braces to same line as conditional

FromJustin Vreeland <justin@jvreeland.com>
Date2017-04-28 02:30 +0200
Subject[PATCH 4/7] staging: rtl8723bs: Move braces to same line as conditional
Message-ID<tB1Xk-8eA-3@gated-at.bofh.it>
In reply to#1632452
Signed-off-by: Justin Vreeland <justin@jvreeland.com>
---
 drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c | 15 +++++----------
 drivers/staging/rtl8723bs/hal/rtl8723b_rf6052.c |  9 +++------
 drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c  |  6 ++----
 3 files changed, 10 insertions(+), 20 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
index 28d1a229c3a6..2838d5cdd1de 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
@@ -385,8 +385,7 @@ s32 PHY_MACConfig8723B(struct adapter *Adapter)
 	/*  Config MAC */
 	/*  */
 	rtStatus = phy_ConfigMACWithParaFile(Adapter, pszMACRegFile);
-	if (rtStatus == _FAIL)
-	{
+	if (rtStatus == _FAIL) {
 		ODM_ConfigMACWithHeaderFile(&pHalData->odmpriv);
 		rtStatus = _SUCCESS;
 	}
@@ -459,8 +458,7 @@ static int phy_BB8723b_Config_ParaFile(struct adapter *Adapter)
 		Adapter->registrypriv.RegEnableTxPowerLimit == 1 ||
 		(Adapter->registrypriv.RegEnableTxPowerLimit == 2 && pHalData->EEPROMRegulatory == 1)
 	) {
-		if (PHY_ConfigRFWithPowerLimitTableParaFile(Adapter, pszRFTxPwrLmtFile) == _FAIL)
-		{
+		if (PHY_ConfigRFWithPowerLimitTableParaFile(Adapter, pszRFTxPwrLmtFile) == _FAIL) {
 			if (HAL_STATUS_SUCCESS != ODM_ConfigRFWithHeaderFile(&pHalData->odmpriv, CONFIG_RF_TXPWR_LMT, (ODM_RF_RADIO_PATH_E)0))
 				rtStatus = _FAIL;
 		}
@@ -474,8 +472,7 @@ static int phy_BB8723b_Config_ParaFile(struct adapter *Adapter)
 	/*  */
 	/*  1. Read PHY_REG.TXT BB INIT!! */
 	/*  */
-	if (phy_ConfigBBWithParaFile(Adapter, pszBBRegFile, CONFIG_BB_PHY_REG) == _FAIL)
-	{
+	if (phy_ConfigBBWithParaFile(Adapter, pszBBRegFile, CONFIG_BB_PHY_REG) == _FAIL) {
 		if (HAL_STATUS_SUCCESS != ODM_ConfigBBWithHeaderFile(&pHalData->odmpriv, CONFIG_BB_PHY_REG))
 			rtStatus = _FAIL;
 	}
@@ -491,8 +488,7 @@ static int phy_BB8723b_Config_ParaFile(struct adapter *Adapter)
 		Adapter->registrypriv.RegEnableTxPowerByRate == 1 ||
 		(Adapter->registrypriv.RegEnableTxPowerByRate == 2 && pHalData->EEPROMRegulatory != 2)
 	) {
-		if (phy_ConfigBBWithPgParaFile(Adapter, pszBBRegPgFile) == _FAIL)
-		{
+		if (phy_ConfigBBWithPgParaFile(Adapter, pszBBRegPgFile) == _FAIL) {
 			if (HAL_STATUS_SUCCESS != ODM_ConfigBBWithHeaderFile(&pHalData->odmpriv, CONFIG_BB_PHY_REG_PG))
 				rtStatus = _FAIL;
 		}
@@ -514,8 +510,7 @@ static int phy_BB8723b_Config_ParaFile(struct adapter *Adapter)
 	/*  */
 	/*  2. Read BB AGC table Initialization */
 	/*  */
-	if (phy_ConfigBBWithParaFile(Adapter, pszAGCTableFile, CONFIG_BB_AGC_TAB) == _FAIL)
-	{
+	if (phy_ConfigBBWithParaFile(Adapter, pszAGCTableFile, CONFIG_BB_AGC_TAB) == _FAIL) {
 		if (HAL_STATUS_SUCCESS != ODM_ConfigBBWithHeaderFile(&pHalData->odmpriv, CONFIG_BB_AGC_TAB))
 			rtStatus = _FAIL;
 	}
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_rf6052.c b/drivers/staging/rtl8723bs/hal/rtl8723b_rf6052.c
index 3a85d0cddfda..b2a31a174a7e 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_rf6052.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_rf6052.c
@@ -144,15 +144,13 @@ static int phy_RF6052_Config_ParaFile(struct adapter *Adapter)
 		/*----Initialize RF fom connfiguration file----*/
 		switch (eRFPath) {
 		case RF_PATH_A:
-			if (PHY_ConfigRFWithParaFile(Adapter, pszRadioAFile, eRFPath) == _FAIL)
-			{
+			if (PHY_ConfigRFWithParaFile(Adapter, pszRadioAFile, eRFPath) == _FAIL) {
 				if (HAL_STATUS_FAILURE == ODM_ConfigRFWithHeaderFile(&pHalData->odmpriv, CONFIG_RF_RADIO, (ODM_RF_RADIO_PATH_E)eRFPath))
 					rtStatus = _FAIL;
 			}
 			break;
 		case RF_PATH_B:
-			if (PHY_ConfigRFWithParaFile(Adapter, pszRadioBFile, eRFPath) == _FAIL)
-			{
+			if (PHY_ConfigRFWithParaFile(Adapter, pszRadioBFile, eRFPath) == _FAIL) {
 				if (HAL_STATUS_FAILURE == ODM_ConfigRFWithHeaderFile(&pHalData->odmpriv, CONFIG_RF_RADIO, (ODM_RF_RADIO_PATH_E)eRFPath))
 					rtStatus = _FAIL;
 			}
@@ -186,8 +184,7 @@ static int phy_RF6052_Config_ParaFile(struct adapter *Adapter)
 	/* 3 Configuration of Tx Power Tracking */
 	/* 3 ----------------------------------------------------------------- */
 
-	if (PHY_ConfigRFWithTxPwrTrackParaFile(Adapter, pszTxPwrTrackFile) == _FAIL)
-	{
+	if (PHY_ConfigRFWithTxPwrTrackParaFile(Adapter, pszTxPwrTrackFile) == _FAIL) {
 		ODM_ConfigRFWithTxPwrTrackHeaderFile(&pHalData->odmpriv);
 	}
 
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
index ca6ad9659b09..4f5e89f829b8 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
@@ -23,8 +23,7 @@ static u8 rtw_sdio_wait_enough_TxOQT_space(struct adapter *padapter, u8 agg_num)
 	u32 n = 0;
 	struct hal_com_data *pHalData = GET_HAL_DATA(padapter);
 
-	while (pHalData->SdioTxOQTFreeSpace < agg_num)
-	{
+	while (pHalData->SdioTxOQTFreeSpace < agg_num) {
 		if (
 			(padapter->bSurpriseRemoved == true) ||
 			(padapter->bDriverStopped == true)
@@ -400,8 +399,7 @@ static s32 xmit_xmitframes(struct adapter *padapter, struct xmit_priv *pxmitpriv
 				pxmitbuf->priv_data = NULL;
 				enqueue_pending_xmitbuf(pxmitpriv, pxmitbuf);
 				yield();
-			}
-			else
+			} else
 				rtw_free_xmitbuf(pxmitpriv, pxmitbuf);
 			pxmitbuf = NULL;
 		}
-- 
2.12.2

[toc] | [prev] | [next] | [standalone]


#1632457 — Re: [PATCH 4/7] staging: rtl8723bs: Move braces to same line as conditional

FromLarry Finger <Larry.Finger@lwfinger.net>
Date2017-04-28 02:30 +0200
SubjectRe: [PATCH 4/7] staging: rtl8723bs: Move braces to same line as conditional
Message-ID<tB1Xk-8eA-7@gated-at.bofh.it>
In reply to#1632456
On 04/27/2017 07:09 PM, Justin Vreeland wrote:
> Signed-off-by: Justin Vreeland <justin@jvreeland.com>
> ---
>  drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c | 15 +++++----------
>  drivers/staging/rtl8723bs/hal/rtl8723b_rf6052.c |  9 +++------
>  drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c  |  6 ++----
>  3 files changed, 10 insertions(+), 20 deletions(-)
>


Fix the over-long lines and add a commit message.

Larry

> diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
> index 28d1a229c3a6..2838d5cdd1de 100644
> --- a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
> +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
> @@ -385,8 +385,7 @@ s32 PHY_MACConfig8723B(struct adapter *Adapter)
>  	/*  Config MAC */
>  	/*  */
>  	rtStatus = phy_ConfigMACWithParaFile(Adapter, pszMACRegFile);
> -	if (rtStatus == _FAIL)
> -	{
> +	if (rtStatus == _FAIL) {
>  		ODM_ConfigMACWithHeaderFile(&pHalData->odmpriv);
>  		rtStatus = _SUCCESS;
>  	}
> @@ -459,8 +458,7 @@ static int phy_BB8723b_Config_ParaFile(struct adapter *Adapter)
>  		Adapter->registrypriv.RegEnableTxPowerLimit == 1 ||
>  		(Adapter->registrypriv.RegEnableTxPowerLimit == 2 && pHalData->EEPROMRegulatory == 1)
>  	) {
> -		if (PHY_ConfigRFWithPowerLimitTableParaFile(Adapter, pszRFTxPwrLmtFile) == _FAIL)
> -		{
> +		if (PHY_ConfigRFWithPowerLimitTableParaFile(Adapter, pszRFTxPwrLmtFile) == _FAIL) {
>  			if (HAL_STATUS_SUCCESS != ODM_ConfigRFWithHeaderFile(&pHalData->odmpriv, CONFIG_RF_TXPWR_LMT, (ODM_RF_RADIO_PATH_E)0))
>  				rtStatus = _FAIL;
>  		}
> @@ -474,8 +472,7 @@ static int phy_BB8723b_Config_ParaFile(struct adapter *Adapter)
>  	/*  */
>  	/*  1. Read PHY_REG.TXT BB INIT!! */
>  	/*  */
> -	if (phy_ConfigBBWithParaFile(Adapter, pszBBRegFile, CONFIG_BB_PHY_REG) == _FAIL)
> -	{
> +	if (phy_ConfigBBWithParaFile(Adapter, pszBBRegFile, CONFIG_BB_PHY_REG) == _FAIL) {
>  		if (HAL_STATUS_SUCCESS != ODM_ConfigBBWithHeaderFile(&pHalData->odmpriv, CONFIG_BB_PHY_REG))
>  			rtStatus = _FAIL;
>  	}
> @@ -491,8 +488,7 @@ static int phy_BB8723b_Config_ParaFile(struct adapter *Adapter)
>  		Adapter->registrypriv.RegEnableTxPowerByRate == 1 ||
>  		(Adapter->registrypriv.RegEnableTxPowerByRate == 2 && pHalData->EEPROMRegulatory != 2)
>  	) {
> -		if (phy_ConfigBBWithPgParaFile(Adapter, pszBBRegPgFile) == _FAIL)
> -		{
> +		if (phy_ConfigBBWithPgParaFile(Adapter, pszBBRegPgFile) == _FAIL) {
>  			if (HAL_STATUS_SUCCESS != ODM_ConfigBBWithHeaderFile(&pHalData->odmpriv, CONFIG_BB_PHY_REG_PG))
>  				rtStatus = _FAIL;
>  		}
> @@ -514,8 +510,7 @@ static int phy_BB8723b_Config_ParaFile(struct adapter *Adapter)
>  	/*  */
>  	/*  2. Read BB AGC table Initialization */
>  	/*  */
> -	if (phy_ConfigBBWithParaFile(Adapter, pszAGCTableFile, CONFIG_BB_AGC_TAB) == _FAIL)
> -	{
> +	if (phy_ConfigBBWithParaFile(Adapter, pszAGCTableFile, CONFIG_BB_AGC_TAB) == _FAIL) {
>  		if (HAL_STATUS_SUCCESS != ODM_ConfigBBWithHeaderFile(&pHalData->odmpriv, CONFIG_BB_AGC_TAB))
>  			rtStatus = _FAIL;
>  	}
> diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_rf6052.c b/drivers/staging/rtl8723bs/hal/rtl8723b_rf6052.c
> index 3a85d0cddfda..b2a31a174a7e 100644
> --- a/drivers/staging/rtl8723bs/hal/rtl8723b_rf6052.c
> +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_rf6052.c
> @@ -144,15 +144,13 @@ static int phy_RF6052_Config_ParaFile(struct adapter *Adapter)
>  		/*----Initialize RF fom connfiguration file----*/
>  		switch (eRFPath) {
>  		case RF_PATH_A:
> -			if (PHY_ConfigRFWithParaFile(Adapter, pszRadioAFile, eRFPath) == _FAIL)
> -			{
> +			if (PHY_ConfigRFWithParaFile(Adapter, pszRadioAFile, eRFPath) == _FAIL) {
>  				if (HAL_STATUS_FAILURE == ODM_ConfigRFWithHeaderFile(&pHalData->odmpriv, CONFIG_RF_RADIO, (ODM_RF_RADIO_PATH_E)eRFPath))
>  					rtStatus = _FAIL;
>  			}
>  			break;
>  		case RF_PATH_B:
> -			if (PHY_ConfigRFWithParaFile(Adapter, pszRadioBFile, eRFPath) == _FAIL)
> -			{
> +			if (PHY_ConfigRFWithParaFile(Adapter, pszRadioBFile, eRFPath) == _FAIL) {
>  				if (HAL_STATUS_FAILURE == ODM_ConfigRFWithHeaderFile(&pHalData->odmpriv, CONFIG_RF_RADIO, (ODM_RF_RADIO_PATH_E)eRFPath))
>  					rtStatus = _FAIL;
>  			}
> @@ -186,8 +184,7 @@ static int phy_RF6052_Config_ParaFile(struct adapter *Adapter)
>  	/* 3 Configuration of Tx Power Tracking */
>  	/* 3 ----------------------------------------------------------------- */
>
> -	if (PHY_ConfigRFWithTxPwrTrackParaFile(Adapter, pszTxPwrTrackFile) == _FAIL)
> -	{
> +	if (PHY_ConfigRFWithTxPwrTrackParaFile(Adapter, pszTxPwrTrackFile) == _FAIL) {
>  		ODM_ConfigRFWithTxPwrTrackHeaderFile(&pHalData->odmpriv);
>  	}
>
> diff --git a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
> index ca6ad9659b09..4f5e89f829b8 100644
> --- a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
> +++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
> @@ -23,8 +23,7 @@ static u8 rtw_sdio_wait_enough_TxOQT_space(struct adapter *padapter, u8 agg_num)
>  	u32 n = 0;
>  	struct hal_com_data *pHalData = GET_HAL_DATA(padapter);
>
> -	while (pHalData->SdioTxOQTFreeSpace < agg_num)
> -	{
> +	while (pHalData->SdioTxOQTFreeSpace < agg_num) {
>  		if (
>  			(padapter->bSurpriseRemoved == true) ||
>  			(padapter->bDriverStopped == true)
> @@ -400,8 +399,7 @@ static s32 xmit_xmitframes(struct adapter *padapter, struct xmit_priv *pxmitpriv
>  				pxmitbuf->priv_data = NULL;
>  				enqueue_pending_xmitbuf(pxmitpriv, pxmitbuf);
>  				yield();
> -			}
> -			else
> +			} else
>  				rtw_free_xmitbuf(pxmitpriv, pxmitbuf);
>  			pxmitbuf = NULL;
>  		}
>

[toc] | [prev] | [next] | [standalone]


#1632461 — Re: [PATCH 4/7] staging: rtl8723bs: Move braces to same line as conditional

FromJoe Perches <joe@perches.com>
Date2017-04-28 02:30 +0200
SubjectRe: [PATCH 4/7] staging: rtl8723bs: Move braces to same line as conditional
Message-ID<tB1Xk-8eA-17@gated-at.bofh.it>
In reply to#1632457
On Thu, 2017-04-27 at 19:22 -0500, Larry Finger wrote:
> On 04/27/2017 07:09 PM, Justin Vreeland wrote:
> > Signed-off-by: Justin Vreeland <justin@jvreeland.com>
> > ---
> >  drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c | 15 +++++----------
> >  drivers/staging/rtl8723bs/hal/rtl8723b_rf6052.c |  9 +++------
> >  drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c  |  6 ++----
[]
> Fix the over-long lines and add a commit message.

Lines with 35+ long identifiers should probably stay > 80 columns

> > diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
[]
> > @@ -459,8 +458,7 @@ static int phy_BB8723b_Config_ParaFile(struct adapter *Adapter)
> >  		Adapter->registrypriv.RegEnableTxPowerLimit == 1 ||
> >  		(Adapter->registrypriv.RegEnableTxPowerLimit == 2 && pHalData->EEPROMRegulatory == 1)
> >  	) {
> > -		if (PHY_ConfigRFWithPowerLimitTableParaFile(Adapter, pszRFTxPwrLmtFile) == _FAIL)
> > -		{
> > +		if (PHY_ConfigRFWithPowerLimitTableParaFile(Adapter, pszRFTxPwrLmtFile) == _FAIL) {
> >  			if (HAL_STATUS_SUCCESS != ODM_ConfigRFWithHeaderFile(&pHalData->odmpriv, CONFIG_RF_TXPWR_LMT, (ODM_RF_RADIO_PATH_E)0))
> >  				rtStatus = _FAIL;
> >  		}

[toc] | [prev] | [next] | [standalone]


#1632458 — [PATCH 6/7] staging: rtl8723bs: Fix spacing around '<'

FromJustin Vreeland <justin@jvreeland.com>
Date2017-04-28 02:30 +0200
Subject[PATCH 6/7] staging: rtl8723bs: Fix spacing around '<'
Message-ID<tB1Xk-8eA-9@gated-at.bofh.it>
In reply to#1632452
Signed-off-by: Justin Vreeland <justin@jvreeland.com>
---
 drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
index 991e3adcc42c..cc6eb32c5f71 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c
@@ -230,7 +230,7 @@ static s32 xmit_xmitframes(struct adapter *padapter, struct xmit_priv *pxmitpriv
 	pxmitbuf = NULL;
 
 	if (padapter->registrypriv.wifi_spec == 1) {
-		for (idx = 0; idx<4; idx++)
+		for (idx = 0; idx < 4; idx++)
 			inx[idx] = pxmitpriv->wmm_para_seq[idx];
 	} else {
 		inx[0] = 0;
-- 
2.12.2

[toc] | [prev] | [next] | [standalone]


#1632460 — [PATCH 1/7] staging: rtl8723bs: Fix initialization of static variables

FromJustin Vreeland <justin@jvreeland.com>
Date2017-04-28 02:30 +0200
Subject[PATCH 1/7] staging: rtl8723bs: Fix initialization of static variables
Message-ID<tB1Xk-8eA-13@gated-at.bofh.it>
In reply to#1632452
Do not initialize static to 0
Do not initialize static to false

Signed-off-by: Justin Vreeland <justin@jvreeland.com>
---
 drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c | 8 ++++----
 drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.c | 4 ++--
 drivers/staging/rtl8723bs/hal/hal_btcoex.c      | 2 +-
 drivers/staging/rtl8723bs/hal/odm_DIG.c         | 2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c b/drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c
index 86040adb436c..37f42bfc55ed 100644
--- a/drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c
+++ b/drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c
@@ -404,7 +404,7 @@ static void halbtc8723b1ant_MonitorWiFiCtr(PBTC_COEXIST pBtCoexist)
 {
 	s32	wifiRssi = 0;
 	bool bWifiBusy = false, bWifiUnderBMode = false;
-	static u8 nCCKLockCounter = 0;
+	static u8 nCCKLockCounter;
 
 	pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_BUSY, &bWifiBusy);
 	pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_S4_WIFI_RSSI, &wifiRssi);
@@ -488,7 +488,7 @@ static void halbtc8723b1ant_MonitorWiFiCtr(PBTC_COEXIST pBtCoexist)
 
 static bool halbtc8723b1ant_IsWifiStatusChanged(PBTC_COEXIST pBtCoexist)
 {
-	static bool	bPreWifiBusy = false, bPreUnder4way = false, bPreBtHsOn = false;
+	static bool	bPreWifiBusy, bPreUnder4way, bPreBtHsOn;
 	bool bWifiBusy = false, bUnder4way = false, bBtHsOn = false;
 	bool bWifiConnected = false;
 
@@ -2754,7 +2754,7 @@ void EXhalbtc8723b1ant_DisplayCoexInfo(PBTC_COEXIST pBtCoexist)
 	u32 wifiBw, wifiTrafficDir, faOfdm, faCck, wifiLinkStatus;
 	u8 wifiDot11Chnl, wifiHsChnl;
 	u32 fwVer = 0, btPatchVer = 0;
-	static u8 PopReportIn10s = 0;
+	static u8 PopReportIn10s;
 
 	CL_SPRINTF(
 		cliBuf,
@@ -3751,7 +3751,7 @@ void EXhalbtc8723b1ant_PnpNotify(PBTC_COEXIST pBtCoexist, u8 pnpState)
 
 void EXhalbtc8723b1ant_Periodical(PBTC_COEXIST pBtCoexist)
 {
-	static u8 disVerInfoCnt = 0;
+	static u8 disVerInfoCnt;
 	u32 fwVer = 0, btPatchVer = 0;
 
 	BTC_PRINT(BTC_MSG_ALGORITHM, ALGO_TRACE, ("[BTCoex], ==========================Periodical ===========================\n"));
diff --git a/drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.c b/drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.c
index f5bc511d02f2..33610d39333f 100644
--- a/drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.c
+++ b/drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.c
@@ -282,7 +282,7 @@ static void halbtc8723b2ant_QueryBtInfo(PBTC_COEXIST pBtCoexist)
 
 static bool halbtc8723b2ant_IsWifiStatusChanged(PBTC_COEXIST pBtCoexist)
 {
-	static bool	bPreWifiBusy = false, bPreUnder4way = false, bPreBtHsOn = false;
+	static bool	bPreWifiBusy, bPreUnder4way, bPreBtHsOn;
 	bool bWifiBusy = false, bUnder4way = false, bBtHsOn = false;
 	bool bWifiConnected = false;
 
@@ -3706,7 +3706,7 @@ void EXhalbtc8723b2ant_PnpNotify(PBTC_COEXIST pBtCoexist, u8 pnpState)
 
 void EXhalbtc8723b2ant_Periodical(PBTC_COEXIST pBtCoexist)
 {
-	static u8 disVerInfoCnt = 0;
+	static u8 disVerInfoCnt;
 	u32 fwVer = 0, btPatchVer = 0;
 
 	BTC_PRINT(BTC_MSG_ALGORITHM, ALGO_TRACE, ("[BTCoex], ==========================Periodical ===========================\n"));
diff --git a/drivers/staging/rtl8723bs/hal/hal_btcoex.c b/drivers/staging/rtl8723bs/hal/hal_btcoex.c
index cc7e0903ee9d..9e08a4de4895 100644
--- a/drivers/staging/rtl8723bs/hal/hal_btcoex.c
+++ b/drivers/staging/rtl8723bs/hal/hal_btcoex.c
@@ -385,7 +385,7 @@ static s32 halbtcoutsrc_GetWifiRssi(struct adapter *padapter)
 static u8 halbtcoutsrc_GetWifiScanAPNum(struct adapter *padapter)
 {
 	struct mlme_ext_priv *pmlmeext;
-	static u8 scan_AP_num = 0;
+	static u8 scan_AP_num;
 
 	pmlmeext = &padapter->mlmeextpriv;
 
diff --git a/drivers/staging/rtl8723bs/hal/odm_DIG.c b/drivers/staging/rtl8723bs/hal/odm_DIG.c
index ba8e8eb534ef..202c52f488ae 100644
--- a/drivers/staging/rtl8723bs/hal/odm_DIG.c
+++ b/drivers/staging/rtl8723bs/hal/odm_DIG.c
@@ -372,7 +372,7 @@ void odm_PauseDIG(
 {
 	PDM_ODM_T pDM_Odm = (PDM_ODM_T)pDM_VOID;
 	pDIG_T pDM_DigTable = &pDM_Odm->DM_DigTable;
-	static bool bPaused = false;
+	static bool bPaused;
 
 	ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_PauseDIG() =========>\n"));
 
-- 
2.12.2

[toc] | [prev] | [next] | [standalone]


#1632751

FromBastien Nocera <hadess@hadess.net>
Date2017-04-28 12:00 +0200
Message-ID<tBaQW-5Cr-19@gated-at.bofh.it>
In reply to#1632452
On Thu, 2017-04-27 at 18:09 -0600, Justin Vreeland wrote:
> Justin Vreeland (7):
> <snip>
>   staging: rtl8723bs: Fix pointer style
>   staging: rtl8723bs: Fix spacing around '<'
>   staging: rtl8723bs: Do not use assignment in if condition

You can add:
Reviewed-By: Bastien Nocera <hadess@hadess.net>

To those last 3 patches.

Cheers

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web