lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150911231416.GK11487@google.com>
Date:	Fri, 11 Sep 2015 16:14:16 -0700
From:	Brian Norris <computersforpeace@...il.com>
To:	Jagan Teki <jteki@...nedev.com>
Cc:	linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org,
	David Woodhouse <dwmw2@...radead.org>,
	Han Xu <han.xu@...escale.com>,
	Joachim Eastwood <manabian@...il.com>
Subject: Re: [PATCH 2/3] mtd: spi-nor: Zap unneeded write_enable from
 write_reg

+ 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@...nedev.com>
> Cc: David Woodhouse <dwmw2@...radead.org>
> Cc: Brian Norris <computersforpeace@...il.com>
> Cc: Han Xu <han.xu@...escale.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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