mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] average: Clarify the restrictions
@ 2022-06-01  6:57 Jui-Tse Huang
  2022-06-01  7:04 ` Bruno Randolf
  0 siblings, 1 reply; 2+ messages in thread
From: Jui-Tse Huang @ 2022-06-01  6:57 UTC (permalink / raw)
  To: linux-kernel
  Cc: Jui-Tse Huang, Mark Rutland, Johannes Berg, Bruno Randolf,
	Ching-Chun Huang

There is several restrictions in the EWMA helper macro that the
developers should take care of, but the comment does not mentioned yet,
thus, this patch clarify the restrictions.

Signed-off-by: Jui-Tse Huang <juitse.huang@gmail.com>
---
 include/linux/average.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/average.h b/include/linux/average.h
index a1a8f09631ce..1618f6519c3d 100644
--- a/include/linux/average.h
+++ b/include/linux/average.h
@@ -13,6 +13,10 @@
  * precision and fall-off coefficient determined at compile-time
  * and built into the generated helper funtions.
  *
+ * This implementation supports upto 30 bits of precition, and for
+ * usage concern, only the api of fetching non-fractional part is
+ * provided for now.
+ *
  * The first argument to the macro is the name that will be used
  * for the struct and helper functions.
  *
-- 
2.34.1


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

* Re: [PATCH] average: Clarify the restrictions
  2022-06-01  6:57 [PATCH] average: Clarify the restrictions Jui-Tse Huang
@ 2022-06-01  7:04 ` Bruno Randolf
  0 siblings, 0 replies; 2+ messages in thread
From: Bruno Randolf @ 2022-06-01  7:04 UTC (permalink / raw)
  To: Jui-Tse Huang, linux-kernel; +Cc: Mark Rutland, Johannes Berg, Ching-Chun Huang

On 01/06/2022 07:57, Jui-Tse Huang wrote:
> There is several restrictions in the EWMA helper macro that the
> developers should take care of, but the comment does not mentioned yet,
> thus, this patch clarify the restrictions.
> 
> Signed-off-by: Jui-Tse Huang <juitse.huang@gmail.com>
> ---
>   include/linux/average.h | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/include/linux/average.h b/include/linux/average.h
> index a1a8f09631ce..1618f6519c3d 100644
> --- a/include/linux/average.h
> +++ b/include/linux/average.h
> @@ -13,6 +13,10 @@
>    * precision and fall-off coefficient determined at compile-time
>    * and built into the generated helper funtions.
>    *
> + * This implementation supports upto 30 bits of precition, and for

spelling: up to ... precision

> + * usage concern, only the api of fetching non-fractional part is
> + * provided for now.

spelling: "API for"

wording: remove "and for usage concern", just ", and only the API for" 
would be enough.

Thank you,
bruno

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

end of thread, other threads:[~2022-06-01  7:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-01  6:57 [PATCH] average: Clarify the restrictions Jui-Tse Huang
2022-06-01  7:04 ` Bruno Randolf

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

all inboxes | Powered by JetHome®