Skip to contentSkip to conversation

mtd: rawnand: qcom: Rename parameter name in macro

PATCH In review Md Sadre Alam 2 participants 2 messages Feb 22, 2021 – Feb 23, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: rawnand: qcom: Rename parameter name in macro

This change will rename parameter name in macro nandc_set_read_loc().renamed parameter names are cw_offset, read_size, is_last_read_loc.
Sinc in QPIC V2 on-wards there is separate location register to read last code word, so to just differnciate b/w is_last_read_loc from last_cw this change needed.

---
 drivers/mtd/nand/raw/qcom_nandc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/mtd/nand/raw/qcom_nandc.c +4 -4
index 4189a7f..bfefb4e 100644
@@ -181,11 +181,11 @@
 #define	ECC_BCH_4BIT	BIT(2)
 #define	ECC_BCH_8BIT	BIT(3)
 
-#define nandc_set_read_loc(nandc, reg, offset, size, is_last)	\
+#define nandc_set_read_loc(nandc, reg, cw_offset, read_size, is_last_read_loc)	\
 nandc_set_reg(nandc, NAND_READ_LOCATION_##reg,			\
-	      ((offset) << READ_LOCATION_OFFSET) |		\
-	      ((size) << READ_LOCATION_SIZE) |			\
-	      ((is_last) << READ_LOCATION_LAST))
+	      ((cw_offset) << READ_LOCATION_OFFSET) |		\
+	      ((read_size) << READ_LOCATION_SIZE) |			\
+	      ((is_last_read_loc) << READ_LOCATION_LAST))
 
 /*
  * Returns the actual register address for all NAND_DEV_ registers
Signature · 6 lines
2.7.4


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
maintainer
#1 lore raw

Hello,

Md Sadre Alam <[email protected]> wrote on Mon, 22 Feb 2021 13:05:42 +0530:

Quoted 6 lines

This change will rename parameter name in macro nandc_set_read_loc().renamed parameter names are cw_offset, read_size, is_last_read_loc.
Sinc in QPIC V2 on-wards there is separate location register to read last code word, so to just differnciate b/w is_last_read_loc from last_cw this change needed.

"
Rename the parameters of the nandc_set_read_loc() macro to avoid the confusion between is_last_read_loc which <explain what it is> and <last_cw> which <explain what it is as well>.

Quoted 16 lines
---
 drivers/mtd/nand/raw/qcom_nandc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/mtd/nand/raw/qcom_nandc.c +1 -1
index 4189a7f..bfefb4e 100644
@@ -181,11 +181,11 @@
 #define	ECC_BCH_4BIT	BIT(2)
 #define	ECC_BCH_8BIT	BIT(3)
 
-#define nandc_set_read_loc(nandc, reg, offset, size, is_last)	\
+#define nandc_set_read_loc(nandc, reg, cw_offset, read_size, is_last_read_loc)	\

drivers/mtd/nand/raw/qcom_nandc.c line 191

Quoted 10 lines
drivers/mtd/nand/raw/qcom_nandc.c +3 -3
 nandc_set_reg(nandc, NAND_READ_LOCATION_##reg,			\
-	      ((offset) << READ_LOCATION_OFFSET) |		\
-	      ((size) << READ_LOCATION_SIZE) |			\
-	      ((is_last) << READ_LOCATION_LAST))
+	      ((cw_offset) << READ_LOCATION_OFFSET) |		\
+	      ((read_size) << READ_LOCATION_SIZE) |			\
+	      ((is_last_read_loc) << READ_LOCATION_LAST))
 
 /*
  * Returns the actual register address for all NAND_DEV_ registers

Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/