public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8712: Remove redundant braces in if statements
@ 2023-07-21  2:05 Sergey Rozhnov
  2023-07-21  4:11 ` Greg Kroah-Hartman
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Sergey Rozhnov @ 2023-07-21  2:05 UTC (permalink / raw)
  To: Larry Finger, Florian Schilhabel, Greg Kroah-Hartman,
	linux-staging, linux-kernel

Extract masked value to improve readability, apply fix suggested by checkpatch.
---
 drivers/staging/rtl8712/ieee80211.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8712/ieee80211.c b/drivers/staging/rtl8712/ieee80211.c
index 7d8f1a29d18a..fe53453ab9a7 100644
--- a/drivers/staging/rtl8712/ieee80211.c
+++ b/drivers/staging/rtl8712/ieee80211.c
@@ -63,8 +63,9 @@ uint r8712_is_cckrates_included(u8 *rate)
 	u32 i = 0;
 
 	while (rate[i] != 0) {
-		if ((((rate[i]) & 0x7f) == 2) || (((rate[i]) & 0x7f) == 4) ||
-		    (((rate[i]) & 0x7f) == 11) || (((rate[i]) & 0x7f) == 22))
+		u8 val = rate[i] & 0x7f;
+
+		if (val == 2 || val == 4 || val == 11 || val == 22)
 			return true;
 		i++;
 	}
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-07-21  7:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-21  2:05 [PATCH] staging: rtl8712: Remove redundant braces in if statements Sergey Rozhnov
2023-07-21  4:11 ` Greg Kroah-Hartman
2023-07-21  4:57 ` Larry Finger
2023-07-21  6:01 ` Dan Carpenter
2023-07-21  6:34   ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox