From: "Jingoo Han" <jingoohan1@gmail.com>
To: 'Colin King' <colin.king@canonical.com>,
'Lee Jones' <lee.jones@linaro.org>,
'Daniel Thompson' <daniel.thompson@linaro.org>,
'Bartlomiej Zolnierkiewicz' <b.zolnierkie@samsung.com>,
dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] backlight: ili922x: remove redundant variable len
Date: Sun, 05 Nov 2017 17:23:39 +0000 [thread overview]
Message-ID: <000001d3565a$d2ee6300$78cb2900$@gmail.com> (raw)
In-Reply-To: <20171105115326.5276-1-colin.king@canonical.com>
On Sunday, November 5, 2017 6:53 AM, Colin King wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> 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: Jingoo Han <jingoohan1@gmail.com>
Thank you for sending the patch.
It looks good.
Best regards,
Jingoo Han
> ---
> drivers/video/backlight/ili922x.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/video/backlight/ili922x.c
> b/drivers/video/backlight/ili922x.c
> index a9e9cef..2b6c6aa 100644
> --- a/drivers/video/backlight/ili922x.c
> +++ b/drivers/video/backlight/ili922x.c
> @@ -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);
> --
> 2.7.4
next prev parent reply other threads:[~2017-11-05 17:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-05 11:53 [PATCH] backlight: ili922x: remove redundant variable len Colin King
2017-11-05 17:23 ` Jingoo Han [this message]
2017-11-06 11:36 ` Daniel Thompson
2017-11-08 10:43 ` Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000001d3565a$d2ee6300$78cb2900$@gmail.com' \
--to=jingoohan1@gmail.com \
--cc=b.zolnierkie@samsung.com \
--cc=colin.king@canonical.com \
--cc=daniel.thompson@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=lee.jones@linaro.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).