[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZLnoBYlsTiLixTah@terra>
Date: Fri, 21 Jul 2023 06:05:57 +0400
From: Sergey Rozhnov <rozhnov.sergey.89@...il.com>
To: Larry Finger <Larry.Finger@...inger.net>,
Florian Schilhabel <florian.c.schilhabel@...glemail.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: [PATCH] staging: rtl8712: Remove redundant braces in if statements
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
Powered by blists - more mailing lists