From efe27f577a73c131546f4c2429f746c9e6d40743 Mon Sep 17 00:00:00 2001 From: Daniel Leung Date: Fri, 4 Aug 2023 10:58:25 -0700 Subject: [PATCH] flash: rename shadow variables Renames shadow variables found by -Wshadow. Signed-off-by: Daniel Leung --- drivers/flash/flash_stm32_ospi.c | 6 +++--- drivers/flash/flash_stm32_qspi.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/flash/flash_stm32_ospi.c b/drivers/flash/flash_stm32_ospi.c index 8e6d671c759..26f82411789 100644 --- a/drivers/flash/flash_stm32_ospi.c +++ b/drivers/flash/flash_stm32_ospi.c @@ -2205,11 +2205,11 @@ static int flash_stm32_ospi_init(const struct device *dev) union { uint32_t dw[MIN(php->len_dw, 20)]; struct jesd216_bfp bfp; - } u; - const struct jesd216_bfp *bfp = &u.bfp; + } u2; + const struct jesd216_bfp *bfp = &u2.bfp; ret = ospi_read_sfdp(dev, jesd216_param_addr(php), - (uint8_t *)u.dw, sizeof(u.dw)); + (uint8_t *)u2.dw, sizeof(u2.dw)); if (ret == 0) { ret = spi_nor_process_bfp(dev, php, bfp); } diff --git a/drivers/flash/flash_stm32_qspi.c b/drivers/flash/flash_stm32_qspi.c index 74ea8bab7c7..5f8c8a0b218 100644 --- a/drivers/flash/flash_stm32_qspi.c +++ b/drivers/flash/flash_stm32_qspi.c @@ -1311,11 +1311,11 @@ static int flash_stm32_qspi_init(const struct device *dev) union { uint32_t dw[MIN(php->len_dw, 20)]; struct jesd216_bfp bfp; - } u; - const struct jesd216_bfp *bfp = &u.bfp; + } u2; + const struct jesd216_bfp *bfp = &u2.bfp; ret = qspi_read_sfdp(dev, jesd216_param_addr(php), - (uint8_t *)u.dw, sizeof(u.dw)); + (uint8_t *)u2.dw, sizeof(u2.dw)); if (ret == 0) { ret = spi_nor_process_bfp(dev, php, bfp); }