From: Lee Jones <lee.jones@linaro.org>
To: Christos Gkekas <chris.gekas@gmail.com>
Cc: Daniel Thompson <daniel.thompson@linaro.org>,
Jingoo Han <jingoohan1@gmail.com>,
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: Fri, 13 Oct 2017 08:50:20 +0000 [thread overview]
Message-ID: <20171013085020.rggykq7gyd5ttnlo@dell> (raw)
In-Reply-To: <1507499808-12896-1-git-send-email-chris.gekas@gmail.com>
On Sun, 08 Oct 2017, 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>
> ---
> drivers/video/backlight/tps65217_bl.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
Subject line fixed and patch applied, thanks.
> 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);
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
prev parent reply other threads:[~2017-10-13 8:50 UTC|newest]
Thread overview: 4+ 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-09 10:00 ` Daniel Thompson
2017-10-09 16:12 ` Jingoo Han
2017-10-13 8:50 ` Lee Jones [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=20171013085020.rggykq7gyd5ttnlo@dell \
--to=lee.jones@linaro.org \
--cc=b.zolnierkie@samsung.com \
--cc=chris.gekas@gmail.com \
--cc=daniel.thompson@linaro.org \
--cc=jingoohan1@gmail.com \
--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