Skip to content

Commit e38a82d

Browse files
AngeloGioacchino Del Regnojic23
authored andcommitted
math.h: Add unsigned 8 bits fractional numbers type
Some users may be requiring only rather small numbers as both numerator and denominator: add signed and unsigned 8 bits structs {s8,u8}_fract. Signed-off-by: AngeloGioacchino Del Regno <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 4d8aa43 commit e38a82d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/linux/math.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ struct type##_fract { \
112112
__##type numerator; \
113113
__##type denominator; \
114114
};
115+
__STRUCT_FRACT(s8)
116+
__STRUCT_FRACT(u8)
115117
__STRUCT_FRACT(s16)
116118
__STRUCT_FRACT(u16)
117119
__STRUCT_FRACT(s32)

0 commit comments

Comments
 (0)