[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251109133904.5eff2558@jic23-huawei>
Date: Sun, 9 Nov 2025 13:39:04 +0000
From: Jonathan Cameron <jic23@...nel.org>
To: Geert Uytterhoeven <geert+renesas@...der.be>
Cc: Yury Norov <yury.norov@...il.com>, Michael Turquette
<mturquette@...libre.com>, Stephen Boyd <sboyd@...nel.org>, Nicolas Ferre
<nicolas.ferre@...rochip.com>, Alexandre Belloni
<alexandre.belloni@...tlin.com>, Claudiu Beznea <claudiu.beznea@...on.dev>,
Giovanni Cabiddu <giovanni.cabiddu@...el.com>, Herbert Xu
<herbert@...dor.apana.org.au>, David Miller <davem@...emloft.net>, Linus
Walleij <linus.walleij@...aro.org>, Bartosz Golaszewski <brgl@...ev.pl>,
Joel Stanley <joel@....id.au>, Andrew Jeffery
<andrew@...econstruct.com.au>, Crt Mori <cmo@...exis.com>, Lars-Peter
Clausen <lars@...afoo.de>, Jacky Huang <ychuang3@...oton.com>, Shan-Chun
Hung <schung@...oton.com>, Rasmus Villemoes <linux@...musvillemoes.dk>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>, Johannes
Berg <johannes@...solutions.net>, Jakub Kicinski <kuba@...nel.org>, Alex
Elder <elder@...e.org>, David Laight <david.laight.linux@...il.com>,
Vincent Mailhol <mailhol.vincent@...adoo.fr>, Jason Baron
<jbaron@...mai.com>, Borislav Petkov <bp@...en8.de>, Tony Luck
<tony.luck@...el.com>, Michael Hennerich <Michael.Hennerich@...log.com>,
Kim Seer Paller <kimseer.paller@...log.com>, David Lechner
<dlechner@...libre.com>, Nuno Sá <nuno.sa@...log.com>, Andy
Shevchenko <andy@...nel.org>, Richard Genoud <richard.genoud@...tlin.com>,
Cosmin Tanislav <demonsingur@...il.com>, Biju Das
<biju.das.jz@...renesas.com>, Jianping Shen <Jianping.Shen@...bosch.com>,
Nathan Chancellor <nathan@...nel.org>, Nick Desaulniers
<nick.desaulniers+lkml@...il.com>, Miquel Raynal
<miquel.raynal@...tlin.com>, Richard Weinberger <richard@....at>, Vignesh
Raghavendra <vigneshr@...com>, linux-clk@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-renesas-soc@...r.kernel.org,
linux-crypto@...r.kernel.org, linux-edac@...r.kernel.org,
qat-linux@...el.com, linux-gpio@...r.kernel.org,
linux-aspeed@...ts.ozlabs.org, linux-iio@...r.kernel.org,
linux-sound@...r.kernel.org, linux-mtd@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next v6 23/26] iio: imu: smi330: Convert to common
field_{get,prep}() helpers
On Thu, 6 Nov 2025 14:34:11 +0100
Geert Uytterhoeven <geert+renesas@...der.be> wrote:
> Drop the driver-specific field_get() and field_prep() macros, in favor
> of the globally available variants from <linux/bitfield.h>.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>
This will need a revist next cycle. I preferred not to have
the odd looking undef in the driver at introduction so prefixed with smi330_
instead. Only one instance so it wasn't worth comments to make ti clear what was going on.
J
> ---
> v6:
> - No changes,
>
> v5:
> - New.
> ---
> drivers/iio/imu/smi330/smi330_core.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/drivers/iio/imu/smi330/smi330_core.c b/drivers/iio/imu/smi330/smi330_core.c
> index a79964fe68fadf47..83e0dff5d973d046 100644
> --- a/drivers/iio/imu/smi330/smi330_core.c
> +++ b/drivers/iio/imu/smi330/smi330_core.c
> @@ -67,12 +67,6 @@
> #define SMI330_CHIP_ID 0x42
> #define SMI330_SOFT_RESET_DELAY 2000
>
> -/* Non-constant mask variant of FIELD_GET() and FIELD_PREP() */
> -#undef field_get
> -#define field_get(_mask, _reg) (((_reg) & (_mask)) >> (ffs(_mask) - 1))
> -#undef field_prep
> -#define field_prep(_mask, _val) (((_val) << (ffs(_mask) - 1)) & (_mask))
> -
> #define SMI330_ACCEL_CHANNEL(_axis) { \
> .type = IIO_ACCEL, \
> .modified = 1, \
Powered by blists - more mailing lists