diff options
author | shengyong <shengyong1@huawei.com> | 2015-05-26 10:07:05 +0000 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2015-06-02 11:43:33 +0200 |
commit | 212240dfd2d4ad979c1bd6d2318b8637ba24af09 (patch) | |
tree | 8d13d780d53b6b09bcf92e9732321ff888faf394 /drivers/mtd/ubi | |
parent | a1fe33af5f8c5f5aebe68d22125d19e48b8e601c (diff) | |
download | blackbird-op-linux-212240dfd2d4ad979c1bd6d2318b8637ba24af09.tar.gz blackbird-op-linux-212240dfd2d4ad979c1bd6d2318b8637ba24af09.zip |
UBI: Fastmap: Use max() to get the larger value
Signed-off-by: Sheng Yong <shengyong1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'drivers/mtd/ubi')
-rw-r--r-- | drivers/mtd/ubi/build.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c index b7f824d5ee88..ddeccdfbd026 100644 --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c @@ -947,8 +947,8 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num, */ ubi->fm_pool.max_size = min(((int)mtd_div_by_eb(ubi->mtd->size, ubi->mtd) / 100) * 5, UBI_FM_MAX_POOL_SIZE); - if (ubi->fm_pool.max_size < UBI_FM_MIN_POOL_SIZE) - ubi->fm_pool.max_size = UBI_FM_MIN_POOL_SIZE; + ubi->fm_pool.max_size = max(ubi->fm_pool.max_size, + UBI_FM_MIN_POOL_SIZE); ubi->fm_wl_pool.max_size = ubi->fm_pool.max_size / 2; ubi->fm_disabled = !fm_autoconvert; |