From: "Jingoo Han" <jingoohan1@gmail.com>
To: 'Christos Gkekas' <chris.gekas@gmail.com>,
'Lee Jones' <lee.jones@linaro.org>,
'Daniel Thompson' <daniel.thompson@linaro.org>,
'Bartlomiej Zolnierkiewicz' <b.zolnierkie@samsung.com>,
linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cklight: tps65217_bl: Remove unnecessary default brightness check
Date: Mon, 09 Oct 2017 16:12:40 +0000 [thread overview]
Message-ID: <000001d34119$6edc8550$4c958ff0$@gmail.com> (raw)
In-Reply-To: <1507499808-12896-1-git-send-email-chris.gekas@gmail.com>
On Sunday, October 8, 2017 5:57 PM, Christos Gkekas wrote:
>
> Variable val holds the default brightness and is unsigned, therefore
> checking whether it is less than zero is redundant.
>
> Signed-off-by: Christos Gkekas <chris.gekas@gmail.com>
It looks good.
Acked-by: Jingoo Han <jingoohan1@gmail.com>
Best regards,
Jingoo Han
> ---
> drivers/video/backlight/tps65217_bl.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/video/backlight/tps65217_bl.c
> b/drivers/video/backlight/tps65217_bl.c
> index fd524ad..61ea82d 100644
> --- a/drivers/video/backlight/tps65217_bl.c
> +++ b/drivers/video/backlight/tps65217_bl.c
> @@ -239,8 +239,7 @@ tps65217_bl_parse_dt(struct platform_device *pdev)
> }
>
> if (!of_property_read_u32(node, "default-brightness", &val)) {
> - if (val < 0 ||
> - val > 100) {
> + if (val > 100) {
> dev_err(&pdev->dev,
> "invalid 'default-brightness' value in the
> device tree\n");
> err = ERR_PTR(-EINVAL);
> --
> 2.7.4
WARNING: multiple messages have this Message-ID (diff)
From: "Jingoo Han" <jingoohan1@gmail.com>
To: "'Christos Gkekas'" <chris.gekas@gmail.com>,
"'Lee Jones'" <lee.jones@linaro.org>,
"'Daniel Thompson'" <daniel.thompson@linaro.org>,
"'Bartlomiej Zolnierkiewicz'" <b.zolnierkie@samsung.com>,
<linux-fbdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cklight: tps65217_bl: Remove unnecessary default brightness check
Date: Mon, 9 Oct 2017 12:12:40 -0400 [thread overview]
Message-ID: <000001d34119$6edc8550$4c958ff0$@gmail.com> (raw)
In-Reply-To: <1507499808-12896-1-git-send-email-chris.gekas@gmail.com>
On Sunday, October 8, 2017 5:57 PM, Christos Gkekas wrote:
>
> Variable val holds the default brightness and is unsigned, therefore
> checking whether it is less than zero is redundant.
>
> Signed-off-by: Christos Gkekas <chris.gekas@gmail.com>
It looks good.
Acked-by: Jingoo Han <jingoohan1@gmail.com>
Best regards,
Jingoo Han
> ---
> drivers/video/backlight/tps65217_bl.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/video/backlight/tps65217_bl.c
> b/drivers/video/backlight/tps65217_bl.c
> index fd524ad..61ea82d 100644
> --- a/drivers/video/backlight/tps65217_bl.c
> +++ b/drivers/video/backlight/tps65217_bl.c
> @@ -239,8 +239,7 @@ tps65217_bl_parse_dt(struct platform_device *pdev)
> }
>
> if (!of_property_read_u32(node, "default-brightness", &val)) {
> - if (val < 0 ||
> - val > 100) {
> + if (val > 100) {
> dev_err(&pdev->dev,
> "invalid 'default-brightness' value in the
> device tree\n");
> err = ERR_PTR(-EINVAL);
> --
> 2.7.4
next prev parent reply other threads:[~2017-10-09 16:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-08 21:56 [PATCH] cklight: tps65217_bl: Remove unnecessary default brightness check Christos Gkekas
2017-10-08 21:56 ` Christos Gkekas
2017-10-09 10:00 ` Daniel Thompson
2017-10-09 10:00 ` Daniel Thompson
2017-10-09 16:12 ` Jingoo Han [this message]
2017-10-09 16:12 ` Jingoo Han
2017-10-13 8:50 ` Lee Jones
2017-10-13 8:50 ` 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='000001d34119$6edc8550$4c958ff0$@gmail.com' \
--to=jingoohan1@gmail.com \
--cc=b.zolnierkie@samsung.com \
--cc=chris.gekas@gmail.com \
--cc=daniel.thompson@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.