* [PATCH] staging: rtl8723bs: Remove Yoda conditions in rtw_get_cipher_info()
@ 2026-02-03 7:35 Giorgi Tchankvetadze
2026-02-03 16:41 ` Ethan Tidmore
0 siblings, 1 reply; 2+ messages in thread
From: Giorgi Tchankvetadze @ 2026-02-03 7:35 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Dan Carpenter, linux-staging, linux-kernel, Giorgi Tchankvetadze
Convert comparisons from CONSTANT == variable to variable == CONSTANT
to follow modern kernel coding style and improve readability.
Signed-off-by: Giorgi Tchankvetadze <giorgitchankvetadze1997@gmail.com>
---
Note: checkpatch reports line length and "spaces preferred around that
"+" warnings. These are pre-existing and I figured fixing them was
beyond the scope of this particular fix.
drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
index 8fdeeda88a6d..92b12a13d27c 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
@@ -1009,7 +1009,7 @@ static int rtw_get_cipher_info(struct wlan_network *pnetwork)
pbuf = rtw_get_wpa_ie(&pnetwork->network.ies[12], &wpa_ielen, pnetwork->network.ie_length-12);
if (pbuf && (wpa_ielen > 0)) {
- if (_SUCCESS == rtw_parse_wpa_ie(pbuf, wpa_ielen+2, &group_cipher, &pairwise_cipher, &is8021x)) {
+ if (rtw_parse_wpa_ie(pbuf, wpa_ielen+2, &group_cipher, &pairwise_cipher, &is8021x) == _SUCCESS) {
pnetwork->bcn_info.pairwise_cipher = pairwise_cipher;
pnetwork->bcn_info.group_cipher = group_cipher;
pnetwork->bcn_info.is_8021x = is8021x;
@@ -1019,7 +1019,7 @@ static int rtw_get_cipher_info(struct wlan_network *pnetwork)
pbuf = rtw_get_wpa2_ie(&pnetwork->network.ies[12], &wpa_ielen, pnetwork->network.ie_length-12);
if (pbuf && (wpa_ielen > 0)) {
- if (_SUCCESS == rtw_parse_wpa2_ie(pbuf, wpa_ielen+2, &group_cipher, &pairwise_cipher, &is8021x)) {
+ if (rtw_parse_wpa2_ie(pbuf, wpa_ielen+2, &group_cipher, &pairwise_cipher, &is8021x) == _SUCCESS) {
pnetwork->bcn_info.pairwise_cipher = pairwise_cipher;
pnetwork->bcn_info.group_cipher = group_cipher;
pnetwork->bcn_info.is_8021x = is8021x;
--
2.52.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] staging: rtl8723bs: Remove Yoda conditions in rtw_get_cipher_info()
2026-02-03 7:35 [PATCH] staging: rtl8723bs: Remove Yoda conditions in rtw_get_cipher_info() Giorgi Tchankvetadze
@ 2026-02-03 16:41 ` Ethan Tidmore
0 siblings, 0 replies; 2+ messages in thread
From: Ethan Tidmore @ 2026-02-03 16:41 UTC (permalink / raw)
To: Giorgi Tchankvetadze, Greg Kroah-Hartman
Cc: Dan Carpenter, linux-staging, linux-kernel
On Tue Feb 3, 2026 at 1:35 AM CST, Giorgi Tchankvetadze wrote:
> Convert comparisons from CONSTANT == variable to variable == CONSTANT
> to follow modern kernel coding style and improve readability.
>
> Signed-off-by: Giorgi Tchankvetadze <giorgitchankvetadze1997@gmail.com>
The yoda style if statement in rtw_get_cipher_info() has already been
fixed in staging-next. Next time use staging-next when creating patches
for staging. Thanks.
ET
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-02-03 16:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-03 7:35 [PATCH] staging: rtl8723bs: Remove Yoda conditions in rtw_get_cipher_info() Giorgi Tchankvetadze
2026-02-03 16:41 ` Ethan Tidmore
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox