math.h: Introduce data types for fractional numbers
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 26 Jan 2022 13:53:50 +0000 (15:53 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 30 Jan 2022 12:21:25 +0000 (12:21 +0000)
commite820a33748b5e22cecafddf919a7d8679949deb1
treea49692232b07f06e9c169aa3e24b2ccb33339903
parentde645b279144b7d036ef672227af76739365f3ae
math.h: Introduce data types for fractional numbers

Introduce a macro to produce data types like

struct TYPE_fract {
__TYPE numerator;
__TYPE denominator;
};

to be used in the code wherever it's needed.

In the following changes convert some users to it.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220126135353.24007-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
include/linux/math.h