From 6ec72e61cb09482fe08524480f7f3f18a6d23cfa Mon Sep 17 00:00:00 2001
From: Randy Dunlap <rdunlap@infradead.org>
Date: Sat, 30 Sep 2017 08:43:42 -0700
Subject: [PATCH] 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>
---
 include/asm-generic/div64.h | 14 ++++++++++++++
 lib/div64.c                 |  6 ++++++
 2 files changed, 20 insertions(+)

diff --git a/include/asm-generic/div64.h b/include/asm-generic/div64.h
index 163f77999ea4e..3de84f64423f2 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;						\
diff --git a/lib/div64.c b/lib/div64.c
index 7f345259c32f1..5660e8233293f 100644
--- a/lib/div64.c
+++ b/lib/div64.c
@@ -60,6 +60,12 @@ uint32_t __attribute__((weak)) __div64_32(uint64_t *n, uint32_t base)
 EXPORT_SYMBOL(__div64_32);
 #endif
 
+/**
+ * div_s64_rem - signed 64bit divide with 64bit divisor and remainder
+ * @dividend:	64bit dividend
+ * @divisor:	64bit divisor
+ * @remainder:  64bit remainder
+ */
 #ifndef div_s64_rem
 s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder)
 {
-- 
GitLab