From nobody Mon Feb 9 00:53:36 2026 Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E3AE41B81CA for ; Sat, 24 Jan 2026 23:16:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769296578; cv=none; b=Ag5zMQn6HxQEMvg27G1GP7GQfpK+FJOyReRVxcO81QbBPbfQG6cTpOxCO3ISYvJ/8LEi/Z/QrwHJ2GtdoT8MpxfpZQOVGcZezDjrO0DBdXrF+ub9Y78wNEB5LFE500gOSYAiRpnC+rJr2DUzq6FEFJPgoE59Y4riWszMVKFhCuo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769296578; c=relaxed/simple; bh=rTt4qvkrDSBQ9pwoZIWMf9vIyblhXcDrVn61LbQIFfE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=c4IGasloj/EnW8cwzU6KAQiWL3U5LEj0PKKl9a704TyiFMi7xvCxSuWC2MB65eo/JoBhaBjzQK/jadOyoBdPvhqsJ6zKTeFQ2rF37rCU3e9LwaFKmScoBjXGIggu27D/aDK3r1xDwGuG6vyHinC0R567+tNBc16nKsfgKb81FZY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=HeUpRbc2; arc=none smtp.client-ip=209.85.210.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HeUpRbc2" Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-8217f2ad01eso3020232b3a.2 for ; Sat, 24 Jan 2026 15:16:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769296576; x=1769901376; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=RYcPiK31VtTFqRLIN2/IL3eoLrIZeAm97Ta0Kdq8bZo=; b=HeUpRbc2QxZVvoz1wbiU2n9S4VbYAA7Vh3ONkXIZtG/JHhNdBe4CsM7X4POYXiV5oU HukHQEOCjgwji+GWK+4dX899TaetqiiHK0E31GRZzbcqwPeFM8gw6uUEaPGEcIFUmu5d 2nTRs8Q//ObP0b1s7FyKwGt202ANmf66r9fDsRP1HvICHU3Y74Xr0nGJkeWeQTaQzcP8 AodTiZgHIWlF13GTEzl2fMu1nmxaRyJO/vVuwNCLFO76HQV3g8k5sKW9gaJxPscMqoQm qkfyLsdDLgj73IV9EM/gkd0Z7IYukCvXBHLKTzAl+bWI/UD1voPyD0DAG5CFArj2s89+ OFwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769296576; x=1769901376; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=RYcPiK31VtTFqRLIN2/IL3eoLrIZeAm97Ta0Kdq8bZo=; b=dVmuPFjWcS5g1vRRUyKRDYJO4mMukOgeu8PQP/+QZY6bDqTD/UOiKIvqmnKTegaJfO MjYQ5wSrp8tg1U8VvfjnqyVaDu5fZF+TTkm+cF6sq8MVV1uf5fG65Vc1mlZBxrbV8NQ5 i/q+coKOY/vPQJKqRjYD+GFnfQKrS8/rU4tSfEiBle7xkZndjmWseAVSHLFkd0Ci6wxk IZ7YQ2cqwC2c2R0JqgHRdA5w9IeTRWu0w5pzVb5z3ATxnnIFRsl3ofy3mMP8F06DbXs/ ivlbYI4dvcr+yv9cXmFo90TJFsMl0Yjtv/5dDuMbSdXA2mNbddEREN8yh79/uGrS/Oy+ Uf+g== X-Forwarded-Encrypted: i=1; AJvYcCX6wksz33ozjc0pDZB98V+ZrlihzKBr45nx9+Vvpb/vuJ9fomPUUTQI9XhjkmdqSVZFRdclBxTyxCWyhIo=@vger.kernel.org X-Gm-Message-State: AOJu0Yxb+oWJrUWbnH1XVO4M+RUPtivNloVw1rlHqYw9n7ADyuKlJJiR zJO5RRiARbokOH++LI5ltVpylau9znLiGDc4Gp1dv6ktjVQdszhZ/fKl X-Gm-Gg: AZuq6aIX0nDFlsS++gP0xB5cakwl1ke92yyPGlgcE171clYsV0DZ9CRuEqc+wlHtK6t T8Zar3wuPUMMFqU5OYNcRhfIOAS2yVe8n9zG4+D4LhWqrcdWNa3cwLpuuZit4Nc7uIUSJYnWgDS 74A9+1WN8wzPx+GJuW/MBg14DrgEP0ibJuK5c5TyfzPRrt+aca/cCo9qv2Q5qPx9Z9yp2R+53mZ WXa6eEemX04vfVBfSIZMYzXvC4x/llPz5+aMiTeXfOYfGUXPfpepvQu1kn+BDe7OwkGfTtTGwYE Pp9+heWMqjDqhQCUnsow0leIwvmfo1Wud+kyTivTIiDjsgCkAh/81VM467+nz5UULPI+lp6y6uN wRM0EEBpOH5CzImnixPBD9qu1u+Qim6Lqj9NRR1Y2d8Dzg224inryeNXXVnChvX6xPH2u7u2asK TFaRgeQMigY33pAOJB+d/+WKyHsyx4g5sQ X-Received: by 2002:a05:6a00:7097:b0:821:862e:384d with SMTP id d2e1a72fcca58-8234129e354mr81257b3a.40.1769296576078; Sat, 24 Jan 2026 15:16:16 -0800 (PST) Received: from tehuang-Alienware-m16-R2.. ([50.47.240.160]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8231873bf53sm5604506b3a.45.2026.01.24.15.16.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Jan 2026 15:16:14 -0800 (PST) From: Michael Huang To: Greg Kroah-Hartman Cc: Dan Carpenter , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Michael Huang Subject: [PATCH v5 1/7] staging: rtl8723bs: use continue statements to reduce indentation Date: Sat, 24 Jan 2026 15:15:51 -0800 Message-ID: <20260124231557.18189-2-tehsiu.huang@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260124231557.18189-1-tehsiu.huang@gmail.com> References: <20260124104920.5721-1-tehsiu.huang@gmail.com> <20260124231557.18189-1-tehsiu.huang@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Refactor nested if-statements using "continue" statements. This flattens the logic, reduces deep indentation, and improves overall code readability. Signed-off-by: Michael Huang --- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 48 ++++++++++--------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/stagin= g/rtl8723bs/core/rtw_mlme_ext.c index fa1e3ad59254..d80c1a2620e2 100644 --- 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 ad= apter *padapter) =20 =20 for (i =3D 0; i < 8; i++) { - if (ICS[i][0] =3D=3D 1) { - int j, k =3D 0; + int j, k =3D 0; =20 - InfoContent[k] =3D i; - /* SET_BSS_INTOLERANT_ELE_REG_CLASS(InfoContent, i); */ - k++; + if (ICS[i][0] !=3D 1) + continue; =20 - for (j =3D 1; j <=3D 14; j++) { - if (ICS[i][j] =3D=3D 1) { - if (k < 16) { - InfoContent[k] =3D j; /* channel number */ - /* SET_BSS_INTOLERANT_ELE_CHANNEL(InfoContent+k, j); */ - k++; - } - } - } + InfoContent[k] =3D i; + /* SET_BSS_INTOLERANT_ELE_REG_CLASS(InfoContent, i); */ + k++; =20 - pframe =3D rtw_set_ie(pframe, WLAN_EID_BSS_INTOLERANT_CHL_REPORT, k, I= nfoContent, &(pattrib->pktlen)); + for (j =3D 1; j <=3D 14; j++) { + if (ICS[i][j] !=3D 1) + continue; =20 + if (k < 16) { + InfoContent[k] =3D j; /* channel number */ + /* SET_BSS_INTOLERANT_ELE_CHANNEL(InfoContent+k, j); */ + k++; + } } =20 - } + pframe =3D rtw_set_ie(pframe, WLAN_EID_BSS_INTOLERANT_CHL_REPORT, k, In= foContent, &(pattrib->pktlen)); =20 + } =20 } =20 @@ -3831,14 +3831,16 @@ void site_survey(struct adapter *padapter) int i; =20 for (i =3D 0; i < RTW_SSID_SCAN_AMOUNT; i++) { - if (pmlmeext->sitesurvey_res.ssid[i].ssid_length) { - /* IOT issue, When wifi_spec is not set, send one probe req without = WPS IE. */ - if (padapter->registrypriv.wifi_spec) - issue_probereq(padapter, &(pmlmeext->sitesurvey_res.ssid[i]), NULL); - else - issue_probereq_ex(padapter, &(pmlmeext->sitesurvey_res.ssid[i]), NU= LL, 0, 0, 0, 0); + if (!pmlmeext->sitesurvey_res.ssid[i].ssid_length) + continue; + + /* IOT issue, When wifi_spec is not set, send one probe req without W= PS IE. */ + if (padapter->registrypriv.wifi_spec) issue_probereq(padapter, &(pmlmeext->sitesurvey_res.ssid[i]), NULL); - } + else + issue_probereq_ex(padapter, &(pmlmeext->sitesurvey_res.ssid[i]), NUL= L, 0, 0, 0, 0); + + issue_probereq(padapter, &(pmlmeext->sitesurvey_res.ssid[i]), NULL); } =20 if (pmlmeext->sitesurvey_res.scan_mode =3D=3D SCAN_ACTIVE) { --=20 2.43.0