From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755735AbbIKXOW (ORCPT ); Fri, 11 Sep 2015 19:14:22 -0400 Received: from mail-pa0-f48.google.com ([209.85.220.48]:35403 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754392AbbIKXOT (ORCPT ); Fri, 11 Sep 2015 19:14:19 -0400 Date: Fri, 11 Sep 2015 16:14:16 -0700 From: Brian Norris To: Jagan Teki Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, David Woodhouse , Han Xu , Joachim Eastwood Subject: Re: [PATCH 2/3] mtd: spi-nor: Zap unneeded write_enable from write_reg Message-ID: <20150911231416.GK11487@google.com> References: <1439978205-6092-1-git-send-email-jteki@openedev.com> <1439978205-6092-2-git-send-email-jteki@openedev.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1439978205-6092-2-git-send-email-jteki@openedev.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org + 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 > Cc: David Woodhouse > Cc: Brian Norris > Cc: Han Xu > --- > 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;