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


Groups > linux.kernel > #1634058 > unrolled thread

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

Started byJustin Vreeland <justin@jvreeland.com>
First post2017-05-02 03:00 +0200
Last post2017-05-06 11:40 +0200
Articles 5 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v2 4/7] staging: rtl8723bs: Move braces to same line as conditional Justin Vreeland <justin@jvreeland.com> - 2017-05-02 03:00 +0200
    Re: [PATCH v2 4/7] staging: rtl8723bs: Move braces to same line as  conditional Bastien Nocera <hadess@hadess.net> - 2017-05-04 14:00 +0200
      Re: [PATCH v2 4/7] staging: rtl8723bs: Move braces to same line as conditional Justin Vreeland <justin@jvreeland.com> - 2017-05-06 00:10 +0200
      Re: [PATCH v2 4/7] staging: rtl8723bs: Move braces to same line as conditional Justin Vreeland <justin@jvreeland.com> - 2017-05-06 00:20 +0200
        Re: [PATCH v2 4/7] staging: rtl8723bs: Move braces to same line as  conditional Bastien Nocera <hadess@hadess.net> - 2017-05-06 11:40 +0200

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

FromJustin Vreeland <justin@jvreeland.com>
Date2017-05-02 03:00 +0200
Subject[PATCH v2 4/7] staging: rtl8723bs: Move braces to same line as conditional
Message-ID<tCuky-7Ii-13@gated-at.bofh.it>
Ensure checkpatch compliance

Signed-off-by: Justin Vreeland <justin@jvreeland.com>
---
v2:
  - Added commit message
  - Fixed overly long lines

 drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c | 18 ++++++++----------
 drivers/staging/rtl8723bs/hal/rtl8723b_rf6052.c | 12 ++++++------
 drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c  |  9 ++++-----
 3 files changed, 18 insertions(+), 21 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
