[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201222133355.19807-1-zhengyongjun3@huawei.com>
Date: Tue, 22 Dec 2020 21:33:55 +0800
From: Zheng Yongjun <zhengyongjun3@...wei.com>
To: <ulf.hansson@...aro.org>, <linux-mmc@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
CC: Zheng Yongjun <zhengyongjun3@...wei.com>
Subject: [PATCH -next] mmc: core: use roundup macro to to calculate blk_sz
Don't open-code roundup() kernel macro.
Signed-off-by: Zheng Yongjun <zhengyongjun3@...wei.com>
---
drivers/mmc/core/sdio_io.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/mmc/core/sdio_io.c b/drivers/mmc/core/sdio_io.c
index 79dbf90216b5..35c69bdeb40e 100644
--- a/drivers/mmc/core/sdio_io.c
+++ b/drivers/mmc/core/sdio_io.c
@@ -263,8 +263,7 @@ unsigned int sdio_align_size(struct sdio_func *func, unsigned int sz)
* Realign it so that it can be done with one request,
* and recheck if the controller still likes it.
*/
- blk_sz = ((sz + func->cur_blksize - 1) /
- func->cur_blksize) * func->cur_blksize;
+ blk_sz = roundup(sz, func->cur_blksize);
blk_sz = _sdio_align_size(blk_sz);
/*
--
2.22.0
Powered by blists - more mailing lists