public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v7] mtd: rawnand: sunxi: Convert to common field_{get,prep}() helpers
@ 2026-01-15 14:26 Geert Uytterhoeven
  2026-01-22 14:07 ` Miquel Raynal
  0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2026-01-15 14:26 UTC (permalink / raw)
  To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	Richard Genoud
  Cc: linux-mtd, linux-kernel, Geert Uytterhoeven

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@glider.be>
Acked-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
v7:
  - Add Acked-by,

v6:
  - New.
---
 drivers/mtd/nand/raw/sunxi_nand.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c
index 9dcdc93734cbff39..e66adfcca7cd63fb 100644
--- a/drivers/mtd/nand/raw/sunxi_nand.c
+++ b/drivers/mtd/nand/raw/sunxi_nand.c
@@ -29,12 +29,6 @@
 #include <linux/iopoll.h>
 #include <linux/reset.h>
 
-/* non compile-time field get/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 NFC_REG_CTL		0x0000
 #define NFC_REG_ST		0x0004
 #define NFC_REG_INT		0x0008
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v7] mtd: rawnand: sunxi: Convert to common field_{get,prep}() helpers
  2026-01-15 14:26 [PATCH v7] mtd: rawnand: sunxi: Convert to common field_{get,prep}() helpers Geert Uytterhoeven
@ 2026-01-22 14:07 ` Miquel Raynal
  2026-01-22 15:42   ` Geert Uytterhoeven
  0 siblings, 1 reply; 3+ messages in thread
From: Miquel Raynal @ 2026-01-22 14:07 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Richard Weinberger, Vignesh Raghavendra, Richard Genoud,
	linux-mtd, linux-kernel

Hi Geert,

On 15/01/2026 at 15:26:22 +01, Geert Uytterhoeven <geert+renesas@glider.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@glider.be>
> Acked-by: Miquel Raynal <miquel.raynal@bootlin.com>

I think b4 didn't catch up that I applied this patch (in the wrong
branch, then moved it manually), so in case I indeed did not send a
formal "applied to the MTD tree" yet, here it is :-)

Cheers,
Miquèl

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v7] mtd: rawnand: sunxi: Convert to common field_{get,prep}() helpers
  2026-01-22 14:07 ` Miquel Raynal
@ 2026-01-22 15:42   ` Geert Uytterhoeven
  0 siblings, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2026-01-22 15:42 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Richard Weinberger, Vignesh Raghavendra, Richard Genoud,
	linux-mtd, linux-kernel

Hi Miquèl,

On Thu, 22 Jan 2026 at 15:07, Miquel Raynal <miquel.raynal@bootlin.com> wrote:
> On 15/01/2026 at 15:26:22 +01, Geert Uytterhoeven <geert+renesas@glider.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@glider.be>
> > Acked-by: Miquel Raynal <miquel.raynal@bootlin.com>
>
> I think b4 didn't catch up that I applied this patch (in the wrong
> branch, then moved it manually), so in case I indeed did not send a
> formal "applied to the MTD tree" yet, here it is :-)

No worries, I^Wmy scripting had noticed ;-)

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-01-22 15:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-15 14:26 [PATCH v7] mtd: rawnand: sunxi: Convert to common field_{get,prep}() helpers Geert Uytterhoeven
2026-01-22 14:07 ` Miquel Raynal
2026-01-22 15:42   ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox