From: Dan Carpenter <dan.carpenter@oracle.com>
To: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>,
thomas.ab@samsung.com, linux-samsung-soc@vger.kernel.org,
linux-clk@vger.kernel.org
Subject: Re: clk: samsung: add infrastructure to register cpu clocks
Date: Fri, 26 Jun 2015 13:47:32 +0300 [thread overview]
Message-ID: <20150626104732.GO30834@mwanda> (raw)
In-Reply-To: <2521313.Iak1gZLfIu@amdc1976>
On Fri, Jun 26, 2015 at 12:20:35PM +0200, Bartlomiej Zolnierkiewicz wrote:
>
> Hi,
>
> On Friday, June 26, 2015 07:03:25 PM Krzysztof Kozlowski wrote:
> > 2015-06-26 18:54 GMT+09:00 Dan Carpenter <dan.carpenter@oracle.com>:
> > > Hello Thomas Abraham,
> > >
> > > The patch ddeac8d968d4: "clk: samsung: add infrastructure to register
> > > cpu clocks" from Apr 3, 2015, leads to the following static checker
> > > warning:
> > >
> > > drivers/clk/samsung/clk-cpu.c:164 exynos_cpuclk_pre_rate_change()
> > > warn: test_bit() takes a bit number
> > >
> > > drivers/clk/samsung/clk-cpu.c
> > > 158 /*
> > > 159 * For the selected PLL clock frequency, get the pre-defined divider
> > > 160 * values. If the clock for sclk_hpm is not sourced from apll, then
> > > 161 * the values for DIV_COPY and DIV_HPM dividers need not be set.
> > > 162 */
> > > 163 div0 = cfg_data->div0;
> > > 164 if (test_bit(CLK_CPU_HAS_DIV1, &cpuclk->flags)) {
> > > ^^^^^^^^^^^^^^^^
> > > CLK_CPU_HAS_DIV1 is (1 << 0). We sometimes used it correctly as a mask
> > > and sometimes incorrectly (like here) as a bit number.
>
> Fortunately the current value of this flag is "1" so test_bit() still
> works correctly. I'll fix it up later anyway. Thanks for catching it.
I don't think it works, although I may have misread. We set BIT(0) in
exynos4_clk_init() but we test BIT(1) here.
regards,
dan carpenter
next prev parent reply other threads:[~2015-06-26 10:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-26 9:54 clk: samsung: add infrastructure to register cpu clocks Dan Carpenter
2015-06-26 10:03 ` Krzysztof Kozlowski
2015-06-26 10:20 ` Bartlomiej Zolnierkiewicz
2015-06-26 10:47 ` Dan Carpenter [this message]
2015-06-26 11:06 ` Bartlomiej Zolnierkiewicz
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=20150626104732.GO30834@mwanda \
--to=dan.carpenter@oracle.com \
--cc=b.zolnierkie@samsung.com \
--cc=k.kozlowski@samsung.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=thomas.ab@samsung.com \
/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.