From nobody Sat Feb 7 18:20:14 2026 Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) (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 B23A4366057 for ; Fri, 23 Jan 2026 09:58:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769162327; cv=none; b=ZDLQRtSNA80ucfqTPCipnMKQtSt2Mat71qa1vg7xmAxnFh5ZrLLRySFBdNup7+IJP0ibNe6ukxleKTbwkiPD/3qC1RwmYDvLq39nh+dJxgm6SVSYRWRl/heCYZPlwtUsUcdLSZrc/zmQCAWLH9Jk0kcajYtSm380rpCN4ltZM2o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769162327; c=relaxed/simple; bh=k8b8RwHBo6LCivzzDalekVW5IkT5jo6kSPCtqKq5hMQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dZ4rFriovDXirZxXWouICAvCuvsJ7pVZx4TrdnZkQTCwIdThzjurv5PsL1knYhYTrW7enCcgsR7TfMPTGikGvSB1ljpa2KxJZHSEzuKFTmsUOoOh+qV64MSj5OtV+RDZMk57pOaVvHJhgUZ5FGeisPYmuCW2mxlfSdl0rSi8a04= 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=iWqNS4pt; arc=none smtp.client-ip=209.85.210.182 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="iWqNS4pt" Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-81dab89f286so1049392b3a.2 for ; Fri, 23 Jan 2026 01:58:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769162317; x=1769767117; 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=2HxA1tDhrh5mSYiEx6V7TTPuPfsmZY8cWMhWVS1Yiz0=; b=iWqNS4pteqkOxGJJXaSVxUqPgSEgBrPwk/zxZKwsRI3K3WInyzSRMbpJciiKczjBo+ zwqFL0csZETDZyGBxcrE/dPHAB/fW9QsEoMiYszzbQSZpjLnnqIegpVU0PipRNEREO6y GMwx46/YHN5JPgtNEqYEn8ea2QqjxluIgdW6aoFebSY1nQ0D+LPEWPINvN/M+pR6oPpJ c6R49yWmA4Gr2tL0PaaucAinyQWYIhXf9ZcZfM3WABwPeWcWtT64kVs0QI3jB2FHY9v5 EpOP+avh6rrzn6wNqZDqu/OsdoRnL4AvYi+zxSEsrUsZ5ecPhTS9419pgNJB6mUbwYre c2RA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769162317; x=1769767117; 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=2HxA1tDhrh5mSYiEx6V7TTPuPfsmZY8cWMhWVS1Yiz0=; b=Gywl3AFwJgZNsJjFKMTiCWgQClZ/qr4BNhz+8zEjCe3aOhzjppidxpfetGhB3Gxq1Z jg7O5AolaIR9VbZ35r5bYh2NjaU19ZfDau/MOtkHP5rkFYdSrPJTZUBxEKvP0Q8xti1u nKCYrM+iVOIfzFZe3fA3UIT95MufkuueJPGNJYMTt3UhIpeld2rpuFBApbc7QT1xCczQ dccPEEtGT0YYRpiEL+2oiz+7qK46KULJQRa7jmUr0YPIEye4BYhlZq0TADFnLFfhw948 P94YnCXVJzlPL8IzmuYy1u+UwABTq/YnSmLqiW3i3sGtt8uyXq9iDbwAFLcYTCX7TAtF w5VQ== X-Forwarded-Encrypted: i=1; AJvYcCWFsG222ZU4GIya+7ZMnMRlMx0nz1ALzWNqVCEk1kK5iLkML+eCzd68emEM/plHMswCk1mD0KYziI0LjHk=@vger.kernel.org X-Gm-Message-State: AOJu0YyI2terbCrqNMPm5lRkoBg0zDRN4YDCYlPcDuxyR5kXyxUjiae+ D7GTQpO6J3bWFeJdi0Ob3i2gKP93OF1e0XVsFvdrnkETucf5UrQjdVHz X-Gm-Gg: AZuq6aIDZyOq/2szPHmZJ1ZUcBja9HDVKui/uMKMp1Ufyxf3DxToDiAxAxhkVZrN/2v +Xa8A59HDE3lw+Zh82jAd7iPWAF86V2igdM8Gtc4YdMyvYHrGCxD2CDR2aj2CBUYDw2eClSAfFq TVtaooofLN84F92ec8s9Q/zJCjdE3bP1JuuYkr7R7JGTD1moAA+itPbG5nCOoImX0rrGnTBxJCt Pdsym6H++GSCQuKi7YsnYRUD7v0FOCojz8bgWIv3ilh6ifn2/c87biwUACTAiTN2eBUADnocIeK mO+ymSWOKnKNPV7QBbPS0459uEGcDxkihcUOJaoUZomym+Ezg74Wc8RzYQu0i3+dk8p3TTgXpna jqgBcqqDTV2oSJb/GXOivfZWmffnLf4S4tABq21GRuzhH7yoWRweAu10i59yx0tfXcOUVh4npxW dm6DZ6Dn2EDItMpwiUK798UqzdZctEDNE4kuXyC/tLdic= X-Received: by 2002:a05:6a20:c90d:b0:35f:4e9d:d28b with SMTP id adf61e73a8af0-38e6f6def5bmr2436345637.18.1769162316930; Fri, 23 Jan 2026 01:58:36 -0800 (PST) Received: from tehuang-Alienware-m16-R2.. ([50.47.240.160]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-c635a412944sm1564838a12.24.2026.01.23.01.58.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jan 2026 01:58:36 -0800 (PST) From: Michael Huang To: gregkh@linuxfoundation.org Cc: dan.carpenter@linaro.org, straube.linux@gmail.com, hansg@kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Michael Huang Subject: [PATCH v2 1/2] staging: rtl8723bs: remove unnecessary boolean comparisons and whitespaces Date: Fri, 23 Jan 2026 01:57:32 -0800 Message-ID: <20260123095733.49301-2-tehsiu.huang@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260123095733.49301-1-tehsiu.huang@gmail.com> References: <20260123095733.49301-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" According to the kernel coding style, explicit comparisons with true or false are redundant and should be avoided. This patch removes these comparisons in rtw_mlme.c to improve code clarity. Additionally, trailing whitespaces are removed to satisfy checkpatch.pl requirements. Signed-off-by: Michael Huang --- drivers/staging/rtl8723bs/core/rtw_mlme.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rt= l8723bs/core/rtw_mlme.c index 98704179ad35..ed754fdbfe7a 100644 --- a/drivers/staging/rtl8723bs/core/rtw_mlme.c +++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c @@ -710,8 +710,8 @@ void rtw_surveydone_event_callback(struct adapter *adap= ter, u8 *pbuf) rtw_set_signal_stat_timer(&adapter->recvpriv); =20 if (pmlmepriv->to_join) { - if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) =3D=3D true)) { - if (check_fwstate(pmlmepriv, _FW_LINKED) =3D=3D false) { + if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)) { + if (!check_fwstate(pmlmepriv, _FW_LINKED)) { set_fwstate(pmlmepriv, _FW_UNDER_LINKING); =20 if (rtw_select_and_join_from_scanned_queue(pmlmepriv) =3D=3D _SUCCESS)= { @@ -1206,10 +1206,9 @@ void rtw_joinbss_event_prehandle(struct adapter *ada= pter, u8 *pbuf) rtw_free_stainfo(adapter, pcur_sta); =20 ptarget_wlan =3D rtw_find_network(&pmlmepriv->scanned_queue, pnetwork= ->network.mac_address); - if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) =3D=3D true) { - if (ptarget_wlan) - ptarget_wlan->fixed =3D true; - } + if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) && + ptarget_wlan) + ptarget_wlan->fixed =3D true; } =20 } else { @@ -2018,7 +2017,7 @@ int rtw_restruct_wmm_ie(struct adapter *adapter, u8 *= in_ie, u8 *out_ie, uint in_ return ielength; } =20 -/* Ported from 8185: IsInPreAuthKeyList().=20 +/* Ported from 8185: IsInPreAuthKeyList(). * (Renamed from SecIsInPreAuthKeyList(), 2006-10-13.) * Added by Annie, 2006-05-07. * --=20 2.43.0 From nobody Sat Feb 7 18:20:14 2026 Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) (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 7FC88346AD1 for ; Fri, 23 Jan 2026 09:58:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769162334; cv=none; b=laMAfeAATiup40k/WiIXL+LJIMXGDT4n+7J1FIkUJVS94tBoXVVD1SbaIWCs3PNES2KjEXtsbjWBmZWPLffTrZ1Z7pq569zsIQsRZMTy4arsxFNNU7V5Zaxm72ftg8STQi/kwFGGUToeNQmEmMIPi+6jJSIxlgWNEqnI7ruD2M8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769162334; c=relaxed/simple; bh=KdNLRkw9MXL6d5nMWdkiRZMWkJric39ghbr2UylUDEo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GnVgXbzFA2cqR4QCDxL+HB3h7ZqicTnKr7xoKvPVptj1X44te/Akgu5eYtC5/Mdmb4y5Gvbp4JBE7bx5pIfPByrlwqP36ffkpFIUrS7y0zdLk19uLGeSL0lVDHwEel4EtlDV3NySr4jlwPIioIxDXYUaKKb/RtWCTAhsf/oyNuU= 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=W4TCeKi5; arc=none smtp.client-ip=209.85.210.181 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="W4TCeKi5" Received: by mail-pf1-f181.google.com with SMTP id d2e1a72fcca58-81ed3e6b8e3so1013397b3a.2 for ; Fri, 23 Jan 2026 01:58:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769162323; x=1769767123; 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=rhQmLwopz4+2NgChpiCiZqfhz0j7tFgKBCw4Sy+KIWw=; b=W4TCeKi56cZliCLl0CkPpiG6iNc+7crohcLdt48HLgmzHa6/OCNMKfPo2ulDTTa7rl 3mx9Ui01Q0DTOCeqNGITuUhwgFjfPGkwUQnZPnmJ2MZXxuszYK8culWOFWigK07kUnX/ /EtpVaXNH7NAtj5uESWNdL6eGLD8404I9CYCuz+lYkoXeiv0iEzhScjy2BANVix7QgrQ /6c1F5Pn8NTSD0EpEdF3n4RyIgtnzZIiTbk2g7k/RkfxHDDvOyeZEefLqx/LHf2N5kSl EUD3VDD5s3NkZF7s3PiuLGxX8l3sCFAW8yCjG6t2Y6eiWhJUE6b8Hlp7rAArRKo12+8L ZeNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769162323; x=1769767123; 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=rhQmLwopz4+2NgChpiCiZqfhz0j7tFgKBCw4Sy+KIWw=; b=duVFK81e0kbf3vKjIun1iJ+RhdIEJtUjlY5oT26Azyq82a30EstBJRIP7IKLv8e661 +FeYPp4Ctfyjil7naVreOAgEJpllXSv61kVAOPuXjGsgq4KAS1+HEilF3iHVm00AYXre gEoKZTIqCrZHdR8MQnNZ6R9tmDKHXelRyGP+dfzFIn+hfntPa1wwrLBdSdbFfdhkx2RQ swa3TRxa2sFmjuZfOzZAm0S9LdXxmS2+yUS3KSdQ+Olj5I+3xhNYAaD4ioBTDqUdk7iZ FTm/jARB/SLw5nYzLZ1Z5oZuX7kuhLKLnglYR1F7C6rGbdV8A6xhnAlBFUVt5Lg7Feo7 vkJQ== X-Forwarded-Encrypted: i=1; AJvYcCV8utCtFo1HyJFYMznAKe9MMHBQ0w3WFkWhwtsxtgm+kgS+QIJ5U844lItn1rqte4YXNTzyiuTIoc30I8Q=@vger.kernel.org X-Gm-Message-State: AOJu0YzCadyPROoHPpoDM0Gc0F1kw0d05s/VbYLAiqV7F++lfVqfqKAD COnSiduN16C4ZOAwIHG31ACmIL9RJL9qrcabgY/m+BrZ06Uzh6P+nZ8L X-Gm-Gg: AZuq6aKaW43Vi7gYqzwxiou5F7SKzr26d+Dvc3wxi0FTgYdA9wCokBOmJ9u02eORE8N 2QuAeANrOzysZ09+FWr8kL185CfTCexd5+IJhO4QzK0iDs6kB01vR8P1W3DXASL0d4C8Du9NLbu Lu2r2Xk7q6JoNO4OUsx46lsIdWgoxjKARkOeFc3VB65HjZI8fFTRlY8hPJg7JjiifPs3R7nNZ6w dOgBvzRA+518Q8/1KX3b9CmkWnzJwu64KjDXUunO7zCNZCAs2TTj4+ihAB9qUEYNjS2EfTosKGh RAHlT6OPIXwjVdC505MXjkamOSS/5tGgTbvE87cW3Xd2IO+343LEmNmYXQeTqy8aDuNF6Mr+yDh t4jcMINgiuY+iyZHVGIPMIKOGSJpky50/pZNjM/UgqwqzzB8TMHgbWFoX1fWf7YPusRJ6tP/nQA mfv85KSVA79Ou34J0RfYEwiKVGF6iY9i3F4xtL8qRPs0k= X-Received: by 2002:a05:6a21:3287:b0:38d:ebdc:3546 with SMTP id adf61e73a8af0-38e6f6aaa92mr2511061637.6.1769162323188; Fri, 23 Jan 2026 01:58:43 -0800 (PST) Received: from tehuang-Alienware-m16-R2.. ([50.47.240.160]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-c635a412944sm1564838a12.24.2026.01.23.01.58.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jan 2026 01:58:42 -0800 (PST) From: Michael Huang To: gregkh@linuxfoundation.org Cc: dan.carpenter@linaro.org, straube.linux@gmail.com, hansg@kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Michael Huang Subject: [PATCH v2 2/2] staging: rtl8723bs: remove redundant else after break Date: Fri, 23 Jan 2026 01:57:33 -0800 Message-ID: <20260123095733.49301-3-tehsiu.huang@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260123095733.49301-1-tehsiu.huang@gmail.com> References: <20260123095733.49301-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" In _rtw_join_timeout_handler(), an else statement followed a break in the previous logic. Removing this else reduces the indentation level of the following code and makes the function easier to read, while maintaining the original logic by ensuring that disconnect indication is still called when roaming fails. Signed-off-by: Michael Huang --- drivers/staging/rtl8723bs/core/rtw_mlme.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rt= l8723bs/core/rtw_mlme.c index ed754fdbfe7a..ac47b2a4f65f 100644 --- a/drivers/staging/rtl8723bs/core/rtw_mlme.c +++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c @@ -1559,12 +1559,10 @@ void _rtw_join_timeout_handler(struct timer_list *t) do_join_r =3D rtw_do_join(adapter); if (do_join_r !=3D _SUCCESS) continue; - - break; - } else { - rtw_indicate_disconnect(adapter); break; } + rtw_indicate_disconnect(adapter); + break; } =20 } else { --=20 2.43.0