linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zheng Yongjun <zhengyongjun3@huawei.com>
To: <ulf.hansson@linaro.org>, <linux-mmc@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Cc: Zheng Yongjun <zhengyongjun3@huawei.com>
Subject: [PATCH -next] mmc: core: use roundup macro to to calculate blk_sz
Date: Tue, 22 Dec 2020 21:33:55 +0800	[thread overview]
Message-ID: <20201222133355.19807-1-zhengyongjun3@huawei.com> (raw)

Don't open-code roundup() kernel macro.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.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


             reply	other threads:[~2020-12-22 13:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-22 13:33 Zheng Yongjun [this message]
2021-01-19 13:11 ` [PATCH -next] mmc: core: use roundup macro to to calculate blk_sz Ulf Hansson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201222133355.19807-1-zhengyongjun3@huawei.com \
    --to=zhengyongjun3@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).