aboutsummaryrefslogtreecommitdiff
path: root/include/linux/math.h
diff options
context:
space:
mode:
authorRodrigo Vivi <rodrigo.vivi@intel.com>2026-04-08 15:56:19 -0400
committerRodrigo Vivi <rodrigo.vivi@intel.com>2026-04-08 15:56:19 -0400
commitaf35e741e2f2dbef75500921e8fce17cf4f08fbd (patch)
tree155265a00862346154abd483cb51b3aab270b5c6 /include/linux/math.h
parent5150b57dacf9563ab29661c8e8a37a73f5a9fc54 (diff)
parent4516432284e1b2ad9e70de8067f779c9c1072189 (diff)
Merge drm/drm-next into drm-xe-next
Sync drm-xe-next with drm-next to unblock some topic branches. Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'include/linux/math.h')
-rw-r--r--include/linux/math.h18
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.