Thread (13 messages) read the whole thread 13 messages, 4 authors, 2025-09-07
STALE327d

Revision v3 of 5 in this series.

Revisions (5)
  1. v1 [diff vs current]
  2. v3 current
  3. v4 [diff vs current]
  4. v5 [diff vs current]
  5. v6 [diff vs current]

[PATCH v3 3/4] math.h: Add 64-bit fractional numbers types

From: Jonathan Santos <hidden>
Date: 2025-09-05 15:53:52
Also in: linux-iio, lkml
Subsystem: the rest · Maintainer: Linus Torvalds

Extend fractional numbers types to include __u64 and __s64 data types.

Signed-off-by: Jonathan Santos <redacted>
---
v3 Changes:
* New patch.
* OBS: Andy suggested to support long types, but the macro was made for
  data types like __TYPE. So i have added the __u64 and __s64 types.
---
 include/linux/math.h | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/include/linux/math.h b/include/linux/math.h
index 0198c92cbe3e..ff28a0dcfaa8 100644
--- a/include/linux/math.h
+++ b/include/linux/math.h
@@ -130,6 +130,8 @@ __STRUCT_FRACT(s16)
 __STRUCT_FRACT(u16)
 __STRUCT_FRACT(s32)
 __STRUCT_FRACT(u32)
+__STRUCT_FRACT(s64)
+__STRUCT_FRACT(u64)
 #undef __STRUCT_FRACT
 
 /* Calculate "x * n / d" without unnecessary overflow or loss of precision. */
-- 
2.34.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help