diff options
| author | Ilias Apalodimas <[email protected]> | 2023-04-07 12:13:00 +0300 |
|---|---|---|
| committer | Jagan Teki <[email protected]> | 2023-04-25 23:06:10 +0530 |
| commit | 8485595927e1685a8369426bda91b6a89dc2754c (patch) | |
| tree | a4ddd4c20bb8e3f08bf08edd2a3f45874f523b2e /include/linux/zstd_errors.h | |
| parent | 24c27b3c6ceab7295d12cd2ae0a47cfe9c136ecc (diff) | |
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 <[email protected]>
Acked-by: Jassi Brar <[email protected]>
Reviewed-by: Jagan Teki <[email protected]>
Diffstat (limited to 'include/linux/zstd_errors.h')
0 files changed, 0 insertions, 0 deletions
