drivers: flash: andes_qspi: fix shadow variable error
Make the variables naming more specific. Signed-off-by: Wei-Tai Lee <wtlee@andestech.com>
This commit is contained in:
parent
3574050ed2
commit
71f4d1b98e
|
@ -548,10 +548,10 @@ static int spi_nor_process_sfdp(const struct device *dev)
|
||||||
/* We only process BFP so use one parameter block */
|
/* We only process BFP so use one parameter block */
|
||||||
uint8_t raw[JESD216_SFDP_SIZE(decl_nph)];
|
uint8_t raw[JESD216_SFDP_SIZE(decl_nph)];
|
||||||
struct jesd216_sfdp_header sfdp;
|
struct jesd216_sfdp_header sfdp;
|
||||||
} u;
|
} u_header;
|
||||||
const struct jesd216_sfdp_header *hp = &u.sfdp;
|
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) {
|
if (ret != 0) {
|
||||||
LOG_ERR("SFDP read failed: %d", ret);
|
LOG_ERR("SFDP read failed: %d", ret);
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -582,11 +582,11 @@ static int spi_nor_process_sfdp(const struct device *dev)
|
||||||
union {
|
union {
|
||||||
uint32_t dw[MIN(php->len_dw, 20)];
|
uint32_t dw[MIN(php->len_dw, 20)];
|
||||||
struct jesd216_bfp bfp;
|
struct jesd216_bfp bfp;
|
||||||
} u;
|
} u_param;
|
||||||
const struct jesd216_bfp *bfp = &u.bfp;
|
const struct jesd216_bfp *bfp = &u_param.bfp;
|
||||||
|
|
||||||
ret = read_sfdp(dev,
|
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) {
|
if (ret != 0) {
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue