From: Liam Beguin <liambeguin@gmail.com>
To: Liam Beguin <liambeguin@gmail.com>,
Jonathan Corbet <corbet@lwn.net>,
Randy Dunlap <rdunlap@infradead.org>
Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 2/3] math64: add kernel-doc for DIV64_U64_ROUND_UP
Date: Fri, 18 Nov 2022 13:23:08 -0500 [thread overview]
Message-ID: <20221118182309.3824530-2-liambeguin@gmail.com> (raw)
In-Reply-To: <20221118182309.3824530-1-liambeguin@gmail.com>
Add kernel-doc for DIV64_U64_ROUND_UP so that it appears in the
documentation.
Signed-off-by: Liam Beguin <liambeguin@gmail.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
---
include/linux/math64.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/include/linux/math64.h b/include/linux/math64.h
index 1538844fcb51..cf3b0099674a 100644
--- a/include/linux/math64.h
+++ b/include/linux/math64.h
@@ -284,6 +284,16 @@ static inline u64 mul_u64_u32_div(u64 a, u32 mul, u32 divisor)
u64 mul_u64_u64_div_u64(u64 a, u64 mul, u64 div);
+/**
+ * DIV64_U64_ROUND_UP - unsigned 64bit divide with 64bit divisor rounded up
+ * @ll: unsigned 64bit dividend
+ * @d: unsigned 64bit divisor
+ *
+ * Divide unsigned 64bit dividend by unsigned 64bit divisor
+ * and round up.
+ *
+ * Return: dividend / divisor rounded up
+ */
#define DIV64_U64_ROUND_UP(ll, d) \
({ u64 _tmp = (d); div64_u64((ll) + _tmp - 1, _tmp); })
--
2.37.1.223.g6a475b71f8c4
next prev parent reply other threads:[~2022-11-18 18:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-18 18:23 [PATCH v2 1/3] math64: favor kernel-doc from header files Liam Beguin
2022-11-18 18:23 ` Liam Beguin [this message]
2022-11-18 18:23 ` [PATCH v2 3/3] math64: fix kernel-doc return value warnings Liam Beguin
2022-11-21 21:32 ` [PATCH v2 1/3] math64: favor kernel-doc from header files Jonathan Corbet
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=20221118182309.3824530-2-liambeguin@gmail.com \
--to=liambeguin@gmail.com \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@infradead.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).