Thread (2 messages) 2 messages, 2 authors, 2025-10-24

Re: [PATCH v3 07/15] mtd: rawnand: sunxi: introduce ecc_mode_mask in sunxi_nfc_caps

From: Richard GENOUD <richard.genoud@bootlin.com>
Date: 2025-10-24 07:52:43
Also in: linux-devicetree, linux-sunxi, lkml

Hi,
Le 22/10/2025 à 11:05, Miquel Raynal a écrit :
Hi Richard,

On 20/10/2025 at 12:13:03 +02, Richard Genoud [off-list ref] wrote:
quoted
The H6/H616 ECC_MODE field is not at the same offset, and has not the
same size.
So move the mask into sunxi_nfc_caps.

No functional change.

Signed-off-by: Richard Genoud <richard.genoud@bootlin.com>
---
  drivers/mtd/nand/raw/sunxi_nand.c | 13 +++++++++----
  1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c
index 70c940840dda..4118307cac15 100644
--- a/drivers/mtd/nand/raw/sunxi_nand.c
+++ b/drivers/mtd/nand/raw/sunxi_nand.c
@@ -29,8 +29,9 @@
  #include <linux/iopoll.h>
  #include <linux/reset.h>
  
-/* non compile-time field get */
+/* non compile-time field get/prep */
  #define field_get(_mask, _reg) (((_reg) & (_mask)) >> (ffs(_mask) - 1))
+#define field_prep(_mask, _val) (((_val) << (ffs(_mask) - 1)) &
(_mask))
This could probably require a mention in the commit message, as for the
introduction of the field_get() helper.

No need to resend just for this either.
Ok, will do.
Thanks,
Miquèl
Thanks!

-- 
Richard Genoud, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help