staging: fbtft: fix type assignment warning
authorAlex Wilson <alex.david.wilson@gmail.com>
Thu, 30 Mar 2017 07:16:02 +0000 (01:16 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 8 Apr 2017 15:05:59 +0000 (17:05 +0200)
Sparse spits out a warning that a __be16 was being assigned to a u16.
Change the type of txbuf16 to __be16 b/c it's a restricted type and
prevents mixing endianness.

Signed-off-by: Alex Wilson <alex.david.wilson@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fbtft/fbtft-bus.c

index 3475b1b8081f802d3beeaccd396244d0b5b83183..a80b5d115ff846f441bf7ae16854726e38b8f8ca 100644 (file)
@@ -114,7 +114,7 @@ EXPORT_SYMBOL(fbtft_write_reg8_bus9);
 int fbtft_write_vmem16_bus8(struct fbtft_par *par, size_t offset, size_t len)
 {
        u16 *vmem16;
-       u16 *txbuf16 = par->txbuf.buf;
+       __be16 *txbuf16 = par->txbuf.buf;
        size_t remain;
        size_t to_copy;
        size_t tx_array_size;