Skip to contentSkip to conversation

staging: rtl8723bs: Fix missing spaces around operators

PATCH Superseded Moksh Panicker 2 participants 7 messages Jun 14 – Jun 15 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover staging: rtl8723bs: Fix missing spaces around operators

This patch series fixes missing spaces around arithmetic and bitwise operators ('+',' -', '&') in the rtl8723bs staging driver. These were flagged by checkpatch.pl with:

CHECK: spaces preferred around that 'X' (ctx:VxV)

Each patch addresses one file independently.

Moksh Panicker (4):
staging: rtl8723bs: Fix missing space around '+' operator in
hal_sdio.c
staging: rtl8723bs: Fix missing space around '-' operator in
hal_com_phycfg.c
staging: rtl8723bs: Fix missing spaces around operators in
HalPwrSeqCmd.c
staging: rtl8723bs: Fix missing spaces around '-' operator in
HalPhyRf.c

 drivers/staging/rtl8723bs/hal/HalPhyRf.c       | 8 ++++----
 drivers/staging/rtl8723bs/hal/HalPwrSeqCmd.c   | 6 +++---
 drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 2 +-
 drivers/staging/rtl8723bs/hal/hal_sdio.c       | 2 +-
 4 files changed, 9 insertions(+), 9 deletions(-)
Signature · 1 line
2.34.1
#1 lore raw

PATCH 1/4 staging: rtl8723bs: Fix missing space around '+' operator in hal_sdio.c

Add missing space around the '+' operator in HalQueryTxBufferStatus(). This fixes the following checkpatch.pl warning:

CHECK: spaces preferred around that '+' (ctx:VxV)

---
 drivers/staging/rtl8723bs/hal/hal_sdio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/hal/hal_sdio.c +1 -1
