[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201222133344.19753-1-zhengyongjun3@huawei.com>
Date: Tue, 22 Dec 2020 21:33:44 +0800
From: Zheng Yongjun <zhengyongjun3@...wei.com>
To: <jason.wessel@...driver.com>, <daniel.thompson@...aro.org>,
<kgdb-bugreport@...ts.sourceforge.net>,
<linux-kernel@...r.kernel.org>
CC: <dianders@...omium.org>, Zheng Yongjun <zhengyongjun3@...wei.com>
Subject: [PATCH -next] misc: use DIV_ROUND_UP macro to do calculation
Don't open-code DIV_ROUND_UP() kernel macro.
Signed-off-by: Zheng Yongjun <zhengyongjun3@...wei.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
Powered by blists - more mailing lists