[U-Boot] [PATCH 20/20] spi: stm32: Fix warnings when compiling with W=1
Patrick DELAUNAY
patrick.delaunay at st.com
Fri Jul 12 14:03:39 UTC 2019
Hi,
> From: Patrick DELAUNAY <patrick.delaunay at st.com>
> Sent: vendredi 21 juin 2019 15:27
>
> This patch solves the following warnings:
>
> drivers/spi/stm32_spi.c: In function 'stm32_spi_write_txfifo':
> drivers/spi/stm32_spi.c:116:20: warning: comparison between signed and
> unsigned integer expressions [-Wsign-compare]
> if (priv->tx_len >= sizeof(u32) &&
> ^~
> drivers/spi/stm32_spi.c:122:27: warning: comparison between signed and
> unsigned integer expressions [-Wsign-compare]
> } else if (priv->tx_len >= sizeof(u16) &&
> ^~
> drivers/spi/stm32_spi.c: In function 'stm32_spi_read_rxfifo':
> drivers/spi/stm32_spi.c:150:21: warning: comparison between signed and
> unsigned integer expressions [-Wsign-compare]
> (priv->rx_len >= sizeof(u32) || (sr & SPI_SR_RXWNE))) {
> ^~
> drivers/spi/stm32_spi.c:156:21: warning: comparison between signed and
> unsigned integer expressions [-Wsign-compare]
> (priv->rx_len >= sizeof(u16) ||
> ^~
> drivers/core/simple-bus.c:15:12: warning: no previous prototype for
> 'simple_bus_translate' [-Wmissing-prototypes] fdt_addr_t
> simple_bus_translate(struct udevice *dev, fdt_addr_t addr)
> ^~~~~~~~~~~~~~~~~~~~
> drivers/spi/stm32_spi.c: In function 'stm32_spi_set_speed':
> drivers/spi/stm32_spi.c:335:10: warning: comparison between signed and
> unsigned integer expressions [-Wsign-compare]
> div > STM32_MBR_DIV_MAX)
> ^
> drivers/spi/stm32_spi.c:344:19: warning: comparison of unsigned expression < 0
> is always false [-Wtype-limits]
> if ((mbrdiv - 1) < 0)
> ^
> drivers/spi/stm32_spi.c: In function 'stm32_spi_probe':
> drivers/spi/stm32_spi.c:531:16: warning: comparison between signed and
> unsigned integer expressions [-Wsign-compare]
> for (i = 0; i < ARRAY_SIZE(priv->cs_gpios); i++) {
> ^
> Signed-off-by: Patrice Chotard <patrice.chotard at st.com>
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay at st.com>
> ---
>
> drivers/spi/stm32_spi.c | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
Applied to u-boot-stm32/master, thanks!
Patrick
More information about the U-Boot
mailing list