[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aSQSg91zk2zCQ8xE@stanley.mountain>
Date: Mon, 24 Nov 2025 11:08:35 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Navaneeth K <knavaneeth786@...il.com>
Cc: gregkh@...uxfoundation.org, linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/5] staging: rtl8723bs: replace FIELD_OFFSET usage with
offsetof
On Sat, Nov 22, 2025 at 05:45:52PM +0000, Navaneeth K wrote:
> Replace usage of the custom FIELD_OFFSET macro with the standard
> offsetof() macro in drv_types.h. This improves code readability and
> standardization.
>
> Signed-off-by: Navaneeth K <knavaneeth786@...il.com>
> ---
> drivers/staging/rtl8723bs/include/drv_types.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/include/drv_types.h b/drivers/staging/rtl8723bs/include/drv_types.h
> index dd9018aa4ee5..47cabf8707f6 100644
> --- a/drivers/staging/rtl8723bs/include/drv_types.h
> +++ b/drivers/staging/rtl8723bs/include/drv_types.h
> @@ -173,9 +173,9 @@ struct registry_priv {
>
>
> /* For registry parameters */
> -#define RGTRY_OFT(field) ((u32)FIELD_OFFSET(struct registry_priv, field))
> +#define RGTRY_OFT(field) ((u32)offsetof(struct registry_priv, field))
These casts to u32 are bogus garbage. Delete them.
regards,
dan carpenter
Powered by blists - more mailing lists