diff mbox

spi: Kill superfluous cast in spi_w8r16()

Message ID 1389531546-5867-1-git-send-email-geert@linux-m68k.org (mailing list archive)
State Accepted
Commit 269ccca8ec1a3991e07eaf5f90326134bd17781a
Headers show

Commit Message

Geert Uytterhoeven Jan. 12, 2014, 12:59 p.m. UTC
From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>

spi_write_then_read() takes a "void *" for rxbuf, so there's no need to
cast the buffer pointer to "u8 *".

Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
---
 include/linux/spi/spi.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mark Brown Jan. 13, 2014, 11:20 a.m. UTC | #1
On Sun, Jan 12, 2014 at 01:59:06PM +0100, Geert Uytterhoeven wrote:
> From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
> 
> spi_write_then_read() takes a "void *" for rxbuf, so there's no need to
> cast the buffer pointer to "u8 *".

Applied, thanks.
diff mbox

Patch

diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index 8c62ba74dd91..02a759ef9bc3 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -847,7 +847,7 @@  static inline ssize_t spi_w8r16(struct spi_device *spi, u8 cmd)
 	ssize_t			status;
 	u16			result;
 
-	status = spi_write_then_read(spi, &cmd, 1, (u8 *) &result, 2);
+	status = spi_write_then_read(spi, &cmd, 1, &result, 2);
 
 	/* return negative errno or unsigned value */
 	return (status < 0) ? status : result;