index 28d1a229c3a6..21ec890fd60c 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,8 @@ 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 +489,8 @@ 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 +512,8 @@ 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..a71b552eca9a 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_rf6052.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_rf6052.c
@@ -144,15 +144,15 @@ 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 +186,8 @@ 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..505e122bdfb5 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)
@@ -299,7 +298,8 @@ static s32 xmit_xmitframes(struct adapter *padapter, struct xmit_priv *pxmitpriv
 				) {
 					if (pxmitbuf) {
 						/* pxmitbuf->priv_data will be NULL, and will crash here */
-						if (pxmitbuf->len > 0 && pxmitbuf->priv_data) {
+						if (pxmitbuf->len > 0 &&
+						    pxmitbuf->priv_data) {
 							struct xmit_frame *pframe;
 							pframe = (struct xmit_frame*)pxmitbuf->priv_data;
 							pframe->agg_num = k;
@@ -400,8 +400,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] | [next] | [standalone]


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

FromBastien Nocera <hadess@hadess.net>
Date2017-05-04 14:00 +0200
SubjectRe: [PATCH v2 4/7] staging: rtl8723bs: Move braces to same line as conditional
Message-ID<tDnAn-2VI-37@gated-at.bofh.it>
In reply to#1634058
On Mon, 2017-05-01 at 18:52 -0600, Justin Vreeland wrote:
> Ensure checkpatch compliance
> 
> > Signed-off-by: Justin Vreeland <justin@jvreeland.com>
> ---
> v2:
>   - Added commit message
>   - Fixed overly long lines
> 
>  drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c | 18 ++++++++----------
>  drivers/staging/rtl8723bs/hal/rtl8723b_rf6052.c | 12 ++++++------
>  drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c  |  9 ++++-----
>  3 files changed, 18 insertions(+), 21 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
> index 28d1a229c3a6..21ec890fd60c 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,8 @@ 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) {

This and...

>  		if (HAL_STATUS_SUCCESS != ODM_ConfigBBWithHeaderFile(&pHalData->odmpriv, CONFIG_BB_PHY_REG))
> >  			rtStatus = _FAIL;
> >  	}
> @@ -491,8 +489,8 @@ 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 +512,8 @@ 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) {

...this and the other such changes below are just way ugly, whatever
the coding style says.

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


#1636762

FromJustin Vreeland <justin@jvreeland.com>
Date2017-05-06 00:10 +0200
Message-ID<tDTAe-7JV-21@gated-at.bofh.it>
In reply to#1635674
Bastien Nocera <hadess@hadess.net> writes:

> On Mon, 2017-05-01 at 18:52 -0600, Justin Vreeland wrote:
>> Ensure checkpatch compliance
>> 
>> > Signed-off-by: Justin Vreeland <justin@jvreeland.com>
>> ---
>> v2:
>>   - Added commit message
>>   - Fixed overly long lines
>> 
>>  drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c | 18 ++++++++----------
>>  drivers/staging/rtl8723bs/hal/rtl8723b_rf6052.c | 12 ++++++------
>>  drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c  |  9 ++++-----
>>  3 files changed, 18 insertions(+), 21 deletions(-)
>> 
>> diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
>> index 28d1a229c3a6..21ec890fd60c 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,8 @@ 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) {
>
> This and...
>
>>  		if (HAL_STATUS_SUCCESS != ODM_ConfigBBWithHeaderFile(&pHalData->odmpriv, CONFIG_BB_PHY_REG))
>> >  			rtStatus = _FAIL;
>> >  	}
>> @@ -491,8 +489,8 @@ 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 +512,8 @@ 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) {
>
> ...this and the other such changes below are just way ugly, whatever
> the coding style says.

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


#1636764

FromJustin Vreeland <justin@jvreeland.com>
Date2017-05-06 00:20 +0200
Message-ID<tDTJT-7Nn-5@gated-at.bofh.it>
In reply to#1635674
Bastien Nocera <hadess@hadess.net> writes:

> On Mon, 2017-05-01 at 18:52 -0600, Justin Vreeland wrote:
>> Ensure checkpatch compliance
>> 
>> > Signed-off-by: Justin Vreeland <justin@jvreeland.com>
>> ---
>> v2:
>>   - Added commit message
>>   - Fixed overly long lines
>> 
>>  drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c | 18 ++++++++----------
>>  drivers/staging/rtl8723bs/hal/rtl8723b_rf6052.c | 12 ++++++------
>>  drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c  |  9 ++++-----
>>  3 files changed, 18 insertions(+), 21 deletions(-)
>> 
>> diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
>> index 28d1a229c3a6..21ec890fd60c 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,8 @@ 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) {
>
> This and...
>
>>  		if (HAL_STATUS_SUCCESS != ODM_ConfigBBWithHeaderFile(&pHalData->odmpriv, CONFIG_BB_PHY_REG))
>> >  			rtStatus = _FAIL;
>> >  	}
>> @@ -491,8 +489,8 @@ 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 +512,8 @@ 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) {
>
> ...this and the other such changes below are just way ugly, whatever
> the coding style says.


Sorry about blank email.

I'm not 100% happy with it either.  Larry Finger suggested to fix the
overly long lines so I tried to find a decent way to shorten them.  I
think the best way would be to change the function names or pull the function
calls out of the if statements.

If these line breaks aren't a good solution and keeping them over 80 isn't either I'd
rather drop this patch from the set if that's okay.


--Justin

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


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

FromBastien Nocera <hadess@hadess.net>
Date2017-05-06 11:40 +0200
SubjectRe: [PATCH v2 4/7] staging: rtl8723bs: Move braces to same line as conditional
Message-ID<tE4lY-6jq-11@gated-at.bofh.it>
In reply to#1636764
On Fri, 2017-05-05 at 16:10 -0600, Justin Vreeland wrote:
> 
<snip>
> Sorry about blank email.
> 
> I'm not 100% happy with it either.  Larry Finger suggested to fix the
> overly long lines so I tried to find a decent way to shorten them.  I
> think the best way would be to change the function names or pull the
> function
> calls out of the if statements.
> 
> If these line breaks aren't a good solution and keeping them over 80
> isn't either I'd
> rather drop this patch from the set if that's okay.

Dropping the sections of this patch that require linefeeds in the
middle of if statements would be fine by me. I don't think that a brace
on the next line is worse than splitting a condition on 2 lines.

Cheers

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web