summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@st.com>2019-06-21 15:26:48 +0200
committerPatrick Delaunay <patrick.delaunay@st.com>2019-07-12 11:50:55 +0200
commit67d74ce2fa7e0cdcf102504c6546ce5c23462158 (patch)
tree6c20dfd06e05918996464561be134b09f1611095 /drivers
parent499504ba0656d822c2c3e6e8aa5cde8404963217 (diff)
clk: clk_stm32mp1: Fix warnings when compiling with W=1
This patch solves the following warnings: drivers/clk/clk_stm32mp1.c: In function 'stm32mp1_clk_get_parent': warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < ARRAY_SIZE(stm32mp1_clks); i++) ^ Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/clk/clk_stm32mp1.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/clk/clk_stm32mp1.c b/drivers/clk/clk_stm32mp1.c
index 5f15853114..6ffa05b8fd 100644
--- a/drivers/clk/clk_stm32mp1.c
+++ b/drivers/clk/clk_stm32mp1.c
@@ -805,10 +805,11 @@ static int stm32mp1_clk_get_parent(struct stm32mp1_clk_priv *priv,
const struct stm32mp1_clk_sel *sel = priv->data->sel;
int i;
int s, p;
+ unsigned int idx;
- for (i = 0; i < ARRAY_SIZE(stm32mp1_clks); i++)
- if (stm32mp1_clks[i][0] == id)
- return stm32mp1_clks[i][1];
+ for (idx = 0; idx < ARRAY_SIZE(stm32mp1_clks); idx++)
+ if (stm32mp1_clks[idx][0] == id)
+ return stm32mp1_clks[idx][1];
i = stm32mp1_clk_get_id(priv, id);
if (i < 0)