linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: keguang.zhang@gmail.com
Cc: linux-clk@vger.kernel.org
Subject: [bug report] clk: ls1x: Update relationship among all clocks
Date: Wed, 13 Jul 2016 18:51:42 +0300	[thread overview]
Message-ID: <20160713155142.GB31747@mwanda> (raw)

Hello Kelvin Cheung,

The patch 3526f74fa925: "clk: ls1x: Update relationship among all
clocks" from Oct 10, 2014, leads to the following static checker
warning:

	drivers/clk/clk-ls1x.c:38 ls1x_pll_recalc_rate()
	warn: mask and shift to zero

drivers/clk/clk-ls1x.c
    32  static unsigned long ls1x_pll_recalc_rate(struct clk_hw *hw,
    33                                            unsigned long parent_rate)
    34  {
    35          u32 pll, rate;
    36  
    37          pll = __raw_readl(LS1X_CLK_PLL_FREQ);
    38          rate = 12 + (pll & 0x3f) + (((pll >> 8) & 0x3ff) >> 10);

0x3ff >> 10 is zero.  It's not clear to me what is intended.

    39          rate *= OSC;
    40          rate >>= 1;
    41  
    42          return rate;
    43  }

regards,
dan carpenter

                 reply	other threads:[~2016-07-13 15:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20160713155142.GB31747@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=keguang.zhang@gmail.com \
    --cc=linux-clk@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;
as well as URLs for NNTP newsgroup(s).