All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: linux-mtd <linux-mtd@lists.infradead.org>,
	Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: Marek Vasut <marek.vasut@gmail.com>,
	Richard Weinberger <richard@nod.at>,
	Kamal Dasu <kdasu.kdev@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Chen-Yu Tsai <wens@csie.org>,
	Broadcom Kernel Feedback List 
	<bcm-kernel-feedback-list@broadcom.com>,
	Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>,
	Han Xu <han.xu@nxp.com>,
	Maxime Ripard <maxime.ripard@free-electrons.com>,
	Brian Norris <computersforpeace@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2 3/3] mtd: nand: squash struct nand_buffers into struct nand_chip
Date: Tue, 5 Dec 2017 20:49:28 +0900	[thread overview]
Message-ID: <CAK7LNATKBO=eNHdL_P2MOh7+uRcCjkq+v8+O3DXC5UF3-NGh2Q@mail.gmail.com> (raw)
In-Reply-To: <1512463636-28934-3-git-send-email-yamada.masahiro@socionext.com>

2017-12-05 17:47 GMT+09:00 Masahiro Yamada <yamada.masahiro@socionext.com>:
> struct nand_buffers is malloc'ed in nand_scan_tail() just for
> containing three pointers.  Squash this struct into nand_chip.
>
> Move and rename as follows:
>
>   chip->buffers->ecccalc   ->  chip->ecc.calc_buf
>   chip->buffers->ecccode   ->  chip->ecc.code_buf
>   chip->buffers->databuf   ->  chip->data_buf
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>




> diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
> index dad438c..7870cb1 100644
> --- a/drivers/mtd/nand/omap2.c
> +++ b/drivers/mtd/nand/omap2.c
> @@ -1530,7 +1530,7 @@ static int omap_write_page_bch(struct mtd_info *mtd, struct nand_chip *chip,
>                                const uint8_t *buf, int oob_required, int page)
>  {
>         int ret;
> -       uint8_t *ecc_calc = chip->buffers->ecccalc;
> +       uint8_t *ecc_calc = chip->ecccalc;
>
>         /* Enable GPMC ecc engine */
>         chip->ecc.hwctl(mtd, NAND_ECC_WRITE);
> @@ -1568,7 +1568,7 @@ static int omap_write_subpage_bch(struct mtd_info *mtd,
>                                   u32 data_len, const u8 *buf,
>                                   int oob_required, int page)
>  {
> -       u8 *ecc_calc = chip->buffers->ecccalc;
> +       u8 *ecc_calc = chip->ecccalc;
>         int ecc_size      = chip->ecc.size;
>         int ecc_bytes     = chip->ecc.bytes;
>         int ecc_steps     = chip->ecc.steps;
> @@ -1605,7 +1605,7 @@ static int omap_write_subpage_bch(struct mtd_info *mtd,
>
>         /* copy calculated ECC for whole page to chip->buffer->oob */
>         /* this include masked-value(0xFF) for unwritten subpages */
> -       ecc_calc = chip->buffers->ecccalc;
> +       ecc_calc = chip->ecccalc;
>         ret = mtd_ooblayout_set_eccbytes(mtd, ecc_calc, chip->oob_poi, 0,
>                                          chip->ecc.total);
>         if (ret)
> @@ -1635,8 +1635,8 @@ static int omap_write_subpage_bch(struct mtd_info *mtd,
>  static int omap_read_page_bch(struct mtd_info *mtd, struct nand_chip *chip,
>                                 uint8_t *buf, int oob_required, int page)
>  {
> -       uint8_t *ecc_calc = chip->buffers->ecccalc;
> -       uint8_t *ecc_code = chip->buffers->ecccode;
> +       uint8_t *ecc_calc = chip->ecccalc;
> +       uint8_t *ecc_code = chip->ecccode;
>         int stat, ret;
>         unsigned int max_bitflips = 0;
>



Sorry, I missed to update omap2.c

I will send v3.

WARNING: multiple messages have this Message-ID (diff)
From: yamada.masahiro@socionext.com (Masahiro Yamada)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 3/3] mtd: nand: squash struct nand_buffers into struct nand_chip
Date: Tue, 5 Dec 2017 20:49:28 +0900	[thread overview]
Message-ID: <CAK7LNATKBO=eNHdL_P2MOh7+uRcCjkq+v8+O3DXC5UF3-NGh2Q@mail.gmail.com> (raw)
In-Reply-To: <1512463636-28934-3-git-send-email-yamada.masahiro@socionext.com>

2017-12-05 17:47 GMT+09:00 Masahiro Yamada <yamada.masahiro@socionext.com>:
> struct nand_buffers is malloc'ed in nand_scan_tail() just for
> containing three pointers.  Squash this struct into nand_chip.
>
> Move and rename as follows:
>
>   chip->buffers->ecccalc   ->  chip->ecc.calc_buf
>   chip->buffers->ecccode   ->  chip->ecc.code_buf
>   chip->buffers->databuf   ->  chip->data_buf
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>




> diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
> index dad438c..7870cb1 100644
> --- a/drivers/mtd/nand/omap2.c
> +++ b/drivers/mtd/nand/omap2.c
> @@ -1530,7 +1530,7 @@ static int omap_write_page_bch(struct mtd_info *mtd, struct nand_chip *chip,
>                                const uint8_t *buf, int oob_required, int page)
>  {
>         int ret;
> -       uint8_t *ecc_calc = chip->buffers->ecccalc;
> +       uint8_t *ecc_calc = chip->ecccalc;
>
>         /* Enable GPMC ecc engine */
>         chip->ecc.hwctl(mtd, NAND_ECC_WRITE);
> @@ -1568,7 +1568,7 @@ static int omap_write_subpage_bch(struct mtd_info *mtd,
>                                   u32 data_len, const u8 *buf,
>                                   int oob_required, int page)
>  {
> -       u8 *ecc_calc = chip->buffers->ecccalc;
> +       u8 *ecc_calc = chip->ecccalc;
>         int ecc_size      = chip->ecc.size;
>         int ecc_bytes     = chip->ecc.bytes;
>         int ecc_steps     = chip->ecc.steps;
> @@ -1605,7 +1605,7 @@ static int omap_write_subpage_bch(struct mtd_info *mtd,
>
>         /* copy calculated ECC for whole page to chip->buffer->oob */
>         /* this include masked-value(0xFF) for unwritten subpages */
> -       ecc_calc = chip->buffers->ecccalc;
> +       ecc_calc = chip->ecccalc;
>         ret = mtd_ooblayout_set_eccbytes(mtd, ecc_calc, chip->oob_poi, 0,
>                                          chip->ecc.total);
>         if (ret)
> @@ -1635,8 +1635,8 @@ static int omap_write_subpage_bch(struct mtd_info *mtd,
>  static int omap_read_page_bch(struct mtd_info *mtd, struct nand_chip *chip,
>                                 uint8_t *buf, int oob_required, int page)
>  {
> -       uint8_t *ecc_calc = chip->buffers->ecccalc;
> -       uint8_t *ecc_code = chip->buffers->ecccode;
> +       uint8_t *ecc_calc = chip->ecccalc;
> +       uint8_t *ecc_code = chip->ecccode;
>         int stat, ret;
>         unsigned int max_bitflips = 0;
>



Sorry, I missed to update omap2.c

I will send v3.

  reply	other threads:[~2017-12-05 11:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-05  8:47 [PATCH v2 1/3] mtd: nand: cafe: remove use of NAND_OWN_BUFFERS Masahiro Yamada
2017-12-05  8:47 ` [PATCH v2 2/3] mtd: nand: remove unused NAND_OWN_BUFFERS flag Masahiro Yamada
2017-12-05  8:47 ` [PATCH v2 3/3] mtd: nand: squash struct nand_buffers into struct nand_chip Masahiro Yamada
2017-12-05  8:47   ` Masahiro Yamada
2017-12-05 11:49   ` Masahiro Yamada [this message]
2017-12-05 11:49     ` Masahiro Yamada
2017-12-05 11:49     ` Masahiro Yamada
2017-12-05 11:57     ` Boris Brezillon
2017-12-05 11:57       ` Boris Brezillon
2017-12-05 11:57       ` Boris Brezillon
2017-12-05 12:28       ` Masahiro Yamada
2017-12-05 12:28         ` Masahiro Yamada
2017-12-05 12:28         ` Masahiro Yamada
2017-12-05 13:30         ` Boris Brezillon
2017-12-05 13:30           ` Boris Brezillon
2017-12-05 13:30           ` Boris Brezillon
2017-12-05  9:44 ` [PATCH v2 1/3] mtd: nand: cafe: remove use of NAND_OWN_BUFFERS Boris Brezillon
2017-12-07 20:18 ` Boris Brezillon

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='CAK7LNATKBO=eNHdL_P2MOh7+uRcCjkq+v8+O3DXC5UF3-NGh2Q@mail.gmail.com' \
    --to=yamada.masahiro@socionext.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=computersforpeace@gmail.com \
    --cc=cyrille.pitchen@wedev4u.fr \
    --cc=dwmw2@infradead.org \
    --cc=han.xu@nxp.com \
    --cc=kdasu.kdev@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=maxime.ripard@free-electrons.com \
    --cc=richard@nod.at \
    --cc=wens@csie.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.