Skip to contentSkip to conversation

div64.h: Fix description of do_div parameter

PATCH Applied Jonathan Neuschäfer 2 participants 2 messages Aug 8, 2019 – Aug 28, 2019 Generic include/asm header files

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 div64.h: Fix description of do_div parameter

Contrary to the description, the first parameter (n) should not be passed as a pointer, but directly as an lvalue. This is possible because do_div is a macro.

---

v2:
- add Geert Uytterhoeven's R-b

v1:
- https://lore.kernel.org/lkml/[email protected]/

---
 include/asm-generic/div64.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
include/asm-generic/div64.h +3 -3
index dc9726fdac8f..b2a9c74efa55 100644
@@ -28,12 +28,12 @@
 
 /**
  * do_div - returns 2 values: calculate remainder and update new dividend
- * @n: pointer to uint64_t dividend (will be updated)
+ * @n: uint64_t dividend (will be updated)
  * @base: uint32_t divisor
  *
  * Summary:
- * ``uint32_t remainder = *n % base;``
- * ``*n = *n / base;``
+ * ``uint32_t remainder = n % base;``
+ * ``n = n / base;``
  *
  * Return: (uint32_t)remainder
  *

--
2.20.1

#1 lore raw

[tip: core/headers] asm-generic/div64: Fix documentation of do_div() parameter

The following commit has been merged into the core/headers branch of tip:

The following commit has been merged into the core/headers branch of tip:

Commit-ID:     e8e4eb0fbeda570b16464208aebf5caccfb6eb95
Gitweb:        https://git.kernel.org/tip/e8e4eb0fbeda570b16464208aebf5caccfb6eb95
Author:        Jonathan Neuschäfer <[email protected]>
AuthorDate:    Thu, 08 Aug 2019 20:19:48 +02:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Wed, 28 Aug 2019 16:38:46 +02:00

asm-generic/div64: Fix documentation of do_div() parameter

Contrary to the description, the first parameter (n) should not be passed as a pointer, but directly as an lvalue. This is possible because do_div() is a macro.

---
 include/asm-generic/div64.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
include/asm-generic/div64.h +3 -3
index dc9726f..b2a9c74 100644
@@ -28,12 +28,12 @@
 
 /**
  * do_div - returns 2 values: calculate remainder and update new dividend
- * @n: pointer to uint64_t dividend (will be updated)
+ * @n: uint64_t dividend (will be updated)
  * @base: uint32_t divisor
  *
  * Summary:
- * ``uint32_t remainder = *n % base;``
- * ``*n = *n / base;``
+ * ``uint32_t remainder = n % base;``
+ * ``n = n / base;``
  *
  * Return: (uint32_t)remainder
  *