OSDN Git Service

staging: fbtft: fix sparse warning
authorJandy Gou <gouqingsong@goodix.com>
Tue, 16 May 2017 08:28:09 +0000 (16:28 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 16 May 2017 11:56:36 +0000 (13:56 +0200)
fix the following sparse warning:
 drivers/staging/fbtft/fbtft-io.c:74:29: warning: incorrect type in assignment
 (different base types) drivers/staging/fbtft/fbtft-io.c:74:29:    expected
 unsigned long long [unsigned] [long] [long long] [usertype] <noident>
 drivers/staging/fbtft/fbtft-io.c:74:29:    got restricted __be64 [usertype]
 <noident>

Signed-off-by: Jandy Gou <gouqingsong@goodix.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fbtft/fbtft-io.c

index d868405..ffb9a3b 100644 (file)
@@ -71,7 +71,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++;