Skip to contentSkip to conversation

spi: Kill superfluous cast in spi_w8r16()

PATCH Applied Geert Uytterhoeven 2 participants 2 messages Jan 12, 2014 – Jan 13, 2014 SPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spi: Kill superfluous cast in spi_w8r16()

From: Geert Uytterhoeven <[email protected]>

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

---
 include/linux/spi/spi.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/spi/spi.h +1 -1
index 8c62ba74dd91..02a759ef9bc3 100644
@@ -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;
Signature · 6 lines
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
maintainer Applied
#1 lore raw
Quoted 4 lines · Geert Uytterhoeven

From: Geert Uytterhoeven <[email protected]>

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

Applied, thanks.