From: Sebastian Reichel <sre@kernel.org>
To: Daniel Perez <danielperezdeandres@gmail.com>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
nicolassaenzj@gmail.com
Subject: Re: [PATCH v2] Power: supply: sbs-charger: simplified bool function
Date: Wed, 15 Mar 2017 22:23:41 +0100 [thread overview]
Message-ID: <20170315212341.r5w4wzyjriuo55qh@earth> (raw)
In-Reply-To: <1487173581-19388-1-git-send-email-danielperezdeandres@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1159 bytes --]
Hi Daniel,
On Wed, Feb 15, 2017 at 04:46:21PM +0100, Daniel Perez wrote:
> v1 -> v2:
> - given Joe Perches' comment, I've further simplified the syntax
> of the bool function, removing the ternary conditional
>
> Signed-off-by: Daniel Perez <danielperezdeandres@gmail.com>
Thanks, queued. Please move the Version history below ---, so that
it does not end up in the commit. I fixed that while applying.
-- Sebastian
> ---
> drivers/power/supply/sbs-charger.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/power/supply/sbs-charger.c b/drivers/power/supply/sbs-charger.c
> index 353765a..15947db 100644
> --- a/drivers/power/supply/sbs-charger.c
> +++ b/drivers/power/supply/sbs-charger.c
> @@ -137,10 +137,7 @@ static enum power_supply_property sbs_properties[] = {
>
> static bool sbs_readable_reg(struct device *dev, unsigned int reg)
> {
> - if (reg < SBS_CHARGER_REG_SPEC_INFO)
> - return false;
> - else
> - return true;
> + return reg >= SBS_CHARGER_REG_SPEC_INFO;
> }
>
> static bool sbs_volatile_reg(struct device *dev, unsigned int reg)
> --
> 2.7.4
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2017-03-15 21:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-15 15:46 [PATCH v2] Power: supply: sbs-charger: simplified bool function Daniel Perez
2017-03-15 21:23 ` Sebastian Reichel [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=20170315212341.r5w4wzyjriuo55qh@earth \
--to=sre@kernel.org \
--cc=danielperezdeandres@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=nicolassaenzj@gmail.com \
/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