Files
u-boot/drivers/spi
Ilias Apalodimas 8485595927 spi: synquacer: Silence uninitialized variable warnings
When building with clang, the compiler compains with

drivers/spi/spi-synquacer.c:212:11: warning: variable 'bus_width' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
        else if (priv->mode & SPI_TX_OCTAL)
                 ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/spi/spi-synquacer.c:276:11: note: uninitialized use occurs here
        val |= ((bus_width >> 1) << BUS_WIDTH);
                 ^~~~~~~~~
drivers/spi/spi-synquacer.c:212:7: note: remove the 'if' if its condition is always true
        else if (priv->mode & SPI_TX_OCTAL)
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/spi/spi-synquacer.c:189:25: note: initialize the variable 'bus_width' to silence this warning

So initialize bus_width to 1 and add a warning if none of the configured
modes matches

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Acked-by: Jassi Brar <jaswinder.singh@linaro.org>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2023-04-25 23:06:10 +05:30
..
2020-06-11 15:14:04 +05:30
2023-01-26 20:53:20 +05:30
2023-02-10 07:41:41 -05:00
2022-03-30 13:02:55 -04:00
2023-01-26 20:53:20 +05:30
2022-01-19 18:11:34 +01:00
2023-01-26 20:53:20 +05:30
2023-01-26 20:53:20 +05:30
2022-06-15 11:34:38 +02:00
2023-01-26 20:53:20 +05:30
2023-01-26 20:53:20 +05:30
2023-01-26 20:53:20 +05:30
2021-06-25 20:59:45 +05:30
2023-01-26 20:53:20 +05:30
2023-01-26 20:53:20 +05:30
2022-10-16 12:23:22 +02:00
2023-03-09 13:15:00 +01:00