aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2025-07-19 23:36:58 -0700
committerH. Peter Anvin <hpa@zytor.com>2025-12-08 15:32:14 -0800
commitb3b8767c290102a8d95b9d12585cc1e03381ce3f (patch)
treebd1cee6910a4ff54239fb8df9681e229b4d2973c
parent2fb6915fa22dc5524d704afba58a13305dd9f533 (diff)
downloadtip-b3b8767c290102a8d95b9d12585cc1e03381ce3f.tar.gz
include/linux: change "__auto_type" to "auto"
Replace instances of "__auto_type" with "auto" in include/linux. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
-rw-r--r--include/linux/cleanup.h6
-rw-r--r--include/linux/compiler.h2
-rw-r--r--include/linux/minmax.h6
3 files changed, 7 insertions, 7 deletions
diff --git a/include/linux/cleanup.h b/include/linux/cleanup.h
index 0b55a8f6c59e1a..8d41b917c77d5a 100644
--- a/include/linux/cleanup.h
+++ b/include/linux/cleanup.h
@@ -212,10 +212,10 @@
#define __free(_name) __cleanup(__free_##_name)
-#define __get_and_null(p, nullvalue) \
+#define __get_and_null(p, nullvalue) \
({ \
- __auto_type __ptr = &(p); \
- __auto_type __val = *__ptr; \
+ auto __ptr = &(p); \
+ auto __val = *__ptr; \
*__ptr = nullvalue; \
__val; \
})
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index ff71bebe56f5cf..04487c9bd7510c 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -190,7 +190,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val,
#define data_race(expr) \
({ \
__kcsan_disable_current(); \
- __auto_type __v = (expr); \
+ auto __v = (expr); \
__kcsan_enable_current(); \
__v; \
})
diff --git a/include/linux/minmax.h b/include/linux/minmax.h
index eaaf5c008e4d05..a0158db54a0411 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