[PATCH v2 2/4] staging: rtl8723bs: Fix comparison style in IS_CCK_RATE and IS_OFDM_RATE macros
From: Pramod Maurya
Date: Sun May 10 2026 - 13:52:55 EST
Place the variable on the left side of comparisons, wrap macro
arguments in parentheses to avoid precedence issues, and wrap the
long macro definitions with a line continuation.
Signed-off-by: Pramod Maurya <pramod.nexgen@xxxxxxxxx>
---
drivers/staging/rtl8723bs/include/ieee80211.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/include/ieee80211.h b/drivers/staging/rtl8723bs/include/ieee80211.h
index 7a3609d019aa..11825ace95a9 100644
--- a/drivers/staging/rtl8723bs/include/ieee80211.h
+++ b/drivers/staging/rtl8723bs/include/ieee80211.h
@@ -394,8 +394,10 @@ enum {
};
#define IS_HT_RATE(_rate) (_rate >= MGN_MCS0 && _rate <= MGN_MCS31)
-#define IS_CCK_RATE(_rate) (MGN_1M == _rate || _rate == MGN_2M || _rate == MGN_5_5M || _rate == MGN_11M)
-#define IS_OFDM_RATE(_rate) (MGN_6M <= _rate && _rate <= MGN_54M && _rate != MGN_11M)
+#define IS_CCK_RATE(_rate) \
+ ((_rate) == MGN_1M || (_rate) == MGN_2M || (_rate) == MGN_5_5M || (_rate) == MGN_11M)
+#define IS_OFDM_RATE(_rate) \
+ ((_rate) >= MGN_6M && (_rate) <= MGN_54M && (_rate) != MGN_11M)
/* NOTE: This data is for statistical purposes; not all hardware provides this
--
2.52.0