[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210803113300.24230-1-wangborong@cdjrlc.com>
Date: Tue, 3 Aug 2021 19:33:00 +0800
From: Jason Wang <wangborong@...rlc.com>
To: miquel.raynal@...tlin.com
Cc: liang.yang@...ogic.com, vigneshr@...com, narmstrong@...libre.com,
khilman@...libre.com, richard@....at, jbrunet@...libre.com,
martin.blumenstingl@...glemail.com, linux-mtd@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org,
linux-amlogic@...ts.infradead.org, linux-kernel@...r.kernel.org,
Jason Wang <wangborong@...rlc.com>
Subject: [PATCH] mtd: rawnand: remove never changed ret variable
The ret variable used for returning value in the function
`meson_nfc_rw_cmd_prepare_and_execute` is never change after initialising.
Therefore, we can remove it safely and return 0 at the end of the function.
Signed-off-by: Jason Wang <wangborong@...rlc.com>
---
drivers/mtd/nand/raw/meson_nand.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/nand/raw/meson_nand.c b/drivers/mtd/nand/raw/meson_nand.c
index 817bddccb775..ac3be92872d0 100644
--- a/drivers/mtd/nand/raw/meson_nand.c
+++ b/drivers/mtd/nand/raw/meson_nand.c
@@ -580,7 +580,7 @@ static int meson_nfc_rw_cmd_prepare_and_execute(struct nand_chip *nand,
u32 *addrs = nfc->cmdfifo.rw.addrs;
u32 cs = nfc->param.chip_select;
u32 cmd0, cmd_num, row_start;
- int ret = 0, i;
+ int i;
cmd_num = sizeof(struct nand_rw_cmd) / sizeof(int);
@@ -620,7 +620,7 @@ static int meson_nfc_rw_cmd_prepare_and_execute(struct nand_chip *nand,
meson_nfc_cmd_idle(nfc, nfc->timing.tadl);
}
- return ret;
+ return 0;
}
static int meson_nfc_write_page_sub(struct nand_chip *nand,
--
2.32.0
Powered by blists - more mailing lists