From: Stephen Warren <swarren@wwwdotorg.org>
To: Rhyland Klein <rklein@nvidia.com>
Cc: Anton Vorontsov <cbou@mail.ru>,
Grant Likely <grant.likely@secretlab.ca>,
David Woodhouse <dwmw2@infradead.org>,
linux-kernel@vger.kernel.org,
devicetree-discuss@lists.ozlabs.org, linux-tegra@vger.kernel.org
Subject: Re: [PATCH V2 2/3] power: power_supply: Add core support for supplied_from
Date: Tue, 02 Apr 2013 15:31:30 -0600 [thread overview]
Message-ID: <515B4E32.8080006@wwwdotorg.org> (raw)
In-Reply-To: <1364852755-17425-3-git-send-email-rklein@nvidia.com>
On 04/01/2013 03:45 PM, Rhyland Klein wrote:
> This patch adds support for supplies to register a list of char *'s
> which represent the list of supplies which supply them. This is the
> opposite as the supplied_to list.
This patch resolves the concerns I had before, so,
Reviewed-by: Stephen Warren <swarren@nvidia.com>
> diff --git a/drivers/power/power_supply_core.c b/drivers/power/power_supply_core.c
> +static bool __power_supply_is_supplied_by(struct power_supply *supplier,
> + struct power_supply *supply)
> +{
> + int i;
> +
> + if (!supply->supplied_from && !supplier->supplied_to)
> + return false;
Nit: that somewhat duplicates the if below, so perhaps could just be
removed?
> + /* Support both supplied_to and supplied_from modes */
> + if (supply->supplied_from) {
> + if (!supplier->name)
> + return false;
Likewise, I'm still not convinced these !name tests should be required.
However, there's no harm here I think, so it's fine.
next prev parent reply other threads:[~2013-04-02 21:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-01 21:45 [PATCH V2 0/3] Add DT Binding for Power-Supply power-supplies property Rhyland Klein
2013-04-01 21:45 ` [PATCH V2 1/3] power_supply: Define Binding for power-supplies Rhyland Klein
2013-04-01 21:45 ` [PATCH V2 2/3] power: power_supply: Add core support for supplied_from Rhyland Klein
2013-04-02 21:31 ` Stephen Warren [this message]
2013-04-17 1:55 ` Anton Vorontsov
2013-04-01 21:45 ` [PATCH V2 3/3] power: power_supply_core: Add " Rhyland Klein
2013-04-17 1:55 ` Anton Vorontsov
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=515B4E32.8080006@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=cbou@mail.ru \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=dwmw2@infradead.org \
--cc=grant.likely@secretlab.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=rklein@nvidia.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