diff options
| author | Thomas Gleixner <tglx@kernel.org> | 2026-05-18 12:01:07 +0300 |
|---|---|---|
| committer | Thomas Gleixner <tglx@kernel.org> | 2026-05-18 12:01:07 +0300 |
| commit | 09d6818d3bdc1ea6e49a425040528cbdbc97bc0a (patch) | |
| tree | 989f9d94c592294e4ae5421c9cbcbad99eee996c /include/linux/math.h | |
| parent | 1655f6895a896eb632ca8a019259bc5d358a9712 (diff) | |
| parent | 5200f5f493f79f14bbdc349e402a40dfb32f23c8 (diff) | |
| download | linux-09d6818d3bdc1ea6e49a425040528cbdbc97bc0a.tar.xz | |
Merge branch 'linus' into timers/clocksource
... to bring it up to date for new changes.
Diffstat (limited to 'include/linux/math.h')
| -rw-r--r-- | include/linux/math.h | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/include/linux/math.h b/include/linux/math.h index 6dc1d1d32fbc..1e8fb3efbc8c 100644 --- a/include/linux/math.h +++ b/include/linux/math.h @@ -89,23 +89,7 @@ } \ ) -/* - * Divide positive or negative dividend by positive or negative divisor - * and round to closest integer. Result is undefined for negative - * divisors if the dividend variable type is unsigned and for negative - * dividends if the divisor variable type is unsigned. - */ -#define DIV_ROUND_CLOSEST(x, divisor)( \ -{ \ - typeof(x) __x = x; \ - typeof(divisor) __d = divisor; \ - (((typeof(x))-1) > 0 || \ - ((typeof(divisor))-1) > 0 || \ - (((__x) > 0) == ((__d) > 0))) ? \ - (((__x) + ((__d) / 2)) / (__d)) : \ - (((__x) - ((__d) / 2)) / (__d)); \ -} \ -) +#define DIV_ROUND_CLOSEST __KERNEL_DIV_ROUND_CLOSEST /* * Same as above but for u64 dividends. divisor must be a 32-bit * number. |
