mtd: rawnand: omap_gpmc: remove unneeded variable
Subsystems (2)
PATCH 1/1 mtd: rawnand: omap_gpmc: remove unneeded variable
remove unneeded variable ecc_flag in omap_correct_data_bch
Signed-off-by Heiko Schocher <[email protected]>
---
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(-)
drivers/mtd/nand/raw/omap_gpmc.c +2 -2
@@ -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; }
Signature · 1 line
2.37.3
Quoted 33 lines · Heiko Schocher
remove unneeded variable
ecc_flaginomap_correct_data_bchSigned-off-by Heiko Schocher <[email protected]>---
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(-)drivers/mtd/nand/raw/omap_gpmc.c +2
-3@@ -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; } --
Quoted 2 lines
2.37.3
Reviewed-by Michael Trimarchi <[email protected]>
Signature · 11 lines
Michael Nazzareno Trimarchi Co-Founder & Chief Executive Officer M. +39 347 913 2170 [email protected] __________________________________ Amarula Solutions BV Joop Geesinkweg 125, 1114 AB, Amsterdam, NL T. +31 (0)85 111 9172 [email protected] www.amarulasolutions.com