[U-Boot] [PATCH 07/20] adc: stm32: Fix warnings when compiling with W=1
Fabrice Gasnier
fabrice.gasnier at st.com
Fri Jun 21 13:41:28 UTC 2019
On 6/21/19 3:26 PM, Patrick Delaunay wrote:
> 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 at st.com>
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay at st.com>
Hi Patrick,
Acked-by: Fabrice Gasnier <fabrice.gasnier at st.com>
Thanks,
Fabrice
> ---
>
> drivers/adc/stm32-adc-core.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/adc/stm32-adc-core.c b/drivers/adc/stm32-adc-core.c
> index a9aa143..04b6a8a 100644
> --- a/drivers/adc/stm32-adc-core.c
> +++ b/drivers/adc/stm32-adc-core.c
> @@ -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)) {
>
More information about the U-Boot
mailing list