mtd: nand: qcom: remove memset for clearing read register buffer
authorAbhishek Sahu <absahu@codeaurora.org>
Wed, 19 Jul 2017 11:47:57 +0000 (17:17 +0530)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Wed, 23 Aug 2017 14:49:17 +0000 (16:49 +0200)
The memset in clear_read_regs is overhead. All the register data
will be filled by DMA during NAND operation so making these
register variables zero is not required.

Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
Reviewed-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/qcom_nandc.c

index 52c0287730e8465b1b9e0eea32ec4387b10a51ee..02be4ac0f10106968bf9f38136c3c94e4f7d5fdd 100644 (file)
@@ -823,8 +823,6 @@ static void free_descs(struct qcom_nand_controller *nandc)
 static void clear_read_regs(struct qcom_nand_controller *nandc)
 {
        nandc->reg_read_pos = 0;
-       memset(nandc->reg_read_buf, 0,
-              MAX_REG_RD * sizeof(*nandc->reg_read_buf));
 }
 
 static void pre_command(struct qcom_nand_host *host, int command)