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-next>] [day] [month] [year] [list]
Message-Id: <201508032346.36032.marex@denx.de>
Date:	Mon, 3 Aug 2015 23:46:35 +0200
From:	Marek Vasut <marex@...x.de>
To:	Michal Suchanek <hramrach@...il.com>
Cc:	David Woodhouse <dwmw2@...radead.org>,
	Brian Norris <computersforpeace@...il.com>,
	Han Xu <han.xu@...escale.com>,
	" Rafał Miłecki" 
	<zajec5@...il.com>, Huang Shijie <b32955@...escale.com>,
	Ben Hutchings <ben@...adent.org.uk>,
	Gabor Juhos <juhosg@...nwrt.org>,
	"Bean Huo 霍斌斌" 
	<beanhuo@...ron.com>, linux-mtd@...ts.infradead.org,
	linux-kernel@...r.kernel.org, Hou Zhiqiang <B48286@...escale.com>,
	shijie.huang@...el.com
Subject: Re: [PATCH v2 1/6] mtd: spi-nor: change return value of read/write

On Monday, August 03, 2015 at 08:39:01 PM, Michal Suchanek wrote:
> Change the return value of spi-nor device read and write methods to
> allow returning amount of data transferred and errors as
> read(2)/write(2) does.
> 
> Signed-off-by: Michal Suchanek <hramrach@...il.com>
> ---
>  include/linux/mtd/spi-nor.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h
> index e540952..7d782cb 100644
> --- a/include/linux/mtd/spi-nor.h
> +++ b/include/linux/mtd/spi-nor.h
> @@ -185,9 +185,9 @@ struct spi_nor {
>  	int (*write_reg)(struct spi_nor *nor, u8 opcode, u8 *buf, int len,
>  			int write_enable);
> 
> -	int (*read)(struct spi_nor *nor, loff_t from,
> +	ssize_t (*read)(struct spi_nor *nor, loff_t from,
>  			size_t len, size_t *retlen, u_char *read_buf);
> -	void (*write)(struct spi_nor *nor, loff_t to,
> +	ssize_t (*write)(struct spi_nor *nor, loff_t to,
>  			size_t len, size_t *retlen, const u_char *write_buf);
>  	int (*erase)(struct spi_nor *nor, loff_t offs);

You realize that if someone does bisect and has only this patch applied,
the compiler will complain loudly about mismatching data types, right ? :)

Best regards,
Marek Vasut
--
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