All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: fbtft: Fix endian sparse warnings
@ 2015-10-21 15:00 Amitoj Kaur Chawla
  2015-10-25  2:36 ` [Outreachy kernel] " Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Amitoj Kaur Chawla @ 2015-10-21 15:00 UTC (permalink / raw)
  To: outreachy-kernel

Fix a bug found using sparse which generates the following warnings:

drivers/staging/fbtft/fbtft-io.c:78:29: warning: incorrect type in
assignment (different base types)
drivers/staging/fbtft/fbtft-io.c:78:29: expected unsigned long long
[unsigned] [long] [long long] [usertype] <noident>
drivers/staging/fbtft/fbtft-io.c:78:29: got restricted __be64
[usertype] <noident>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
---
 drivers/staging/fbtft/fbtft-io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/fbtft/fbtft-io.c b/drivers/staging/fbtft/fbtft-io.c
index a6f091f..a9a46c2 100644
--- a/drivers/staging/fbtft/fbtft-io.c
+++ b/drivers/staging/fbtft/fbtft-io.c
@@ -75,7 +75,7 @@ int fbtft_write_spi_emulate_9(struct fbtft_par *par, void *buf, size_t len)
 			src++;
 		}
 		tmp |= ((*src & 0x0100) ? 1 : 0);
-		*(u64 *)dst = cpu_to_be64(tmp);
+		*(__be64 *)dst = cpu_to_be64(tmp);
 		dst += 8;
 		*dst++ = (u8)(*src++ & 0x00FF);
 		added++;
-- 
1.9.1



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

end of thread, other threads:[~2015-10-25  8:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-21 15:00 [PATCH] staging: fbtft: Fix endian sparse warnings Amitoj Kaur Chawla
2015-10-25  2:36 ` [Outreachy kernel] " Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.