From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Phil Edworthy <phil.edworthy@renesas.com>
Cc: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Russell King <linux@armlinux.org.uk>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Simon Horman <horms@verge.net.au>,
linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v4 1/2] clk: Add of_clk_get_by_name_optional() function
Date: Wed, 29 Aug 2018 20:10:39 +0300 [thread overview]
Message-ID: <20180829171039.GD11447@smile.fi.intel.com> (raw)
In-Reply-To: <1533039060-18779-2-git-send-email-phil.edworthy@renesas.com>
On Tue, Jul 31, 2018 at 01:10:59PM +0100, Phil Edworthy wrote:
> Quite a few drivers get an optional clock, e.g. a clock required
> to access peripheral's registers that is always enabled on some
> devices.
>
> This function behaves the same as of_clk_get_by_name() except that
> it will return NULL instead of -ENOENT.
> + if (optional && (index == -EINVAL || index == -ENODATA ||
> + PTR_ERR(clk) == -ENOENT)) {
A nit: I would rather rearrange this to be
if (optional &&
(... || ... || ...)) {
(disregard 80 characters limit for second line)
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2018-08-29 17:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-31 12:10 [PATCH v4 0/2] clk: Add functions to get optional clocks Phil Edworthy
2018-07-31 12:10 ` [PATCH v4 1/2] clk: Add of_clk_get_by_name_optional() function Phil Edworthy
2018-08-29 17:10 ` Andy Shevchenko [this message]
2018-08-30 8:30 ` Phil Edworthy
2018-08-30 10:39 ` Andy Shevchenko
2018-07-31 12:11 ` [PATCH v4 2/2] clk: Add functions to get optional clocks Phil Edworthy
2018-08-29 17:11 ` [PATCH v4 0/2] " Andy Shevchenko
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=20180829171039.GD11447@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=geert@linux-m68k.org \
--cc=horms@verge.net.au \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mturquette@baylibre.com \
--cc=phil.edworthy@renesas.com \
--cc=sboyd@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
all inboxes | Powered by JetHome®