]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
backlight: ili922x: Remove redundant variable len
authorColin Ian King <colin.king@canonical.com>
Sun, 5 Nov 2017 11:53:26 +0000 (11:53 +0000)
committerLee Jones <lee.jones@linaro.org>
Wed, 8 Nov 2017 10:43:49 +0000 (10:43 +0000)
The variable len is assigned but never read, therefore it is redundant
and can be removed. Cleans up clang warning:

drivers/video/backlight/ili922x.c:276:2: warning: Value stored to 'len'
is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
Acked-by: Jingoo Han <jingoohan1@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/video/backlight/ili922x.c

index a9e9cef20ed65aed131e0ab412fb73574876a66e..2b6c6aaf4e148672b63ff0f9c554689a4f972a4e 100644 (file)
@@ -251,7 +251,7 @@ static int ili922x_write(struct spi_device *spi, u8 reg, u16 value)
        struct spi_transfer xfer_regindex, xfer_regvalue;
        unsigned char tbuf[CMD_BUFSIZE];
        unsigned char rbuf[CMD_BUFSIZE];
-       int ret, len = 0;
+       int ret;
 
        memset(&xfer_regindex, 0, sizeof(struct spi_transfer));
        memset(&xfer_regvalue, 0, sizeof(struct spi_transfer));
@@ -273,7 +273,6 @@ static int ili922x_write(struct spi_device *spi, u8 reg, u16 value)
        ret = spi_sync(spi, &msg);
 
        spi_message_init(&msg);
-       len = 0;
        tbuf[0] = set_tx_byte(START_BYTE(ili922x_id, START_RS_REG,
                                         START_RW_WRITE));
        tbuf[1] = set_tx_byte((value & 0xFF00) >> 8);