[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f9ebbb830fab46201dacbffa4cbe223782f0acf3.1757001160.git.Jonathan.Santos@analog.com>
Date: Fri, 5 Sep 2025 06:49:32 -0300
From: Jonathan Santos <Jonathan.Santos@...log.com>
To: <linux-iio@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
CC: Jonathan Santos <Jonathan.Santos@...log.com>, <lars@...afoo.de>,
<jic23@...nel.org>, <dlechner@...libre.com>, <nuno.sa@...log.com>,
<andy@...nel.org>, <robh@...nel.org>, <krzk+dt@...nel.org>,
<conor+dt@...nel.org>, <marcelo.schmitt1@...il.com>,
<jonath4nns@...il.com>
Subject: [PATCH v3 3/4] math.h: Add 64-bit fractional numbers types
Extend fractional numbers types to include __u64 and __s64 data types.
Signed-off-by: Jonathan Santos <Jonathan.Santos@...log.com>
---
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
Powered by blists - more mailing lists