From 80cd39faed97e8f8b73d2d01d96a2ffef508c044 Mon Sep 17 00:00:00 2001 From: Daniel Leung Date: Fri, 4 Aug 2023 11:24:07 -0700 Subject: [PATCH] spi: pl022: remove shadow variables Removes the shadow variable found by -Wshadow. The value of this variable is the same throughout the for loop, so there is no need to assign it again for each iteration. Signed-off-by: Daniel Leung --- drivers/spi/spi_pl022.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi_pl022.c b/drivers/spi/spi_pl022.c index 2b3e28ec4dd..d71516f17df 100644 --- a/drivers/spi/spi_pl022.c +++ b/drivers/spi/spi_pl022.c @@ -786,13 +786,13 @@ static int spi_pl022_transceive_impl(const struct device *dev, if (cfg->dma_enabled) { #if defined(CONFIG_SPI_PL022_DMA) for (size_t i = 0; i < ARRAY_SIZE(data->dma); i++) { - const struct spi_pl022_cfg *cfg = dev->config; struct dma_status stat = {.busy = true}; dma_stop(cfg->dma[i].dev, cfg->dma[i].channel); while (stat.busy) { - dma_get_status(cfg->dma[i].dev, cfg->dma[i].channel, &stat); + dma_get_status(cfg->dma[i].dev, + cfg->dma[i].channel, &stat); } data->dma[i].count = 0;