linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nand-next] mtd/nand:remove unneeded variable
@ 2021-12-10  2:18 cgel.zte
  2021-12-13  9:16 ` Miquel Raynal
  0 siblings, 1 reply; 6+ messages in thread
From: cgel.zte @ 2021-12-10  2:18 UTC (permalink / raw)
  To: han.xu
  Cc: miquel.raynal, richard, vigneshr, linux-mtd, linux-kernel,
	Minghao Chi, Zeal Robot

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

Return status directly from function called.

Reported-by: Zeal Robot <zealci@zte.com.cm>
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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH nand-next] mtd/nand:remove unneeded variable
  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   ` [PATCH nand-next v2] mtd: rawnand: gpmi: remove " cgel.zte
  2021-12-13 11:26   ` [PATCH v3 nand-next] " cgel.zte
  0 siblings, 2 replies; 6+ messages in thread
From: Miquel Raynal @ 2021-12-13  9:16 UTC (permalink / raw)
  To: cgel.zte
  Cc: han.xu, richard, vigneshr, linux-mtd, linux-kernel, Minghao Chi,
	Zeal Robot

Hello,

cgel.zte@gmail.com wrote on Fri, 10 Dec 2021 02:18:22 +0000:

> From: Minghao Chi <chi.minghao@zte.com.cn>
> 
> Return status directly from function called.

The subject prefix should be "mtd: rawnand: gpmi: "

> 
> Reported-by: Zeal Robot <zealci@zte.com.cm>
> 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);
>  }
>  
>  /*


Thanks,
Miquèl

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH nand-next v2] mtd: rawnand: gpmi: remove unneeded variable
  2021-12-13  9:16 ` Miquel Raynal
@ 2021-12-13 10:49   ` cgel.zte
  2021-12-13 11:00     ` Miquel Raynal
  2021-12-13 11:26   ` [PATCH v3 nand-next] " cgel.zte
  1 sibling, 1 reply; 6+ messages in thread
From: cgel.zte @ 2021-12-13 10:49 UTC (permalink / raw)
  To: miquel.raynal
  Cc: cgel.zte, chi.minghao, han.xu, linux-kernel, linux-mtd, richard,
	vigneshr, zealci

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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH nand-next v2] mtd: rawnand: gpmi: remove unneeded variable
  2021-12-13 10:49   ` [PATCH nand-next v2] mtd: rawnand: gpmi: remove " cgel.zte
@ 2021-12-13 11:00     ` Miquel Raynal
  0 siblings, 0 replies; 6+ messages in thread
From: Miquel Raynal @ 2021-12-13 11:00 UTC (permalink / raw)
  To: cgel.zte
  Cc: chi.minghao, han.xu, linux-kernel, linux-mtd, richard, vigneshr, zealci

Hello,

cgel.zte@gmail.com wrote on Mon, 13 Dec 2021 10:49:30 +0000:

> 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

Thanks for providing a changelog, this is indeed the right thing to do.
However it should not be part of the commit message and hence not be
located here...

> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
> ---

... but here!

Anything below these three dashes '---' will be ignored by Git.

>  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);
>  }
>  
>  /*


Thanks,
Miquèl

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v3 nand-next] mtd: rawnand: gpmi: remove unneeded variable
  2021-12-13  9:16 ` Miquel Raynal
  2021-12-13 10:49   ` [PATCH nand-next v2] mtd: rawnand: gpmi: remove " cgel.zte
@ 2021-12-13 11:26   ` cgel.zte
  2021-12-17 12:19     ` Miquel Raynal
  1 sibling, 1 reply; 6+ messages in thread
From: cgel.zte @ 2021-12-13 11:26 UTC (permalink / raw)
  To: miquel.raynal
  Cc: cgel.zte, chi.minghao, han.xu, linux-kernel, linux-mtd, richard,
	vigneshr, zealci

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

Return status directly from function called.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
---
change since v1: mtd/nand:remove unneeded variable
             v2: mtd: rawnand: gpmi: remove unneeded variable
             v3: move the update log here
 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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v3 nand-next] mtd: rawnand: gpmi: remove unneeded variable
  2021-12-13 11:26   ` [PATCH v3 nand-next] " cgel.zte
@ 2021-12-17 12:19     ` Miquel Raynal
  0 siblings, 0 replies; 6+ messages in thread
From: Miquel Raynal @ 2021-12-17 12:19 UTC (permalink / raw)
  To: cgel.zte, miquel.raynal
  Cc: chi.minghao, han.xu, linux-kernel, linux-mtd, richard, vigneshr, zealci

On Mon, 2021-12-13 at 11:26:27 UTC, cgel.zte@gmail.com wrote:
> From: Minghao Chi <chi.minghao@zte.com.cn>
> 
> Return status directly from function called.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Miquel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-12-17 12:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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   ` [PATCH nand-next v2] mtd: rawnand: gpmi: remove " cgel.zte
2021-12-13 11:00     ` Miquel Raynal
2021-12-13 11:26   ` [PATCH v3 nand-next] " cgel.zte
2021-12-17 12:19     ` 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).