Re: [PATCH 2/2] staging: rtl8723bs: core/rtw_mlme_ext.c: flatten indentation with early loop continue in OnAssocReq()

From: Greg KH

Date: Fri Jan 16 2026 - 08:07:01 EST


On Tue, Jan 13, 2026 at 04:14:33PM -0500, William Hansen-Baird wrote:
> Replace large if (memcmp(p+2, WMM_IE, 6)) inside the for (;;) loop,
> which ends with a break, with an early continue.
> This reduces deep nesting and is purely stylistic.
>
> Signed-off-by: William Hansen-Baird <william.hansen.baird@xxxxxxxxx>
> ---
> drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 61 ++++++++++---------
> 1 file changed, 31 insertions(+), 30 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
> index d3b395894d4b..4eb28577fb6a 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
> @@ -1184,46 +1184,47 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
> if (!p)
> break;
>
> - if (!memcmp(p+2, WMM_IE, 6)) {
> + if (memcmp(p+2, WMM_IE, 6)) {
> + p = p + ie_len + 2;
> + continue;

Ah, here's the loop, sorry about the previous review comment.

Ugh, what a mess. I'll take this now, hopefully it all still works :)

thanks,

greg k-h