]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
adc: stm32: Fix warnings when compiling with W=1
authorPatrick Delaunay <patrick.delaunay@st.com>
Fri, 21 Jun 2019 13:26:45 +0000 (15:26 +0200)
committerPatrick Delaunay <patrick.delaunay@st.com>
Fri, 12 Jul 2019 09:50:55 +0000 (11:50 +0200)
This patch solves the following warnings:

drivers/adc/stm32-adc-core.c: In function 'stm32h7_adc_clk_sel':
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (i = 0; i < ARRAY_SIZE(stm32h7_adc_ckmodes_spec); i++) {
                 ^
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (i = 0; i < ARRAY_SIZE(stm32h7_adc_ckmodes_spec); i++) {
                ^
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Acked-by: Fabrice Gasnier <fabrice.gasnier@st.com>
drivers/adc/stm32-adc-core.c

index a9aa143bfe7bc0979355096a5ab55c0b41eaf808..04b6a8a2f5b5db216c0b4c8290b7dc03500c6001 100644 (file)
@@ -60,7 +60,8 @@ static int stm32h7_adc_clk_sel(struct udevice *dev,
 {
        u32 ckmode, presc;
        unsigned long rate;
-       int i, div;
+       unsigned int i;
+       int div;
 
        /* stm32h7 bus clock is common for all ADC instances (mandatory) */
        if (!clk_valid(&common->bclk)) {