[PATCH 1/5] staging: rtl8723bs: remove custom FIELD_OFFSET macro

From: Navaneeth K

Date: Sat Nov 22 2025 - 12:46:11 EST


The driver defined a custom macro FIELD_OFFSET which duplicates the
standard functionality of the kernel's offsetof() macro.

Remove the custom definition to clean up the code and rely on
standard kernel macros.

Signed-off-by: Navaneeth K <knavaneeth786@xxxxxxxxx>
---
drivers/staging/rtl8723bs/include/basic_types.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/basic_types.h b/drivers/staging/rtl8723bs/include/basic_types.h
index 1c2da18e6210..8adb95f9f1e5 100644
--- a/drivers/staging/rtl8723bs/include/basic_types.h
+++ b/drivers/staging/rtl8723bs/include/basic_types.h
@@ -12,8 +12,7 @@
#define FAIL (-1)

#include <linux/types.h>
-
-#define FIELD_OFFSET(s, field) ((__kernel_ssize_t)&((s *)(0))->field)
+#include <linux/stddef.h>

#define SIZE_PTR __kernel_size_t
#define SSIZE_PTR __kernel_ssize_t
--
2.43.0