[PATCH] mtd: meson: fix meson_nfc_dma_buffer_release() arguments
sa
saproj at gmail.com
Tue Oct 27 18:20:15 EDT 2020
From: Sergei Antonov <saproj at gmail.com>
Arguments 'infolen' and 'datalen' to meson_nfc_dma_buffer_release() were mixed up.
Also extra spaces removed.
Signed-off-by: Sergei Antonov <saproj at gmail.com>
Cc: Miquel Raynal <miquel.raynal at bootlin.com>
Cc: Liang Yang <liang.yang at amlogic.com>
Cc: Yixun Lan <yixun.lan at amlogic.com>
Cc: Jianxin Pan <jianxin.pan at amlogic.com>
---
drivers/mtd/nand/raw/meson_nand.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/mtd/nand/raw/meson_nand.c b/drivers/mtd/nand/raw/meson_nand.c
index 48e6dac96be6..578373a3d213 100644
--- a/drivers/mtd/nand/raw/meson_nand.c
+++ b/drivers/mtd/nand/raw/meson_nand.c
@@ -246,7 +246,7 @@ static void meson_nfc_select_chip(struct nand_chip *nand, int chip)
value = (NFC_CLK_CYCLE - 1) | (meson_chip->bus_timing << 5);
writel(value, nfc->reg_base + NFC_REG_CFG);
writel((1 << 31), nfc->reg_base + NFC_REG_CMD);
- nfc->bus_timing = meson_chip->bus_timing;
+ nfc->bus_timing = meson_chip->bus_timing;
}
}
@@ -510,7 +510,7 @@ static int meson_nfc_dma_buffer_setup(struct nand_chip *nand, void *databuf,
}
static void meson_nfc_dma_buffer_release(struct nand_chip *nand,
- int infolen, int datalen,
+ int datalen, int infolen,
enum dma_data_direction dir)
{
struct meson_nfc *nfc = nand_get_controller_data(nand);
@@ -637,7 +637,7 @@ static int meson_nfc_write_page_sub(struct nand_chip *nand,
meson_nfc_select_chip(nand, nand->cur_cs);
- data_len = mtd->writesize + mtd->oobsize;
+ data_len = mtd->writesize + mtd->oobsize;
info_len = nand->ecc.steps * PER_INFO_BYTE;
ret = meson_nfc_rw_cmd_prepare_and_execute(nand, page, DIRWRITE);
@@ -721,7 +721,7 @@ static int meson_nfc_read_page_sub(struct nand_chip *nand,
meson_nfc_select_chip(nand, nand->cur_cs);
- data_len = mtd->writesize + mtd->oobsize;
+ data_len = mtd->writesize + mtd->oobsize;
info_len = nand->ecc.steps * PER_INFO_BYTE;
ret = meson_nfc_rw_cmd_prepare_and_execute(nand, page, DIRREAD);
@@ -792,7 +792,7 @@ static int meson_nfc_read_page_hwecc(struct nand_chip *nand, u8 *buf,
mtd->ecc_stats.failed++;
return bitflips;
}
- ret = meson_nfc_read_page_raw(nand, buf, 0, page);
+ ret = meson_nfc_read_page_raw(nand, buf, 0, page);
if (ret)
return ret;
@@ -810,7 +810,7 @@ static int meson_nfc_read_page_hwecc(struct nand_chip *nand, u8 *buf,
mtd->ecc_stats.failed++;
} else {
mtd->ecc_stats.corrected += ret;
- bitflips = max_t(u32, bitflips, ret);
+ bitflips = max_t(u32, bitflips, ret);
}
}
} else if (buf && buf != meson_chip->data_buf) {
@@ -960,7 +960,7 @@ static int meson_ooblayout_ecc(struct mtd_info *mtd, int section,
if (section >= nand->ecc.steps)
return -ERANGE;
- oobregion->offset = 2 + (section * (2 + nand->ecc.bytes));
+ oobregion->offset = 2 + (section * (2 + nand->ecc.bytes));
oobregion->length = nand->ecc.bytes;
return 0;
@@ -1080,7 +1080,7 @@ static int meson_chip_buffer_init(struct nand_chip *nand)
nsectors = mtd->writesize / nand->ecc.size;
- page_bytes = mtd->writesize + mtd->oobsize;
+ page_bytes = mtd->writesize + mtd->oobsize;
info_bytes = nsectors * PER_INFO_BYTE;
meson_chip->data_buf = kmalloc(page_bytes, GFP_KERNEL);
@@ -1459,7 +1459,7 @@ static struct platform_driver meson_nfc_driver = {
.probe = meson_nfc_probe,
.remove = meson_nfc_remove,
.driver = {
- .name = "meson-nand",
+ .name = "meson-nand",
.of_match_table = meson_nfc_id_table,
},
};
--
2.17.1
More information about the linux-mtd
mailing list