mtd: rawnand: omap_elm: remove redundant variable 'errors'
Subsystems (3)
PATCH 1/1 mtd: rawnand: omap_elm: remove redundant variable 'errors'
The variable 'errors' is being used to sum the number of errors but it is never used afterwards. This can be considered a redundant set of operations and can be removed.
Signed-off-by Colin Ian King <[email protected]>
--- drivers/mtd/nand/raw/omap_elm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/mtd/nand/raw/omap_elm.c +1 -3
@@ -282,7 +282,7 @@ static void elm_start_processing(struct elm_info *info,static void elm_error_correction (struct elm_info *info,struct elm_errorvec *err_vec) { -int i, j, errors =0 ; +int i, j;int offset;u32 reg_val;
@@ -312,8 +312,6 @@ static void elm_error_correction(struct elm_info *info,/* Update error location register */ offset +=4 ; } - - errors += err_vec[i].error_count; }else { err_vec[i].error_uncorrectable = true; }
Signature · 1 line
2.33.1
Quoted 5 lines · Colin Ian King
The variable 'errors' is being used to sum the number of errors but it is never used afterwards. This can be considered a redundant set of operations and can be removed.
Signed-off-by Colin Ian King <[email protected]>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
Miquel