projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a1fe33a
)
UBI: Fastmap: Use max() to get the larger value
author
shengyong
<
[email protected]
>
Tue, 26 May 2015 10:07:05 +0000
(10:07 +0000)
committer
Richard Weinberger
<
[email protected]
>
Tue, 2 Jun 2015 09:43:33 +0000
(11:43 +0200)
Signed-off-by: Sheng Yong <
[email protected]
>
Signed-off-by: Richard Weinberger <
[email protected]
>
drivers/mtd/ubi/build.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/ubi/build.c
b/drivers/mtd/ubi/build.c
index b7f824d5ee8884eb1268ae3b0fb7501c4f3fe811..ddeccdfbd026510cf21127229deaded18193aa4e 100644
(file)
--- 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;