From: Liam Beguin <liambeguin@gmail.com>
To: liambeguin@gmail.com, corbet@lwn.net
Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v1 2/2] math64: add kernel-doc for DIV64_U64_ROUND_UP
Date: Wed, 16 Nov 2022 21:35:10 -0500 [thread overview]
Message-ID: <20221117023510.2338176-2-liambeguin@gmail.com> (raw)
In-Reply-To: <20221117023510.2338176-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>
---
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-17 2:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-17 2:35 [PATCH v1 1/2] math64: favor kernel-doc from header files Liam Beguin
2022-11-17 2:35 ` Liam Beguin [this message]
2022-11-17 17:02 ` [PATCH v1 2/2] math64: add kernel-doc for DIV64_U64_ROUND_UP Randy Dunlap
2022-11-17 17:01 ` [PATCH v1 1/2] math64: favor kernel-doc from header files Randy Dunlap
2022-11-17 17:23 ` Liam Beguin
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=20221117023510.2338176-2-liambeguin@gmail.com \
--to=liambeguin@gmail.com \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.