* [PATCH linux-next] mtd: rawnand: Remove the unneeded result variable
@ 2022-09-01 7:45 cgel.zte
2022-09-20 8:33 ` Miquel Raynal
0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2022-09-01 7:45 UTC (permalink / raw)
To: miquel.raynal
Cc: richard, vigneshr, yangyingliang, linux-mtd, linux-kernel,
ye xingchen, Zeal Robot
From: ye xingchen <ye.xingchen@zte.com.cn>
Return the value cadence_nand_set_access_width16() directly instead of
storing it in another redundant variable.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
drivers/mtd/nand/raw/cadence-nand-controller.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/mtd/nand/raw/cadence-nand-controller.c b/drivers/mtd/nand/raw/cadence-nand-controller.c
index 0d72672f8b64..9dac3ca69d57 100644
--- a/drivers/mtd/nand/raw/cadence-nand-controller.c
+++ b/drivers/mtd/nand/raw/cadence-nand-controller.c
@@ -1979,7 +1979,6 @@ static int cadence_nand_force_byte_access(struct nand_chip *chip,
bool force_8bit)
{
struct cdns_nand_ctrl *cdns_ctrl = to_cdns_nand_ctrl(chip->controller);
- int status;
/*
* Callers of this function do not verify if the NAND is using a 16-bit
@@ -1990,9 +1989,7 @@ static int cadence_nand_force_byte_access(struct nand_chip *chip,
if (!(chip->options & NAND_BUSWIDTH_16))
return 0;
- status = cadence_nand_set_access_width16(cdns_ctrl, !force_8bit);
-
- return status;
+ return cadence_nand_set_access_width16(cdns_ctrl, !force_8bit);
}
static int cadence_nand_cmd_opcode(struct nand_chip *chip,
--
2.25.1
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH linux-next] mtd: rawnand: Remove the unneeded result variable
2022-09-01 7:45 [PATCH linux-next] mtd: rawnand: Remove the unneeded result variable cgel.zte
@ 2022-09-20 8:33 ` Miquel Raynal
0 siblings, 0 replies; 2+ messages in thread
From: Miquel Raynal @ 2022-09-20 8:33 UTC (permalink / raw)
To: cgel.zte, miquel.raynal
Cc: richard, vigneshr, yangyingliang, linux-mtd, linux-kernel,
ye xingchen, Zeal Robot
On Thu, 2022-09-01 at 07:45:54 UTC, cgel.zte@gmail.com wrote:
> From: ye xingchen <ye.xingchen@zte.com.cn>
>
> Return the value cadence_nand_set_access_width16() directly instead of
> storing it in another redundant variable.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-20 8:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-01 7:45 [PATCH linux-next] mtd: rawnand: Remove the unneeded result variable cgel.zte
2022-09-20 8:33 ` Miquel Raynal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).