From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Jonghwan Choi <jhbird.choi@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] CLKDEV: Reduce scaning time
Date: Mon, 19 Sep 2011 12:13:54 +0100 [thread overview]
Message-ID: <20110919111354.GM16381@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1316182452-14061-1-git-send-email-jhbird.choi@gmail.com>
On Fri, Sep 16, 2011 at 11:14:12PM +0900, Jonghwan Choi wrote:
> If ether dev_id or con_id is NULL. it is not necessary that match point
> should be 3. it just takes a long time.
clk_get() shouldn't be used in fast paths anyway - drivers should 'get'
the clock and hold a reference to the clock while they're using it and
all the time that they're needing it to be enabled.
I think I'd like to keep the code as-is to discourage its use in fast
paths. In any case:
> @@ -52,10 +58,10 @@ static struct clk_lookup *clk_find(const char *dev_id, const char *con_id)
>
> if (match > best) {
> cl = p;
> - if (match != 3)
> - best = match;
> - else
> + if (match == point)
> break;
> + else
> + best = match;
Why not just change the '3' to be 'point' here - why restructure the code?
prev parent reply other threads:[~2011-09-19 11:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-16 14:14 Jonghwan Choi
2011-09-19 11:13 ` Russell King - ARM Linux [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=20110919111354.GM16381@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=jhbird.choi@gmail.com \
--cc=linux-arm-kernel@lists.infradead.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
all inboxes | Powered by JetHome®