Re: [PATCH v5 1/7] staging: rtl8723bs: use continue statements to reduce indentation
From: Joe Perches
Date: Sun Jan 25 2026 - 13:13:42 EST
On Sat, 2026-01-24 at 15:15 -0800, Michael Huang wrote:
> Refactor nested if-statements using "continue"
> statements. This flattens the logic, reduces deep indentation,
> and improves overall code readability.
[]
> diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
[]
> @@ -3684,29 +3684,29 @@ static void issue_action_BSSCoexistPacket(struct adapter *padapter)
>
>
> for (i = 0; i < 8; i++) {
> - if (ICS[i][0] == 1) {
Several additional things to consider for readability
o Rename ICS to something more meaningful
o Separate the ICS[x][0] uses to another named array [8]
o Adding #defines for the array bounds 8 and 15 (or 14)
o Change the loop bounds from 1 to 0 and 15 to 14
o Converting this/these arrays to bool
o Use boolean logic