mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] spi: Kill superfluous cast in spi_w8r16()
@ 2014-01-12 12:59 Geert Uytterhoeven
  2014-01-13 11:20 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2014-01-12 12:59 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-spi, linux-kernel, Geert Uytterhoeven

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(-)

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;
-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] spi: Kill superfluous cast in spi_w8r16()
  2014-01-12 12:59 [PATCH] spi: Kill superfluous cast in spi_w8r16() Geert Uytterhoeven
@ 2014-01-13 11:20 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2014-01-13 11:20 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linux-spi, linux-kernel, Geert Uytterhoeven

[-- Attachment #1: Type: text/plain, Size: 265 bytes --]

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.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-01-13 11:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-12 12:59 [PATCH] spi: Kill superfluous cast in spi_w8r16() Geert Uytterhoeven
2014-01-13 11:20 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®