staging: fbtft: remove redundant initialization of buf
authorColin Ian King <colin.king@canonical.com>
Fri, 3 Nov 2017 13:17:51 +0000 (13:17 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Nov 2017 15:44:06 +0000 (16:44 +0100)
The pointer buf is being set on each iteration of a for-loop and
so the initialization of buf at declaration time is redundant and
can be removed.  Cleans up clang warning:

drivers/staging/fbtft/fb_uc1701.c:130:6: warning: Value stored to 'buf' during its initialization is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fbtft/fb_uc1701.c

index b78045fe5393e4d3cdd38dd339cffb3ec5f4f7c4..78899a172c7e37d47eb05ad6da1569e06fcd581b 100644 (file)
@@ -127,7 +127,7 @@ static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
 static int write_vmem(struct fbtft_par *par, size_t offset, size_t len)
 {
        u16 *vmem16 = (u16 *)par->info->screen_buffer;
-       u8 *buf = par->txbuf.buf;
+       u8 *buf;
        int x, y, i;
        int ret = 0;