linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] clk: cache parent clocks only for muxes
Date: Wed, 6 Jun 2012 11:47:59 +0100	[thread overview]
Message-ID: <20120606104759.GN8262@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1338973891-28719-2-git-send-email-rnayak@ti.com>

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.

  reply	other threads:[~2012-06-06 10:47 UTC|newest]

Thread overview: 7+ 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 ` [PATCH 1/2] clk: cache parent clocks only for muxes Rajendra Nayak
2012-06-06 10:47   ` Russell King - ARM Linux [this message]
2012-06-12 19:04     ` Mike Turquette
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-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=20120606104759.GN8262@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).