Commit 6ec72e61 authored by Randy Dunlap's avatar Randy Dunlap Committed by Jonathan Corbet

div64: add missing kernel-doc

Add missing kernel-doc notation for 2 div() functions.
Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent a1c4d24e
...@@ -25,6 +25,20 @@ ...@@ -25,6 +25,20 @@
#if BITS_PER_LONG == 64 #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) ({ \ # define do_div(n,base) ({ \
uint32_t __base = (base); \ uint32_t __base = (base); \
uint32_t __rem; \ uint32_t __rem; \
......
...@@ -60,6 +60,12 @@ uint32_t __attribute__((weak)) __div64_32(uint64_t *n, uint32_t base) ...@@ -60,6 +60,12 @@ uint32_t __attribute__((weak)) __div64_32(uint64_t *n, uint32_t base)
EXPORT_SYMBOL(__div64_32); EXPORT_SYMBOL(__div64_32);
#endif #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 #ifndef div_s64_rem
s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder) s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment