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
| ||
|
Date: Fri, 17 Mar 2017 18:13:52 +0530 From: Rahul Bedarkar <rahul.bedarkar@...tec.com> To: <linux-mtd@...ts.infradead.org>, <linux-kernel@...r.kernel.org> CC: Rahul Bedarkar <rahul.bedarkar@...tec.com>, David Woodhouse <dwmw2@...radead.org>, Brian Norris <computersforpeace@...il.com>, Boris Brezillon <boris.brezillon@...e-electrons.com>, Marek Vasut <marek.vasut@...il.com>, Richard Weinberger <richard@....at>, Cyrille Pitchen <cyrille.pitchen@...el.com> Subject: [RFC 2/6] mtd: spi-nor: change return value of read_xfer and write_xfer Change return value of read_xfer and write_xfer to allow returning amount of data transferred and errors as read(2)/write(2) does. This makes read_xfer/write_xfer inline with read/write hooks. Inspired-from: Commit 59451e1233bd ("mtd: spi-nor: change return value of read/write") Signed-off-by: Rahul Bedarkar <rahul.bedarkar@...tec.com> Cc: David Woodhouse <dwmw2@...radead.org> Cc: Brian Norris <computersforpeace@...il.com> Cc: Boris Brezillon <boris.brezillon@...e-electrons.com> Cc: Marek Vasut <marek.vasut@...il.com> Cc: Richard Weinberger <richard@....at> Cc: Cyrille Pitchen <cyrille.pitchen@...el.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 0be3f86..64b4a54 100644 --- a/include/linux/mtd/spi-nor.h +++ b/include/linux/mtd/spi-nor.h @@ -223,9 +223,9 @@ struct spi_nor { int (*prepare)(struct spi_nor *nor, enum spi_nor_ops ops); void (*unprepare)(struct spi_nor *nor, enum spi_nor_ops ops); - int (*read_xfer)(struct spi_nor *nor, struct spi_nor_xfer_cfg *cfg, + ssize_t (*read_xfer)(struct spi_nor *nor, struct spi_nor_xfer_cfg *cfg, u8 *buf, size_t len); - int (*write_xfer)(struct spi_nor *nor, struct spi_nor_xfer_cfg *cfg, + ssize_t (*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); -- 2.6.2
Powered by blists - more mailing lists