diff options
author | Colin Ian King <colin.king@canonical.com> | 2018-07-04 02:46:09 -0400 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@bootlin.com> | 2018-07-07 04:55:05 -0400 |
commit | fb60e87dc4aa415f9d797c5df522eb9578366359 (patch) | |
tree | 75843b4b12361cfb1124dc5c2dffbb168815223d | |
parent | 0219ef1ce577b85a859559c43458c52ca7f29586 (diff) |
mtd: nftl: remove redundant variable nb_erases
Variable nb_erases is being assigned but is never used hence it is
redundant and can be removed.
Cleans up clang warning:
warning: variable 'nb_erases' set but not used [-Wunused-but-set-variable]
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-rw-r--r-- | drivers/mtd/nftlmount.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/nftlmount.c b/drivers/mtd/nftlmount.c index 27184e3874db..91b7fb326f9a 100644 --- a/drivers/mtd/nftlmount.c +++ b/drivers/mtd/nftlmount.c | |||
@@ -577,7 +577,7 @@ static int get_fold_mark(struct NFTLrecord *nftl, unsigned int block) | |||
577 | int NFTL_mount(struct NFTLrecord *s) | 577 | int NFTL_mount(struct NFTLrecord *s) |
578 | { | 578 | { |
579 | int i; | 579 | int i; |
580 | unsigned int first_logical_block, logical_block, rep_block, nb_erases, erase_mark; | 580 | unsigned int first_logical_block, logical_block, rep_block, erase_mark; |
581 | unsigned int block, first_block, is_first_block; | 581 | unsigned int block, first_block, is_first_block; |
582 | int chain_length, do_format_chain; | 582 | int chain_length, do_format_chain; |
583 | struct nftl_uci0 h0; | 583 | struct nftl_uci0 h0; |
@@ -621,7 +621,6 @@ int NFTL_mount(struct NFTLrecord *s) | |||
621 | 621 | ||
622 | logical_block = le16_to_cpu ((h0.VirtUnitNum | h0.SpareVirtUnitNum)); | 622 | logical_block = le16_to_cpu ((h0.VirtUnitNum | h0.SpareVirtUnitNum)); |
623 | rep_block = le16_to_cpu ((h0.ReplUnitNum | h0.SpareReplUnitNum)); | 623 | rep_block = le16_to_cpu ((h0.ReplUnitNum | h0.SpareReplUnitNum)); |
624 | nb_erases = le32_to_cpu (h1.WearInfo); | ||
625 | erase_mark = le16_to_cpu ((h1.EraseMark | h1.EraseMark1)); | 624 | erase_mark = le16_to_cpu ((h1.EraseMark | h1.EraseMark1)); |
626 | 625 | ||
627 | is_first_block = !(logical_block >> 15); | 626 | is_first_block = !(logical_block >> 15); |