From: mturquette@ti.com (Mike Turquette)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] clk: cache parent clocks only for muxes
Date: Tue, 12 Jun 2012 12:04:49 -0700 [thread overview]
Message-ID: <20120612190449.GH19410@gmail.com> (raw)
In-Reply-To: <20120606104759.GN8262@n2100.arm.linux.org.uk>
On 20120606-11:47, Russell King - ARM Linux wrote:
> On Wed, Jun 06, 2012 at 02:41:30PM +0530, Rajendra Nayak wrote:
> > caching parent clocks makes sense only when a clock has more
> > than one parent (mux clocks).
> > Avoid doing this for every other clock.
> >
> > Signed-off-by: Rajendra Nayak <rnayak@ti.com>
> > ---
> > drivers/clk/clk.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> > index 687b00d..40568e9 100644
> > --- a/drivers/clk/clk.c
> > +++ b/drivers/clk/clk.c
> > @@ -1229,7 +1229,7 @@ int __clk_init(struct device *dev, struct clk *clk)
> > * If clk->parents is not NULL we skip this entire block. This allows
> > * for clock drivers to statically initialize clk->parents.
> > */
> > - if (clk->num_parents && !clk->parents) {
> > + if ((clk->num_parents > 1) && !clk->parents) {
>
> You don't need the additional parens here. Please learn the C precedence
> rules. Additional unnecessary parens can make expressions much harder
> to read.
Rajendra,
I've taken this patch into clk-next for testing. I've fixed up the
extra parens locally, so no need for a resend.
Regards,
Mike
WARNING: multiple messages have this Message-ID (diff)
From: Mike Turquette <mturquette@ti.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Rajendra Nayak <rnayak@ti.com>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/2] clk: cache parent clocks only for muxes
Date: Tue, 12 Jun 2012 12:04:49 -0700 [thread overview]
Message-ID: <20120612190449.GH19410@gmail.com> (raw)
In-Reply-To: <20120606104759.GN8262@n2100.arm.linux.org.uk>
On 20120606-11:47, Russell King - ARM Linux wrote:
> On Wed, Jun 06, 2012 at 02:41:30PM +0530, Rajendra Nayak wrote:
> > caching parent clocks makes sense only when a clock has more
> > than one parent (mux clocks).
> > Avoid doing this for every other clock.
> >
> > Signed-off-by: Rajendra Nayak <rnayak@ti.com>
> > ---
> > drivers/clk/clk.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> > index 687b00d..40568e9 100644
> > --- a/drivers/clk/clk.c
> > +++ b/drivers/clk/clk.c
> > @@ -1229,7 +1229,7 @@ int __clk_init(struct device *dev, struct clk *clk)
> > * If clk->parents is not NULL we skip this entire block. This allows
> > * for clock drivers to statically initialize clk->parents.
> > */
> > - if (clk->num_parents && !clk->parents) {
> > + if ((clk->num_parents > 1) && !clk->parents) {
>
> You don't need the additional parens here. Please learn the C precedence
> rules. Additional unnecessary parens can make expressions much harder
> to read.
Rajendra,
I've taken this patch into clk-next for testing. I've fixed up the
extra parens locally, so no need for a resend.
Regards,
Mike
next prev parent reply other threads:[~2012-06-12 19:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-06 9:11 [PATCH 0/2] some minor clk fixes Rajendra Nayak
2012-06-06 9:11 ` Rajendra Nayak
2012-06-06 9:11 ` [PATCH 1/2] clk: cache parent clocks only for muxes Rajendra Nayak
2012-06-06 9:11 ` Rajendra Nayak
2012-06-06 10:47 ` Russell King - ARM Linux
2012-06-06 10:47 ` Russell King - ARM Linux
2012-06-12 19:04 ` Mike Turquette [this message]
2012-06-12 19:04 ` Mike Turquette
2012-06-13 4:39 ` Rajendra Nayak
2012-06-13 4:39 ` Rajendra Nayak
2012-06-06 9:11 ` [PATCH 2/2] clk: Allow late cache allocation for clk->parents Rajendra Nayak
2012-06-06 9:11 ` Rajendra Nayak
2012-06-12 19:07 ` Mike Turquette
2012-06-12 19:07 ` Mike Turquette
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=20120612190449.GH19410@gmail.com \
--to=mturquette@ti.com \
--cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.