From: Jacek Anaszewski <jacek.anaszewski@gmail.com>
To: Christos Gkekas <chris.gekas@gmail.com>,
Richard Purdie <rpurdie@rpsys.net>, Pavel Machek <pavel@ucw.cz>,
linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] leds: tca6507: Remove unnecessary reg check
Date: Mon, 9 Oct 2017 20:43:04 +0200 [thread overview]
Message-ID: <73348511-cf3f-466c-6257-dff8747820fc@gmail.com> (raw)
In-Reply-To: <1507488905-23169-1-git-send-email-chris.gekas@gmail.com>
Hi Christos,
Thanks for the patch.
On 10/08/2017 08:55 PM, Christos Gkekas wrote:
> Variable reg is unsigned so checking whether it is less than zero is not
> necessary.
>
> Signed-off-by: Christos Gkekas <chris.gekas@gmail.com>
> ---
> drivers/leds/leds-tca6507.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/leds/leds-tca6507.c b/drivers/leds/leds-tca6507.c
> index 45222a7..c12c16f 100644
> --- a/drivers/leds/leds-tca6507.c
> +++ b/drivers/leds/leds-tca6507.c
> @@ -715,7 +715,7 @@ tca6507_led_dt_init(struct i2c_client *client)
> if (of_property_match_string(child, "compatible", "gpio") >= 0)
> led.flags |= TCA6507_MAKE_GPIO;
> ret = of_property_read_u32(child, "reg", ®);
> - if (ret != 0 || reg < 0 || reg >= NUM_LEDS)
> + if (ret != 0 || reg >= NUM_LEDS)
> continue;
>
> tca_leds[reg] = led;
>
Applied.
--
Best regards,
Jacek Anaszewski
prev parent reply other threads:[~2017-10-09 18:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-08 18:55 [PATCH] leds: tca6507: Remove unnecessary reg check Christos Gkekas
2017-10-09 6:59 ` Pavel Machek
2017-10-09 18:43 ` Jacek Anaszewski [this message]
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=73348511-cf3f-466c-6257-dff8747820fc@gmail.com \
--to=jacek.anaszewski@gmail.com \
--cc=chris.gekas@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=rpurdie@rpsys.net \
/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).