[PATCH] mtd: rawnand: omap_gpmc: remove unneeded variable
Heiko Schocher
hs at denx.de
Tue Nov 14 08:48:38 CET 2023
remove unneeded variable ecc_flag in omap_correct_data_bch
Signed-off-by: Heiko Schocher <hs at denx.de>
---
azure build is fine with this patch:
https://dev.azure.com/hs0298/hs/_build/results?buildId=110&view=results
drivers/mtd/nand/raw/omap_gpmc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/nand/raw/omap_gpmc.c b/drivers/mtd/nand/raw/omap_gpmc.c
index 1a5ed0de31..1fe8b1671e 100644
--- a/drivers/mtd/nand/raw/omap_gpmc.c
+++ b/drivers/mtd/nand/raw/omap_gpmc.c
@@ -637,13 +637,13 @@ static int omap_correct_data_bch(struct mtd_info *mtd, uint8_t *dat,
uint32_t error_count = 0, error_max;
uint32_t error_loc[ELM_MAX_ERROR_COUNT];
enum bch_level bch_type;
- uint32_t i, ecc_flag = 0;
+ uint32_t i;
uint8_t count;
uint32_t byte_pos, bit_pos;
int err = 0;
/* check calculated ecc */
- for (i = 0; i < ecc->bytes && !ecc_flag; i++) {
+ for (i = 0; i < ecc->bytes; i++) {
if (calc_ecc[i] != 0x00)
goto not_ecc_match;
}
--
2.37.3
More information about the U-Boot
mailing list