Commit e4a8aad8 authored by Geliang Tang's avatar Geliang Tang Committed by Brian Norris

mtd: mtdswap: use MTDSWAP_ECNT_MIN/MAX

Since macros MTDSWAP_ECNT_MIN() and MTDSWAP_ECNT_MAX() have been
defined in mtdswap.c, use them instead of open-coding.
Signed-off-by: default avatarGeliang Tang <geliangtang@gmail.com>
Acked-by: default avatarMarek Vasut <marek.vasut@gmail.com>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent e8348dc5
...@@ -1235,10 +1235,8 @@ static int mtdswap_show(struct seq_file *s, void *data) ...@@ -1235,10 +1235,8 @@ static int mtdswap_show(struct seq_file *s, void *data)
if (root->rb_node) { if (root->rb_node) {
count[i] = d->trees[i].count; count[i] = d->trees[i].count;
min[i] = rb_entry(rb_first(root), struct swap_eb, min[i] = MTDSWAP_ECNT_MIN(root);
rb)->erase_count; max[i] = MTDSWAP_ECNT_MAX(root);
max[i] = rb_entry(rb_last(root), struct swap_eb,
rb)->erase_count;
} else } else
count[i] = 0; count[i] = 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment