Merge tag 'docs-4.15' of git://git.lwn.net/linux
[muen/linux.git] / include / asm-generic / div64.h
index d2013064dc69719cf7111f8c045c02580e51006e..dc9726fdac8f3398e4c7af310a6c00fb06c630a8 100644 (file)
 
 #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;                                         \