From: Zheng Yongjun <zhengyongjun3@huawei.com>
To: <jason.wessel@windriver.com>, <daniel.thompson@linaro.org>,
<kgdb-bugreport@lists.sourceforge.net>,
<linux-kernel@vger.kernel.org>
Cc: <dianders@chromium.org>, Zheng Yongjun <zhengyongjun3@huawei.com>
Subject: [PATCH -next] misc: use DIV_ROUND_UP macro to do calculation
Date: Tue, 22 Dec 2020 21:33:44 +0800 [thread overview]
Message-ID: <20201222133344.19753-1-zhengyongjun3@huawei.com> (raw)
Don't open-code DIV_ROUND_UP() kernel macro.
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
drivers/misc/kgdbts.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c
index 945701bce553..cd086921a792 100644
--- a/drivers/misc/kgdbts.c
+++ b/drivers/misc/kgdbts.c
@@ -139,9 +139,8 @@ static int restart_from_top_after_write;
static int sstep_state;
/* Storage for the registers, in GDB format. */
-static unsigned long kgdbts_gdb_regs[(NUMREGBYTES +
- sizeof(unsigned long) - 1) /
- sizeof(unsigned long)];
+static unsigned long kgdbts_gdb_regs[DIV_ROUND_UP(NUMREGBYTES,
+ sizeof(unsigned long)i)];
static struct pt_regs kgdbts_regs;
/* -1 = init not run yet, 0 = unconfigured, 1 = configured. */
--
2.22.0
next reply other threads:[~2020-12-22 13:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-22 13:33 Zheng Yongjun [this message]
2020-12-22 17:11 ` [PATCH -next] misc: use DIV_ROUND_UP macro to do calculation Daniel Thompson
2020-12-29 2:41 ` kernel test robot
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=20201222133344.19753-1-zhengyongjun3@huawei.com \
--to=zhengyongjun3@huawei.com \
--cc=daniel.thompson@linaro.org \
--cc=dianders@chromium.org \
--cc=jason.wessel@windriver.com \
--cc=kgdb-bugreport@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.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).