From: Dan Carpenter <dan.carpenter@oracle.com>
To: sean.wang@mediatek.com
Cc: linux-clk@vger.kernel.org
Subject: [bug report] clk: mediatek: add missing cpu mux causing Mediatek cpufreq can't work
Date: Fri, 7 Jul 2017 12:53:31 +0300 [thread overview]
Message-ID: <20170707095331.s7zlvk5hbqwgngld@mwanda> (raw)
Hello Sean Wang,
The patch 1e17de9049da: "clk: mediatek: add missing cpu mux causing
Mediatek cpufreq can't work" from May 5, 2017, leads to the following
static checker warning:
drivers/clk/mediatek/clk-cpumux.c:39 clk_cpumux_get_parent()
warn: signedness bug returning '(-22)'
drivers/clk/mediatek/clk-cpumux.c
27 static u8 clk_cpumux_get_parent(struct clk_hw *hw)
28 {
29 struct mtk_clk_cpumux *mux = to_mtk_clk_cpumux(hw);
30 int num_parents = clk_hw_get_num_parents(hw);
31 unsigned int val;
32
33 regmap_read(mux->regmap, mux->reg, &val);
34
35 val >>= mux->shift;
36 val &= mux->mask;
37
38 if (val >= num_parents)
39 return -EINVAL;
^^^^^^^^^^^^^^
Doesn't work for u8.
40
41 return val;
42 }
regards,
dan carpenter
next reply other threads:[~2017-07-07 9:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-07 9:53 Dan Carpenter [this message]
2017-07-08 6:39 ` [bug report] clk: mediatek: add missing cpu mux causing Mediatek cpufreq can't work Sean Wang
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=20170707095331.s7zlvk5hbqwgngld@mwanda \
--to=dan.carpenter@oracle.com \
--cc=linux-clk@vger.kernel.org \
--cc=sean.wang@mediatek.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox