summaryrefslogtreecommitdiffstats
path: root/include/asm-generic
diff options
context:
space:
mode:
authorRandy Dunlap <rdunlap@infradead.org>2017-09-30 17:43:42 +0200
committerJonathan Corbet <corbet@lwn.net>2017-10-07 18:45:07 +0200
commit6ec72e61cb09482fe08524480f7f3f18a6d23cfa (patch)
treeabe54b457928c6e3bd4b7a42eb30ff71baeb7fbb /include/asm-generic
parentlinux/log2.h: fix kernel-doc notation (diff)
downloadlinux-6ec72e61cb09482fe08524480f7f3f18a6d23cfa.tar.xz
linux-6ec72e61cb09482fe08524480f7f3f18a6d23cfa.zip
div64: add missing kernel-doc
Add missing kernel-doc notation for 2 div() functions. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/div64.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/asm-generic/div64.h b/include/asm-generic/div64.h
index 163f77999ea4..3de84f64423f 100644
--- a/include/asm-generic/div64.h
+++ b/include/asm-generic/div64.h
@@ -25,6 +25,20 @@
#if BITS_PER_LONG == 64
+/**
+ * do_div - returns 2 values: calculate remainder and update new dividend
+ * @n: pointer to uint64_t dividend (will be updated)
+ * @base: uint32_t divisor
+ *
+ * Summary:
+ * ``uint32_t remainder = *n % base;``
+ * ``*n = *n / base;``
+ *
+ * Return: (uint32_t)remainder
+ *
+ * NOTE: macro parameter @n is evaluated multiple times,
+ * beware of side effects!
+ */
# define do_div(n,base) ({ \
uint32_t __base = (base); \
uint32_t __rem; \