summaryrefslogtreecommitdiff
path: root/include/linux/minmax.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2025-12-10 05:41:10 +0900
committerLinus Torvalds <torvalds@linux-foundation.org>2025-12-10 05:41:10 +0900
commitc752c21c90b808a059ae8e0070ff7566a65f8577 (patch)
tree092097f1fd1b9f2d687130b5fd67d05b8004ce0d /include/linux/minmax.h
parent3d99347a2e1ae60d9368b1d734290bab1acde0ce (diff)
parent4ecc26fa585216f98d71411ce182f9e823d94c8c (diff)
Merge tag 'auto-type-conversion-for-v6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-auto
Pull __auto_type to auto conversion from Peter Anvin: "Convert '__auto_type' to 'auto', defining a macro for 'auto' unless C23+ is in use" * tag 'auto-type-conversion-for-v6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-auto: tools/virtio: replace "__auto_type" with "auto" selftests/bpf: replace "__auto_type" with "auto" arch/x86: replace "__auto_type" with "auto" arch/nios2: replace "__auto_type" and adjacent equivalent with "auto" fs/proc: replace "__auto_type" with "const auto" include/linux: change "__auto_type" to "auto" compiler_types.h: add "auto" as a macro for "__auto_type"
Diffstat (limited to 'include/linux/minmax.h')
-rw-r--r--include/linux/minmax.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/minmax.h b/include/linux/minmax.h
index eaaf5c008e4d..a0158db54a04 100644
--- a/include/linux/minmax.h
+++ b/include/linux/minmax.h
@@ -89,7 +89,7 @@
__cmp_once_unique(op, type, x, y, __UNIQUE_ID(x_), __UNIQUE_ID(y_))
#define __careful_cmp_once(op, x, y, ux, uy) ({ \
- __auto_type ux = (x); __auto_type uy = (y); \
+ auto ux = (x); auto uy = (y); \
BUILD_BUG_ON_MSG(!__types_ok(ux, uy), \
#op"("#x", "#y") signedness error"); \
__cmp(op, ux, uy); })
@@ -129,7 +129,7 @@
__careful_cmp(max, (x) + 0u + 0ul + 0ull, (y) + 0u + 0ul + 0ull)
#define __careful_op3(op, x, y, z, ux, uy, uz) ({ \
- __auto_type ux = (x); __auto_type uy = (y);__auto_type uz = (z);\
+ auto ux = (x); auto uy = (y); auto uz = (z); \
BUILD_BUG_ON_MSG(!__types_ok3(ux, uy, uz), \
#op"3("#x", "#y", "#z") signedness error"); \
__cmp(op, ux, __cmp(op, uy, uz)); })
@@ -203,7 +203,7 @@
* This macro checks @val/@lo/@hi to make sure they have compatible
* signedness.
*/
-#define clamp(val, lo, hi) __careful_clamp(__auto_type, val, lo, hi)
+#define clamp(val, lo, hi) __careful_clamp(auto, val, lo, hi)
/**
* clamp_t - return a value clamped to a given range using a given type