public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Richard Weinberger <richard@nod.at>,
	David Woodhouse <dwmw2@infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	Marek Vasut <marek.vasut@gmail.com>,
	linux-mtd@lists.infradead.org
Subject: Re: [PATCH] mtd: rawnand: toshiba: Pass a single nand_chip object to the status helper
Date: Thu, 27 Sep 2018 11:17:57 +0200	[thread overview]
Message-ID: <20180927111757.2b6fdd50@bbrezillon> (raw)
In-Reply-To: <20180924093518.22021-1-miquel.raynal@bootlin.com>

On Mon, 24 Sep 2018 11:35:18 +0200
Miquel Raynal <miquel.raynal@bootlin.com> wrote:

> Now that most of the raw NAND API is consistent and has almost all its
> helpers and hooks using a single nand_chip object instead of an mtd_info
> one (or both), let's do the same cleanup in the raw NAND vendors
> drivers.
> 
> Apply this change to the Toshiba driver so that the internal helper to
> retrieve the ECC status does only take a nand_chip object.
> 
> Suggested-by: Boris Brezillon <boris.brezillon@bootlin.com>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>

Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>

> ---
>  drivers/mtd/nand/raw/nand_toshiba.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/mtd/nand/raw/nand_toshiba.c b/drivers/mtd/nand/raw/nand_toshiba.c
> index 941ddc615190..0549c4b59d9c 100644
> --- a/drivers/mtd/nand/raw/nand_toshiba.c
> +++ b/drivers/mtd/nand/raw/nand_toshiba.c
> @@ -23,9 +23,9 @@
>  /* Recommended to rewrite for BENAND */
>  #define TOSHIBA_NAND_STATUS_REWRITE_RECOMMENDED	BIT(3)
>  
> -static int toshiba_nand_benand_eccstatus(struct mtd_info *mtd,
> -					 struct nand_chip *chip)
> +static int toshiba_nand_benand_eccstatus(struct nand_chip *chip)
>  {
> +	struct mtd_info *mtd = nand_to_mtd(chip);
>  	int ret;
>  	unsigned int max_bitflips = 0;
>  	u8 status;
> @@ -58,7 +58,7 @@ toshiba_nand_read_page_benand(struct nand_chip *chip, uint8_t *buf,
>  	if (ret)
>  		return ret;
>  
> -	return toshiba_nand_benand_eccstatus(mtd, chip);
> +	return toshiba_nand_benand_eccstatus(chip);
>  }
>  
>  static int
> @@ -73,7 +73,7 @@ toshiba_nand_read_subpage_benand(struct nand_chip *chip, uint32_t data_offs,
>  	if (ret)
>  		return ret;
>  
> -	return toshiba_nand_benand_eccstatus(mtd, chip);
> +	return toshiba_nand_benand_eccstatus(chip);
>  }
>  
>  static void toshiba_nand_benand_init(struct nand_chip *chip)

  reply	other threads:[~2018-09-27  9:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-24  9:35 [PATCH] mtd: rawnand: toshiba: Pass a single nand_chip object to the status helper Miquel Raynal
2018-09-27  9:17 ` Boris Brezillon [this message]
2018-10-05 14:35 ` 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=20180927111757.2b6fdd50@bbrezillon \
    --to=boris.brezillon@bootlin.com \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    /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