index 665c85ecc..1d29245da 100644
@@ -24,7 +24,7 @@ u8 rtw_hal_sdio_query_tx_freepage(
 {
 	struct hal_com_data	*pHalData = GET_HAL_DATA(padapter);
 
-	if ((pHalData->SdioTxFIFOFreePage[PageIdx]+pHalData->SdioTxFIFOFreePage[PUBLIC_QUEUE_IDX]) >= (RequiredPageNum))
+	if ((pHalData->SdioTxFIFOFreePage[PageIdx] + pHalData->SdioTxFIFOFreePage[PUBLIC_QUEUE_IDX]) >= (RequiredPageNum))
 		return true;
 	else
 		return false;
Signature · 1 line
2.34.1
#2 lore raw

Re: [PATCH v1 1/4] staging: rtl8723bs: Fix missing space around '+' operator in hal_sdio.c

Quoted 5 lines · Moksh Panicker

Add missing space around the '+' operator in HalQueryTxBufferStatus(). This fixes the following checkpatch.pl warning:

CHECK: spaces preferred around that '+' (ctx:VxV)

There needs to be a blank line before Signing block.

regards,
dan carpenter

#3 lore raw

PATCH 2/4 staging: rtl8723bs: Fix missing space around '-' operator in hal_com_phycfg.c

In reply to Moksh Panicker

Add missing space around the '-' operator in channel index calculation. This fixes the following checkpatch.pl warning:

CHECK: spaces preferred around that '-' (ctx:VxV)

---
 drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +1 -1
index bdd595a99..5e2f4131c 100644
@@ -459,7 +459,7 @@ u8 PHY_GetTxPowerIndexBase(
 {
 	struct hal_com_data *pHalData = GET_HAL_DATA(padapter);
 	u8 txPower = 0;
-	u8 chnlIdx = (Channel-1);
+	u8 chnlIdx = (Channel - 1);
 
 	if (HAL_IsLegalChannel(padapter, Channel) == false)
 		chnlIdx = 0;
Signature · 1 line
2.34.1
#4 lore raw

PATCH 3/4 staging: rtl8723bs: Fix missing spaces around operators in HalPwrSeqCmd.c

In reply to Moksh Panicker

Add missing spaces around the '&' operator in HalPwrSeqCmdParsing(). This fixes the following checkpatch.pl warnings:

CHECK: spaces preferred around that '&' (ctx:ExV)
CHECK: spaces preferred around that '&' (ctx:WxV)

---
 drivers/staging/rtl8723bs/hal/HalPwrSeqCmd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8723bs/hal/HalPwrSeqCmd.c +3 -3
index 86404b5e6..98a3d7695 100644
@@ -88,7 +88,7 @@ u8 HalPwrSeqCmdParsing(
 					value &= (~(GET_PWR_CFG_MASK(PwrCfgCmd)));
 					value |= (
 						GET_PWR_CFG_VALUE(PwrCfgCmd)
-						&GET_PWR_CFG_MASK(PwrCfgCmd)
+						 & GET_PWR_CFG_MASK(PwrCfgCmd)
 					);
 
 					/*  Write the value back to system register */
@@ -106,7 +106,7 @@ u8 HalPwrSeqCmdParsing(
 					else
 						value = rtw_read8(padapter, offset);
 
-					value = value&GET_PWR_CFG_MASK(PwrCfgCmd);
+					value = value & GET_PWR_CFG_MASK(PwrCfgCmd);
 					if (
 						value == (GET_PWR_CFG_VALUE(PwrCfgCmd) &
 						GET_PWR_CFG_MASK(PwrCfgCmd))
@@ -126,7 +126,7 @@ u8 HalPwrSeqCmdParsing(
 				if (GET_PWR_CFG_VALUE(PwrCfgCmd) == PWRSEQ_DELAY_US)
 					udelay(GET_PWR_CFG_OFFSET(PwrCfgCmd));
 				else
-					udelay(GET_PWR_CFG_OFFSET(PwrCfgCmd)*1000);
+					udelay(GET_PWR_CFG_OFFSET(PwrCfgCmd) * 1000);
 				break;
 
 			case PWR_CMD_END:
Signature · 1 line
2.34.1
#5 lore raw

PATCH 4/4 staging: rtl8723bs: Fix missing spaces around '-' operator in HalPhyRf.c

In reply to Moksh Panicker

Add missing spaces around the '-' operator in swing table index boundary checks. This fixes the following checkpatch.pl warnings:

CHECK: spaces preferred around that '-' (ctx:VxV)

---
 drivers/staging/rtl8723bs/hal/HalPhyRf.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8723bs/hal/HalPhyRf.c +4 -4
index 7bef05a9a..254bfef54 100644
@@ -220,13 +220,13 @@ void ODM_TXPowerTrackingCallback_ThermalMeter(struct adapter *Adapter)
 				pDM_Odm->RFCalibrateInfo.OFDM_index[p];
 
 			/* 4 7.1 Handle boundary conditions of index. */
-			if (pDM_Odm->RFCalibrateInfo.OFDM_index[p] > c.SwingTableSize_OFDM-1)
-				pDM_Odm->RFCalibrateInfo.OFDM_index[p] = c.SwingTableSize_OFDM-1;
+			if (pDM_Odm->RFCalibrateInfo.OFDM_index[p] > c.SwingTableSize_OFDM - 1)
+				pDM_Odm->RFCalibrateInfo.OFDM_index[p] = c.SwingTableSize_OFDM - 1;
 			else if (pDM_Odm->RFCalibrateInfo.OFDM_index[p] < OFDM_min_index)
 				pDM_Odm->RFCalibrateInfo.OFDM_index[p] = OFDM_min_index;
 		}
-		if (pDM_Odm->RFCalibrateInfo.CCK_index > c.SwingTableSize_CCK-1)
-			pDM_Odm->RFCalibrateInfo.CCK_index = c.SwingTableSize_CCK-1;
+		if (pDM_Odm->RFCalibrateInfo.CCK_index > c.SwingTableSize_CCK - 1)
+			pDM_Odm->RFCalibrateInfo.CCK_index = c.SwingTableSize_CCK - 1;
 		/* else if (pDM_Odm->RFCalibrateInfo.CCK_index < 0) */
 			/* pDM_Odm->RFCalibrateInfo.CCK_index = 0; */
 	} else {
Signature · 1 line
2.34.1
#6 lore raw
In reply to Moksh Panicker
Quoted 20 lines · Moksh Panicker

This patch series fixes missing spaces around arithmetic and bitwise operators ('+',' -', '&') in the rtl8723bs staging driver. These were flagged by checkpatch.pl with:

CHECK: spaces preferred around that 'X' (ctx:VxV)

Each patch addresses one file independently.

Moksh Panicker (4):
staging: rtl8723bs: Fix missing space around '+' operator in
hal_sdio.c
staging: rtl8723bs: Fix missing space around '-' operator in
hal_com_phycfg.c
staging: rtl8723bs: Fix missing spaces around operators in
HalPwrSeqCmd.c
staging: rtl8723bs: Fix missing spaces around '-' operator in
HalPhyRf.c

Quoted 5 lines
 drivers/staging/rtl8723bs/hal/HalPhyRf.c       | 8 ++++----
 drivers/staging/rtl8723bs/hal/HalPwrSeqCmd.c   | 6 +++---
 drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 2 +-
 drivers/staging/rtl8723bs/hal/hal_sdio.c       | 2 +-
 4 files changed, 9 insertions(+), 9 deletions(-)

Just combine all 4 patches into one patch.

regards,
dan carpenter