All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Norris <computersforpeace@gmail.com>
To: Jagan Teki <jteki@openedev.com>
Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
	David Woodhouse <dwmw2@infradead.org>,
	Han Xu <han.xu@freescale.com>,
	Joachim Eastwood <manabian@gmail.com>
Subject: Re: [PATCH 2/3] mtd: spi-nor: Zap unneeded write_enable from write_reg
Date: Fri, 11 Sep 2015 16:14:16 -0700	[thread overview]
Message-ID: <20150911231416.GK11487@google.com> (raw)
In-Reply-To: <1439978205-6092-2-git-send-email-jteki@openedev.com>

+ Joachim

On Wed, Aug 19, 2015 at 03:26:44PM +0530, Jagan Teki wrote:
> Since write enabling shall do with buf and len without
> need of exctra write_enable argument, hence removed the
> same from write_reg.

I rewrote this description a bit.

> Signed-off-by: Jagan Teki <jteki@openedev.com>
> Cc: David Woodhouse <dwmw2@infradead.org>
> Cc: Brian Norris <computersforpeace@gmail.com>
> Cc: Han Xu <han.xu@freescale.com>
> ---
>  drivers/mtd/devices/m25p80.c      |  3 +--
>  drivers/mtd/spi-nor/fsl-quadspi.c |  3 +--
>  drivers/mtd/spi-nor/spi-nor.c     | 16 ++++++++--------
>  include/linux/mtd/spi-nor.h       |  3 +--
>  4 files changed, 11 insertions(+), 14 deletions(-)
> 

You missed the new drivers/mtd/spi-nor/nxp-spifi.c driver:

  drivers/mtd/spi-nor/nxp-spifi.c: In function 'nxp_spifi_setup_flash':
  drivers/mtd/spi-nor/nxp-spifi.c:340:23: warning: assignment from incompatible pointer type
    spifi->nor.write_reg = nxp_spifi_write_reg;
                         ^

[...]
> diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h
> index e540952..c5a58c4 100644
> --- a/include/linux/mtd/spi-nor.h
> +++ b/include/linux/mtd/spi-nor.h
> @@ -182,8 +182,7 @@ struct spi_nor {
>  	int (*write_xfer)(struct spi_nor *nor, struct spi_nor_xfer_cfg *cfg,
>  			  u8 *buf, size_t len);
>  	int (*read_reg)(struct spi_nor *nor, u8 opcode, u8 *buf, int len);
> -	int (*write_reg)(struct spi_nor *nor, u8 opcode, u8 *buf, int len,
> -			int write_enable);
> +	int (*write_reg)(struct spi_nor *nor, u8 opcode, u8 *buf, int len);
>  
>  	int (*read)(struct spi_nor *nor, loff_t from,
>  			size_t len, size_t *retlen, u_char *read_buf);

Squashed in the following diff and applied to l2-mtd.git/next:

diff --git a/drivers/mtd/spi-nor/nxp-spifi.c b/drivers/mtd/spi-nor/nxp-spifi.c
index ce7bf6b2916b..9e82098ae644 100644
--- a/drivers/mtd/spi-nor/nxp-spifi.c
+++ b/drivers/mtd/spi-nor/nxp-spifi.c
@@ -149,8 +149,7 @@ static int nxp_spifi_read_reg(struct spi_nor *nor, u8 opcode, u8 *buf, int len)
 	return nxp_spifi_wait_for_cmd(spifi);
 }
 
-static int nxp_spifi_write_reg(struct spi_nor *nor, u8 opcode, u8 *buf,
-			       int len, int write_enable)
+static int nxp_spifi_write_reg(struct spi_nor *nor, u8 opcode, u8 *buf, int len)
 {
 	struct nxp_spifi *spifi = nor->priv;
 	u32 cmd;

  parent reply	other threads:[~2015-09-11 23:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-19  9:56 [PATCH 1/3] mtd: spi-nor: Use write_sr for write status Jagan Teki
2015-08-19  9:56 ` [PATCH 2/3] mtd: spi-nor: Zap unneeded write_enable from write_reg Jagan Teki
2015-09-04 11:28   ` Jagan Teki
2015-09-11 23:14   ` Brian Norris [this message]
2015-08-19  9:56 ` [PATCH 3/3] mtd: spi-nor: sf: Add clear flag status register support Jagan Teki
2015-08-19 12:12   ` Hou Zhiqiang
2015-08-19 12:12     ` Hou Zhiqiang
2015-08-19 17:49     ` Jagan Teki
2015-08-20  3:06       ` Hou Zhiqiang
2015-08-20  3:06         ` Hou Zhiqiang
2015-08-21  7:12         ` Jagan Teki
2015-08-25  2:22           ` Hou Zhiqiang
2015-08-25  2:22             ` Hou Zhiqiang
2015-08-26 10:37             ` Jagan Teki
2015-09-04 11:27 ` [PATCH 1/3] mtd: spi-nor: Use write_sr for write status Jagan Teki
2015-09-11 22:59 ` Brian Norris

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=20150911231416.GK11487@google.com \
    --to=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=han.xu@freescale.com \
    --cc=jteki@openedev.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=manabian@gmail.com \
    /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.