Generic Linux architectural discussions
 help / color / mirror / Atom feed
* [PATCH v2] div64.h: Fix description of do_div parameter
@ 2019-08-08 18:19 Jonathan Neuschäfer
  2019-08-08 18:19 ` Jonathan Neuschäfer
  0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Neuschäfer @ 2019-08-08 18:19 UTC (permalink / raw)
  To: linux-kernel
  Cc: Geert Uytterhoeven, Jonathan Neuschäfer, Geert Uytterhoeven,
	Arnd Bergmann, linux-arch

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.

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---

v2:
- add Geert Uytterhoeven's R-b

v1:
- https://lore.kernel.org/lkml/20190225140355.4335-1-j.neuschaefer@gmx.net/
---
 include/asm-generic/div64.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/asm-generic/div64.h b/include/asm-generic/div64.h
index dc9726fdac8f..b2a9c74efa55 100644
--- a/include/asm-generic/div64.h
+++ b/include/asm-generic/div64.h
@@ -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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH v2] div64.h: Fix description of do_div parameter
  2019-08-08 18:19 [PATCH v2] div64.h: Fix description of do_div parameter Jonathan Neuschäfer
@ 2019-08-08 18:19 ` Jonathan Neuschäfer
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Neuschäfer @ 2019-08-08 18:19 UTC (permalink / raw)
  To: linux-kernel
  Cc: Geert Uytterhoeven, Jonathan Neuschäfer, Geert Uytterhoeven,
	Arnd Bergmann, linux-arch

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.

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---

v2:
- add Geert Uytterhoeven's R-b

v1:
- https://lore.kernel.org/lkml/20190225140355.4335-1-j.neuschaefer@gmx.net/
---
 include/asm-generic/div64.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/asm-generic/div64.h b/include/asm-generic/div64.h
index dc9726fdac8f..b2a9c74efa55 100644
--- a/include/asm-generic/div64.h
+++ b/include/asm-generic/div64.h
@@ -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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-08-08 18:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-08 18:19 [PATCH v2] div64.h: Fix description of do_div parameter Jonathan Neuschäfer
2019-08-08 18:19 ` Jonathan Neuschäfer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox