From: Gregory CLEMENT <gregory.clement@bootlin.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: linux-clk@vger.kernel.org
Subject: Re: [bug report] clk: mvebu: armada-37xx-periph: prepare cpu clk to be used with DVFS
Date: Fri, 13 Jul 2018 12:04:15 +0200 [thread overview]
Message-ID: <87r2k7bgf4.fsf@bootlin.com> (raw)
In-Reply-To: <20180620201208.rzzc3lpu2lmyy4sz@kili.mountain> (Dan Carpenter's message of "Thu, 21 Jun 2018 11:06:28 +0300")
Hi Dan,
On jeu., juin 21 2018, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> Hello Gregory CLEMENT,
>
> The patch 9818a7a4fd10: "clk: mvebu: armada-37xx-periph: prepare cpu
> clk to be used with DVFS" from Nov 30, 2017, leads to the following
> static checker warning:
>
> drivers/clk/mvebu/armada-37xx-periph.c:432 clk_pm_cpu_get_parent()
> warn: signedness bug returning '(-22)'
Thanks, I finally took time to take care of it and I am going to post a
fix.
Gregory
>
> drivers/clk/mvebu/armada-37xx-periph.c
> 418 static u8 clk_pm_cpu_get_parent(struct clk_hw *hw)
> ^^
> 419 {
> 420 struct clk_pm_cpu *pm_cpu = to_clk_pm_cpu(hw);
> 421 int num_parents = clk_hw_get_num_parents(hw);
> 422 u32 val;
> 423
> 424 if (armada_3700_pm_dvfs_is_enabled(pm_cpu->nb_pm_base)) {
> 425 val = armada_3700_pm_dvfs_get_cpu_parent(pm_cpu->nb_pm_base);
> 426 } else {
> 427 val = readl(pm_cpu->reg_mux) >> pm_cpu->shift_mux;
> 428 val &= pm_cpu->mask_mux;
> 429 }
> 430
> 431 if (val >= num_parents)
> 432 return -EINVAL;
> ^^^^^^^
> 433
> 434 return val;
> 435 }
>
> regards,
> dan carpenter
--
Gregory Clement, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com
next prev parent reply other threads:[~2018-07-13 10:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-21 8:06 [bug report] clk: mvebu: armada-37xx-periph: prepare cpu clk to be used with DVFS Dan Carpenter
2018-07-13 10:04 ` Gregory CLEMENT [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-01-12 20:31 Dan Carpenter
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=87r2k7bgf4.fsf@bootlin.com \
--to=gregory.clement@bootlin.com \
--cc=dan.carpenter@oracle.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).