summaryrefslogtreecommitdiff
path: root/drivers/ram
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@st.com>2019-06-21 15:26:51 +0200
committerPatrick Delaunay <patrick.delaunay@st.com>2019-07-12 11:50:56 +0200
commit588448517f6531f00ce729a6e8cf5ef8c08261bf (patch)
tree2f2460ad3a646707bb1b243bbe4468d1b28a4dbe /drivers/ram
parentbe56ab1b8f73a3f7f3c0315aaaa3126967e7c0e5 (diff)
downloadu-boot-588448517f6531f00ce729a6e8cf5ef8c08261bf.tar.gz
ram: stm32mp1_ram: Fix warnings when compiling with W=1
This patch solves the following warnings: drivers/ram/stm32mp1/stm32mp1_ram.c: In function 'stm32mp1_ddr_clk_enable': warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (idx = 0; idx < ARRAY_SIZE(clkname); idx++) { ^ drivers/ram/stm32mp1/stm32mp1_ram.c: In function 'stm32mp1_ddr_setup': warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (idx = 0; idx < ARRAY_SIZE(param); idx++) { ^ Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Diffstat (limited to 'drivers/ram')
-rw-r--r--drivers/ram/stm32mp1/stm32mp1_ram.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/ram/stm32mp1/stm32mp1_ram.c b/drivers/ram/stm32mp1/stm32mp1_ram.c
index 84e39d093b..a362cf98bf 100644
--- a/drivers/ram/stm32mp1/stm32mp1_ram.c
+++ b/drivers/ram/stm32mp1/stm32mp1_ram.c
@@ -26,7 +26,7 @@ int stm32mp1_ddr_clk_enable(struct ddr_info *priv, uint32_t mem_speed)
unsigned long ddr_clk;
struct clk clk;
int ret;
- int idx;
+ unsigned int idx;
for (idx = 0; idx < ARRAY_SIZE(clkname); idx++) {
ret = clk_get_by_name(priv->dev, clkname[idx], &clk);
@@ -59,7 +59,8 @@ int stm32mp1_ddr_clk_enable(struct ddr_info *priv, uint32_t mem_speed)
static __maybe_unused int stm32mp1_ddr_setup(struct udevice *dev)
{
struct ddr_info *priv = dev_get_priv(dev);
- int ret, idx;
+ int ret;
+ unsigned int idx;
struct clk axidcg;
struct stm32mp1_ddr_config config;