[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251122174555.215109-4-knavaneeth786@gmail.com>
Date: Sat, 22 Nov 2025 17:45:53 +0000
From: Navaneeth K <knavaneeth786@...il.com>
To: gregkh@...uxfoundation.org
Cc: linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org,
Navaneeth K <knavaneeth786@...il.com>
Subject: [PATCH 3/5] staging: rtl8723bs: use standard offsetof in cfg80211 operations
Replace usage of the custom FIELD_OFFSET macro with the standard
offsetof() macro in ioctl_cfg80211.c.
This resolves coding style issues and standardizes
memory offset calculations.
Signed-off-by: Navaneeth K <knavaneeth786@...il.com>
---
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index 315bab373729..784c9ebf6f9c 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -1712,7 +1712,8 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
if (wep_key_len > 0) {
wep_key_len = wep_key_len <= 5 ? 5 : 13;
- wep_total_len = wep_key_len + FIELD_OFFSET(struct ndis_802_11_wep, key_material);
+ wep_total_len = wep_key_len +
+ offsetof(struct ndis_802_11_wep, key_material);
pwep = rtw_malloc(wep_total_len);
if (!pwep) {
ret = -ENOMEM;
--
2.43.0
Powered by blists - more mailing lists