diff options
author | Geliang Tang <geliangtang@gmail.com> | 2016-12-20 14:54:33 +0100 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2017-04-19 22:12:02 +0200 |
commit | e4a8aad8e070e54e486666cc8bb97d69dc81adfb (patch) | |
tree | a4d3ddb9f61bbaff08bb44c3377424419e6e7ac8 /drivers/mtd/mtdswap.c | |
parent | drivers/mtd: Convert remaining uses of pr_warning to pr_warn (diff) | |
download | linux-e4a8aad8e070e54e486666cc8bb97d69dc81adfb.tar.xz linux-e4a8aad8e070e54e486666cc8bb97d69dc81adfb.zip |
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: Geliang Tang <geliangtang@gmail.com>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to '')
-rw-r--r-- | drivers/mtd/mtdswap.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mtd/mtdswap.c b/drivers/mtd/mtdswap.c index c40e2c951758..f12879a3d4ff 100644 --- a/drivers/mtd/mtdswap.c +++ b/drivers/mtd/mtdswap.c @@ -1235,10 +1235,8 @@ static int mtdswap_show(struct seq_file *s, void *data) if (root->rb_node) { count[i] = d->trees[i].count; - min[i] = rb_entry(rb_first(root), struct swap_eb, - rb)->erase_count; - max[i] = rb_entry(rb_last(root), struct swap_eb, - rb)->erase_count; + min[i] = MTDSWAP_ECNT_MIN(root); + max[i] = MTDSWAP_ECNT_MAX(root); } else count[i] = 0; } |