From 71f4d1b98e9167576e6910774b18f65faf35d2c0 Mon Sep 17 00:00:00 2001 From: Wei-Tai Lee Date: Mon, 29 Apr 2024 15:20:17 +0800 Subject: [PATCH] drivers: flash: andes_qspi: fix shadow variable error Make the variables naming more specific. Signed-off-by: Wei-Tai Lee --- drivers/flash/flash_andes_qspi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/flash/flash_andes_qspi.c b/drivers/flash/flash_andes_qspi.c index 6a3c0b72ca..1bb77a8602 100644 --- a/drivers/flash/flash_andes_qspi.c +++ b/drivers/flash/flash_andes_qspi.c @@ -548,10 +548,10 @@ static int spi_nor_process_sfdp(const struct device *dev) /* We only process BFP so use one parameter block */ uint8_t raw[JESD216_SFDP_SIZE(decl_nph)]; struct jesd216_sfdp_header sfdp; - } u; - const struct jesd216_sfdp_header *hp = &u.sfdp; + } u_header; + const struct jesd216_sfdp_header *hp = &u_header.sfdp; - ret = read_sfdp(dev, 0, u.raw, sizeof(u.raw)); + ret = read_sfdp(dev, 0, u_header.raw, sizeof(u_header.raw)); if (ret != 0) { LOG_ERR("SFDP read failed: %d", ret); return ret; @@ -582,11 +582,11 @@ static int spi_nor_process_sfdp(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; + } u_param; + const struct jesd216_bfp *bfp = &u_param.bfp; ret = read_sfdp(dev, - jesd216_param_addr(php), u.dw, sizeof(u.dw)); + jesd216_param_addr(php), u_param.dw, sizeof(u_param.dw)); if (ret != 0) { break;