Skip to contentSkip to conversation

average: Clarify the restrictions

PATCH Superseded Jui-Tse Huang 2 participants 2 messages Jun 1, 2022

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 average: Clarify the restrictions

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.

---

Notes:
v2: fix spelling and wording (Bruno Randolf)

 include/linux/average.h | 3 +++
 1 file changed, 3 insertions(+)
include/linux/average.h +3 -0
index a1a8f09631ce..ff0953ba2820 100644
@@ -13,6 +13,9 @@
  * precision and fall-off coefficient determined at compile-time
  * and built into the generated helper funtions.
  *
+ * This implementation supports up to 30 bits of precition, and only
+ * the API for 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.
  *
Signature · 1 line
2.34.1
#1 lore raw
Quoted 18 lines · Jui-Tse 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.

---

Notes:
v2: fix spelling and wording (Bruno Randolf)

 include/linux/average.h | 3 +++
 1 file changed, 3 insertions(+)
include/linux/average.h +0 -0
index a1a8f09631ce..ff0953ba2820 100644

include/linux/average.h line 14

Quoted 2 lines
include/linux/average.h +0 -0
@@ -13,6 +13,9 @@
  * precision and fall-off coefficient determined at compile-time
  * and built into the generated helper funtions.

functions.

include/linux/average.h line 16

Quoted 2 lines
include/linux/average.h +1 -0
  *
+ * This implementation supports up to 30 bits of precition, and only

precision,

Quoted 5 lines
include/linux/average.h +2 -0
+ * the API for 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.
  *
Signature · 1 line
~Randy