The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8723bs: remove unnecessary braces from single statement blocks
@ 2026-07-05 19:33 Daniel Guihot
  2026-07-07 11:15 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Guihot @ 2026-07-05 19:33 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-staging, linux-kernel, Daniel Guihot

Remove braces around single statement blocks in rtl8723b_hal_init.c to
comply with the kernel code style, as reported by checkpatch.pl:

  WARNING: braces {} are not necessary for single statement blocks
  WARNING: braces {} are not necessary for any arm of this statement

No functional change.

Signed-off-by: Daniel Guihot <daniel.guihot123@gmail.com>
---
 .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 32 +++++++------------
 1 file changed, 12 insertions(+), 20 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
index bcaf63b2893c..b74fdf66c772 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
@@ -194,9 +194,8 @@ static s32 polling_fwdl_chksum(
 		yield();
 	} while (jiffies_to_msecs(jiffies-start) < timeout_ms || cnt < min_cnt);
 
-	if (!(value32 & FWDL_ChkSum_rpt)) {
+	if (!(value32 & FWDL_ChkSum_rpt))
 		goto exit;
-	}
 
 	if (g_fwdl_chksum_fail) {
 		g_fwdl_chksum_fail--;
@@ -235,9 +234,8 @@ static s32 _FWFreeToGo(struct adapter *adapter, u32 min_cnt, u32 timeout_ms)
 		yield();
 	} while (jiffies_to_msecs(jiffies - start) < timeout_ms || cnt < min_cnt);
 
-	if (!(value32 & WINTINI_RDY)) {
+	if (!(value32 & WINTINI_RDY))
 		goto exit;
-	}
 
 	if (g_fwdl_wintint_rdy_fail) {
 		g_fwdl_wintint_rdy_fail--;
@@ -1031,9 +1029,8 @@ void UpdateHalRAMask8723B(struct adapter *padapter, u32 mac_id, u8 rssi_level)
 	rate_bitmap = hal_btcoex_GetRaMask(padapter);
 	mask &= ~rate_bitmap;
 
-	if (pHalData->fw_ractrl) {
+	if (pHalData->fw_ractrl)
 		rtl8723b_set_FwMacIdConfig_cmd(padapter, mac_id, psta->raid, psta->bw_mode, short_gi_rate, mask);
-	}
 
 	/* set correct initial date rate for each mac_id */
 	pdmpriv->INIDATA_RATE[mac_id] = psta->init_rate;
@@ -1184,9 +1181,9 @@ void Hal_EfuseParseIDCode(struct adapter *padapter, u8 *hwinfo)
 
 	/*  Check 0x8129 again for making sure autoload status!! */
 	EEPROMId = le16_to_cpu(*((__le16 *)hwinfo));
-	if (EEPROMId != RTL_EEPROM_ID) {
+	if (EEPROMId != RTL_EEPROM_ID)
 		pEEPROM->bautoload_fail_flag = true;
-	} else
+	else
 		pEEPROM->bautoload_fail_flag = false;
 }
 
@@ -1596,9 +1593,8 @@ static void rtl8723b_cal_txdesc_chksum(struct tx_desc *ptxdesc)
 	/*  Thomas, Lucas@SD4, 20130515 */
 	count = 16;
 
-	for (index = 0; index < count; index++) {
+	for (index = 0; index < count; index++)
 		checksum |= le16_to_cpu(*(__le16 *)(usPtr + index));
-	}
 
 	ptxdesc->txdw7 |= cpu_to_le32(checksum & 0x0000ffff);
 }
@@ -1772,11 +1768,10 @@ static void rtl8723b_fill_default_txdesc(
 		ptxdesc->mbssid = pattrib->mbssid & 0xF;
 
 		ptxdesc->rty_lmt_en = 1; /*  retry limit enable */
-		if (pattrib->retry_ctrl) {
+		if (pattrib->retry_ctrl)
 			ptxdesc->data_rt_lmt = 6;
-		} else {
+		else
 			ptxdesc->data_rt_lmt = 12;
-		}
 
 		ptxdesc->datarate = MRateToHwRate(pmlmeext->tx_rate);
 
@@ -1867,9 +1862,8 @@ void rtl8723b_fill_fake_txdesc(
 		SET_TX_DESC_HWSEQ_SEL_8723B(pDesc, 0);
 	}
 
-	if (IsBTQosNull) {
+	if (IsBTQosNull)
 		SET_TX_DESC_BT_INT_8723B(pDesc, 1);
-	}
 
 	SET_TX_DESC_USE_RATE_8723B(pDesc, 1); /*  use data rate which is set by Sw */
 	SET_TX_DESC_OWN_8723B((u8 *)pDesc, 1);
@@ -2555,9 +2549,8 @@ void SetHwReg8723B(struct adapter *padapter, u8 variable, u8 *val)
 
 			/*  Forece leave RF low power mode for 1T1R to prevent conficting setting in Fw power */
 			/*  saving sequence. 2010.06.07. Added by tynli. Suggested by SD3 yschang. */
-			if (psmode != PS_MODE_ACTIVE) {
+			if (psmode != PS_MODE_ACTIVE)
 				ODM_RF_Saving(&pHalData->odmpriv, true);
-			}
 
 			/* if (psmode != PS_MODE_ACTIVE)	{ */
 			/* 	rtl8723b_set_lowpwr_lps_cmd(padapter, true); */
@@ -2871,11 +2864,10 @@ u8 GetHalDefVar8723B(struct adapter *padapter, enum hal_def_variable variable, v
 		break;
 
 	case HAL_DEF_TX_PAGE_BOUNDARY:
-		if (!padapter->registrypriv.wifi_spec) {
+		if (!padapter->registrypriv.wifi_spec)
 			*(u8 *)pval = TX_PAGE_BOUNDARY_8723B;
-		} else {
+		else
 			*(u8 *)pval = WMM_NORMAL_TX_PAGE_BOUNDARY_8723B;
-		}
 		break;
 
 	case HAL_DEF_MACID_SLEEP:
-- 
2.54.0


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

* Re: [PATCH] staging: rtl8723bs: remove unnecessary braces from single statement blocks
  2026-07-05 19:33 [PATCH] staging: rtl8723bs: remove unnecessary braces from single statement blocks Daniel Guihot
@ 2026-07-07 11:15 ` Greg Kroah-Hartman
  2026-07-08 11:45   ` Daniel Guihot
  2026-07-08 12:07   ` [PATCH v2] " Daniel Guihot
  0 siblings, 2 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2026-07-07 11:15 UTC (permalink / raw)
  To: Daniel Guihot; +Cc: linux-staging, linux-kernel

On Mon, Jul 06, 2026 at 05:33:42AM +1000, Daniel Guihot wrote:
> Remove braces around single statement blocks in rtl8723b_hal_init.c to
> comply with the kernel code style, as reported by checkpatch.pl:
> 
>   WARNING: braces {} are not necessary for single statement blocks
>   WARNING: braces {} are not necessary for any arm of this statement
> 
> No functional change.
> 
> Signed-off-by: Daniel Guihot <daniel.guihot123@gmail.com>
> ---
>  .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 32 +++++++------------
>  1 file changed, 12 insertions(+), 20 deletions(-)

You sent this twice, from two different email addresses?  Which one is
correct?

Please resend a v2 from the correct one so we know what to do here.

thanks,

greg k-h

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

* Re: [PATCH] staging: rtl8723bs: remove unnecessary braces from single statement blocks
  2026-07-07 11:15 ` Greg Kroah-Hartman
@ 2026-07-08 11:45   ` Daniel Guihot
  2026-07-08 12:07   ` [PATCH v2] " Daniel Guihot
  1 sibling, 0 replies; 5+ messages in thread
From: Daniel Guihot @ 2026-07-08 11:45 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-staging, linux-kernel

Sorry for the confusion, my personal email host failed to deliver to
both linux-staging@lists.linux.dev and linux-kernel@vger.kernel.org,
so I resent it from a gmail address. I will resend the patch as a v2
so that everything aligns.

Thanks,
Daniel


On Tue, Jul 7, 2026 at 9:15 PM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> On Mon, Jul 06, 2026 at 05:33:42AM +1000, Daniel Guihot wrote:
> > Remove braces around single statement blocks in rtl8723b_hal_init.c to
> > comply with the kernel code style, as reported by checkpatch.pl:
> >
> >   WARNING: braces {} are not necessary for single statement blocks
> >   WARNING: braces {} are not necessary for any arm of this statement
> >
> > No functional change.
> >
> > Signed-off-by: Daniel Guihot <daniel.guihot123@gmail.com>
> > ---
> >  .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 32 +++++++------------
> >  1 file changed, 12 insertions(+), 20 deletions(-)
>
> You sent this twice, from two different email addresses?  Which one is
> correct?
>
> Please resend a v2 from the correct one so we know what to do here.
>
> thanks,
>
> greg k-h

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

* [PATCH v2] staging: rtl8723bs: remove unnecessary braces from single statement blocks
  2026-07-07 11:15 ` Greg Kroah-Hartman
  2026-07-08 11:45   ` Daniel Guihot
@ 2026-07-08 12:07   ` Daniel Guihot
  2026-07-10 14:47     ` Greg KH
  1 sibling, 1 reply; 5+ messages in thread
From: Daniel Guihot @ 2026-07-08 12:07 UTC (permalink / raw)
  To: gregkh; +Cc: daniel.guihot123, linux-kernel, linux-staging

Remove braces around single statement blocks in rtl8723b_hal_init.c to
comply with the kernel coding style, as reported by checkpatch.pl:

  WARNING: braces {} are not necessary for single statement blocks
  WARNING: braces {} are not necessary for any arm of this statement

No functional change.

Signed-off-by: Daniel Guihot <daniel.guihot123@gmail.com>
---
v2: No code changes, v1 was accidentally delivered from two different
addresses. Resent for consistency.

 .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 32 +++++++------------
 1 file changed, 12 insertions(+), 20 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
index bcaf63b2893c..b74fdf66c772 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
@@ -194,9 +194,8 @@ static s32 polling_fwdl_chksum(
 		yield();
 	} while (jiffies_to_msecs(jiffies-start) < timeout_ms || cnt < min_cnt);
 
-	if (!(value32 & FWDL_ChkSum_rpt)) {
+	if (!(value32 & FWDL_ChkSum_rpt))
 		goto exit;
-	}
 
 	if (g_fwdl_chksum_fail) {
 		g_fwdl_chksum_fail--;
@@ -235,9 +234,8 @@ static s32 _FWFreeToGo(struct adapter *adapter, u32 min_cnt, u32 timeout_ms)
 		yield();
 	} while (jiffies_to_msecs(jiffies - start) < timeout_ms || cnt < min_cnt);
 
-	if (!(value32 & WINTINI_RDY)) {
+	if (!(value32 & WINTINI_RDY))
 		goto exit;
-	}
 
 	if (g_fwdl_wintint_rdy_fail) {
 		g_fwdl_wintint_rdy_fail--;
@@ -1031,9 +1029,8 @@ void UpdateHalRAMask8723B(struct adapter *padapter, u32 mac_id, u8 rssi_level)
 	rate_bitmap = hal_btcoex_GetRaMask(padapter);
 	mask &= ~rate_bitmap;
 
-	if (pHalData->fw_ractrl) {
+	if (pHalData->fw_ractrl)
 		rtl8723b_set_FwMacIdConfig_cmd(padapter, mac_id, psta->raid, psta->bw_mode, short_gi_rate, mask);
-	}
 
 	/* set correct initial date rate for each mac_id */
 	pdmpriv->INIDATA_RATE[mac_id] = psta->init_rate;
@@ -1184,9 +1181,9 @@ void Hal_EfuseParseIDCode(struct adapter *padapter, u8 *hwinfo)
 
 	/*  Check 0x8129 again for making sure autoload status!! */
 	EEPROMId = le16_to_cpu(*((__le16 *)hwinfo));
-	if (EEPROMId != RTL_EEPROM_ID) {
+	if (EEPROMId != RTL_EEPROM_ID)
 		pEEPROM->bautoload_fail_flag = true;
-	} else
+	else
 		pEEPROM->bautoload_fail_flag = false;
 }
 
@@ -1596,9 +1593,8 @@ static void rtl8723b_cal_txdesc_chksum(struct tx_desc *ptxdesc)
 	/*  Thomas, Lucas@SD4, 20130515 */
 	count = 16;
 
-	for (index = 0; index < count; index++) {
+	for (index = 0; index < count; index++)
 		checksum |= le16_to_cpu(*(__le16 *)(usPtr + index));
-	}
 
 	ptxdesc->txdw7 |= cpu_to_le32(checksum & 0x0000ffff);
 }
@@ -1772,11 +1768,10 @@ static void rtl8723b_fill_default_txdesc(
 		ptxdesc->mbssid = pattrib->mbssid & 0xF;
 
 		ptxdesc->rty_lmt_en = 1; /*  retry limit enable */
-		if (pattrib->retry_ctrl) {
+		if (pattrib->retry_ctrl)
 			ptxdesc->data_rt_lmt = 6;
-		} else {
+		else
 			ptxdesc->data_rt_lmt = 12;
-		}
 
 		ptxdesc->datarate = MRateToHwRate(pmlmeext->tx_rate);
 
@@ -1867,9 +1862,8 @@ void rtl8723b_fill_fake_txdesc(
 		SET_TX_DESC_HWSEQ_SEL_8723B(pDesc, 0);
 	}
 
-	if (IsBTQosNull) {
+	if (IsBTQosNull)
 		SET_TX_DESC_BT_INT_8723B(pDesc, 1);
-	}
 
 	SET_TX_DESC_USE_RATE_8723B(pDesc, 1); /*  use data rate which is set by Sw */
 	SET_TX_DESC_OWN_8723B((u8 *)pDesc, 1);
@@ -2555,9 +2549,8 @@ void SetHwReg8723B(struct adapter *padapter, u8 variable, u8 *val)
 
 			/*  Forece leave RF low power mode for 1T1R to prevent conficting setting in Fw power */
 			/*  saving sequence. 2010.06.07. Added by tynli. Suggested by SD3 yschang. */
-			if (psmode != PS_MODE_ACTIVE) {
+			if (psmode != PS_MODE_ACTIVE)
 				ODM_RF_Saving(&pHalData->odmpriv, true);
-			}
 
 			/* if (psmode != PS_MODE_ACTIVE)	{ */
 			/* 	rtl8723b_set_lowpwr_lps_cmd(padapter, true); */
@@ -2871,11 +2864,10 @@ u8 GetHalDefVar8723B(struct adapter *padapter, enum hal_def_variable variable, v
 		break;
 
 	case HAL_DEF_TX_PAGE_BOUNDARY:
-		if (!padapter->registrypriv.wifi_spec) {
+		if (!padapter->registrypriv.wifi_spec)
 			*(u8 *)pval = TX_PAGE_BOUNDARY_8723B;
-		} else {
+		else
 			*(u8 *)pval = WMM_NORMAL_TX_PAGE_BOUNDARY_8723B;
-		}
 		break;
 
 	case HAL_DEF_MACID_SLEEP:
-- 
2.54.0


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

* Re: [PATCH v2] staging: rtl8723bs: remove unnecessary braces from single statement blocks
  2026-07-08 12:07   ` [PATCH v2] " Daniel Guihot
@ 2026-07-10 14:47     ` Greg KH
  0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2026-07-10 14:47 UTC (permalink / raw)
  To: Daniel Guihot; +Cc: linux-kernel, linux-staging

On Wed, Jul 08, 2026 at 10:07:48PM +1000, Daniel Guihot wrote:
> Remove braces around single statement blocks in rtl8723b_hal_init.c to
> comply with the kernel coding style, as reported by checkpatch.pl:
> 
>   WARNING: braces {} are not necessary for single statement blocks
>   WARNING: braces {} are not necessary for any arm of this statement
> 
> No functional change.
> 
> Signed-off-by: Daniel Guihot <daniel.guihot123@gmail.com>
> ---
> v2: No code changes, v1 was accidentally delivered from two different
> addresses. Resent for consistency.

Doesn't apply to my tree :(

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

end of thread, other threads:[~2026-07-10 14:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-05 19:33 [PATCH] staging: rtl8723bs: remove unnecessary braces from single statement blocks Daniel Guihot
2026-07-07 11:15 ` Greg Kroah-Hartman
2026-07-08 11:45   ` Daniel Guihot
2026-07-08 12:07   ` [PATCH v2] " Daniel Guihot
2026-07-10 14:47     ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox