mtd: meson: fix meson_nfc_dma_buffer_release() arguments
Subsystems (4)
PATCH 1/1 mtd: meson: fix meson_nfc_dma_buffer_release() arguments
From: Sergei Antonov <[email protected]>
Arguments 'infolen' and 'datalen' to meson_nfc_dma_buffer_release() were mixed up. Also extra spaces removed.
--- drivers/mtd/nand/raw/meson_nand.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
drivers/mtd/nand/raw/meson_nand.c +9 -9
@@ -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, }, };
Signature · 6 lines
2.17.1 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
Miquel Raynal
maintainerHello Sergei,
sa <[email protected]> wrote on Wed, 28 Oct 2020 01:20:15 +0300:
Quoted 4 lines
From: Sergei Antonov <[email protected]>
Arguments 'infolen' and 'datalen' to
meson_nfc_dma_buffer_release()were mixed up. Also extra spaces removed.
If this is true, then this is definitely a big fix that needs a Fixes:
tag as well as a Cc: stable tag. The other Cc: are not really needed in the patch though, you just need to add these people when sending the patch.
Also, please split this into two chunks. Backporting a fix with so much extra changes is a pain:
- 1/2: fix the arguments
- 2/2: fix the extra spaces (no need for a Fixes/Stable tag here).
Thanks!
Miquèl
Quoted 5 lines
Signed-off-by Sergei Antonov <[email protected]>Cc Miquel Raynal <[email protected]>Cc Liang Yang <[email protected]>Cc Yixun Lan <[email protected]>Cc Jianxin Pan <[email protected]>
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/