kernel: mtdsplit: fix fit rootfs_data split
authorChuanhong Guo <gch981213@gmail.com>
Fri, 28 Jun 2024 08:31:59 +0000 (16:31 +0800)
committerChuanhong Guo <gch981213@gmail.com>
Sun, 7 Jul 2024 12:58:56 +0000 (20:58 +0800)
commit7117ebab0bc681aa6657202dd44c6b562335901b
tree349048355f9d27210a96e4d144d580d1b864b26c
parent75cd4ef48dffea8c659605786cf426962dd6bfc4
kernel: mtdsplit: fix fit rootfs_data split

fit size should be rounded up instead of rounding down first and adding
a block. Otherwise the calculated size is one block more than needed
when fit size is exactly multiples of one block size.

Fixes: 9a863f803ec1 ("kernel: mtdsplit: add support for FIT image")
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Signed-off-by: Qingfang Deng <qingfang.deng@siflower.com.cn>
target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_fit.c