Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1688681 > unrolled thread
| Started by | <sean.wang@mediatek.com> |
|---|---|
| First post | 2017-07-17 08:10 +0200 |
| Last post | 2017-07-18 03:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH v2] clk: mediatek: fixed static checker warning in clk_cpumux_get_parent call <sean.wang@mediatek.com> - 2017-07-17 08:10 +0200
Re: [PATCH v2] clk: mediatek: fixed static checker warning in clk_cpumux_get_parent call Stephen Boyd <sboyd@codeaurora.org> - 2017-07-18 03:20 +0200
| From | <sean.wang@mediatek.com> |
|---|---|
| Date | 2017-07-17 08:10 +0200 |
| Subject | [PATCH v2] clk: mediatek: fixed static checker warning in clk_cpumux_get_parent call |
| Message-ID | <u47oe-1fK-17@gated-at.bofh.it> |
From: Sean Wang <sean.wang@mediatek.com>
Fixed the signedness bug returning '(-22)' on the return type as u8 with
removing the sanity checker in clk_cpumux_get_parent() since
clk_cpumux_set_parent() always ensures validity in clk_cpumux_get_parent()
got called.
Fixes: commit 1e17de9049da ("clk: mediatek: add missing cpu mux causing Mediatek cpufreq can't work")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
drivers/clk/mediatek/clk-cpumux.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/clk/mediatek/clk-cpumux.c b/drivers/clk/mediatek/clk-cpumux.c
index edd8e69..347d799 100644
--- a/drivers/clk/mediatek/clk-cpumux.c
+++ b/drivers/clk/mediatek/clk-cpumux.c
@@ -27,7 +27,6 @@ static inline struct mtk_clk_cpumux *to_mtk_clk_cpumux(struct clk_hw *_hw)
static u8 clk_cpumux_get_parent(struct clk_hw *hw)
{
struct mtk_clk_cpumux *mux = to_mtk_clk_cpumux(hw);
- int num_parents = clk_hw_get_num_parents(hw);
unsigned int val;
regmap_read(mux->regmap, mux->reg, &val);
@@ -35,9 +34,6 @@ static u8 clk_cpumux_get_parent(struct clk_hw *hw)
val >>= mux->shift;
val &= mux->mask;
- if (val >= num_parents)
- return -EINVAL;
-
return val;
}
--
2.7.4
[toc] | [next] | [standalone]
| From | Stephen Boyd <sboyd@codeaurora.org> |
|---|---|
| Date | 2017-07-18 03:20 +0200 |
| Subject | Re: [PATCH v2] clk: mediatek: fixed static checker warning in clk_cpumux_get_parent call |
| Message-ID | <u4pl7-4e6-1@gated-at.bofh.it> |
| In reply to | #1688681 |
On 07/17, sean.wang@mediatek.com wrote:
> From: Sean Wang <sean.wang@mediatek.com>
>
> Fixed the signedness bug returning '(-22)' on the return type as u8 with
> removing the sanity checker in clk_cpumux_get_parent() since
> clk_cpumux_set_parent() always ensures validity in clk_cpumux_get_parent()
> got called.
>
> Fixes: commit 1e17de9049da ("clk: mediatek: add missing cpu mux causing Mediatek cpufreq can't work")
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> ---
Applied to clk-next
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web