projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d28a1de
)
math64: add kernel-doc for DIV64_U64_ROUND_UP
author
Liam Beguin
<liambeguin@gmail.com>
Fri, 18 Nov 2022 18:23:08 +0000
(13:23 -0500)
committer
Jonathan Corbet
<corbet@lwn.net>
Mon, 21 Nov 2022 21:30:54 +0000
(14:30 -0700)
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>
Link:
https://lore.kernel.org/r/20221118182309.3824530-2-liambeguin@gmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
include/linux/math64.h
patch
|
blob
|
history
diff --git
a/include/linux/math64.h
b/include/linux/math64.h
index 1538844fcb517b2ac5d58e3ea2493bc0ebfae826..cf3b0099674a642687e5e0fcf8e95c78b87b1811 100644
(file)
--- 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); })