linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: cgel.zte@gmail.com
To: miquel.raynal@bootlin.com
Cc: cgel.zte@gmail.com, chi.minghao@zte.com.cn, han.xu@nxp.com,
	linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,
	richard@nod.at, vigneshr@ti.com, zealci@zte.com.cn
Subject: [PATCH nand-next v2] mtd: rawnand: gpmi: remove unneeded variable
Date: Mon, 13 Dec 2021 10:49:30 +0000	[thread overview]
Message-ID: <20211213104930.436602-1-chi.minghao@zte.com.cn> (raw)
In-Reply-To: <20211213101519.25f4e2e1@xps13>

From: Minghao Chi <chi.minghao@zte.com.cn>

Return status directly from function called.
change since v1: mtd/nand:remove unneeded variable
             v2: mtd: rawnand: gpmi: remove unneeded variable

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
---
 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
index 10cc71829dcb..ab9d1099bafa 100644
--- a/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
@@ -1425,7 +1425,6 @@ static int gpmi_ecc_write_page(struct nand_chip *chip, const uint8_t *buf,
 	struct mtd_info *mtd = nand_to_mtd(chip);
 	struct gpmi_nand_data *this = nand_get_controller_data(chip);
 	struct bch_geometry *nfc_geo = &this->bch_geometry;
-	int ret;
 
 	dev_dbg(this->dev, "ecc write page.\n");
 
@@ -1445,9 +1444,7 @@ static int gpmi_ecc_write_page(struct nand_chip *chip, const uint8_t *buf,
 				    this->auxiliary_virt);
 	}
 
-	ret = nand_prog_page_op(chip, page, 0, buf, nfc_geo->page_size);
-
-	return ret;
+	return nand_prog_page_op(chip, page, 0, buf, nfc_geo->page_size);
 }
 
 /*
-- 
2.25.1


  reply	other threads:[~2021-12-13 10:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-10  2:18 [PATCH nand-next] mtd/nand:remove unneeded variable cgel.zte
2021-12-13  9:16 ` Miquel Raynal
2021-12-13 10:49   ` cgel.zte [this message]
2021-12-13 11:00     ` [PATCH nand-next v2] mtd: rawnand: gpmi: remove " Miquel Raynal
2021-12-13 11:26   ` [PATCH v3 nand-next] " cgel.zte
2021-12-17 12:19     ` Miquel Raynal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211213104930.436602-1-chi.minghao@zte.com.cn \
    --to=cgel.zte@gmail.com \
    --cc=chi.minghao@zte.com.cn \
    --cc=han.xu@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.com \
    --cc=zealci@zte.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).