Skip to content

Commit b3b8767

Browse files
author
H. Peter Anvin
committed
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>
1 parent 2fb6915 commit b3b8767

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

include/linux/cleanup.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,10 @@
212212

213213
#define __free(_name) __cleanup(__free_##_name)
214214

215-
#define __get_and_null(p, nullvalue) \
215+
#define __get_and_null(p, nullvalue) \
216216
({ \
217-
__auto_type __ptr = &(p); \
218-
__auto_type __val = *__ptr; \
217+
auto __ptr = &(p); \
218+
auto __val = *__ptr; \
219219
*__ptr = nullvalue; \
220220
__val; \
221221
})

include/linux/compiler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val,
190190
#define data_race(expr) \
191191
({ \
192192
__kcsan_disable_current(); \
193-
__auto_type __v = (expr); \
193+
auto __v = (expr); \
194194
__kcsan_enable_current(); \
195195
__v; \
196196
})

include/linux/minmax.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
__cmp_once_unique(op, type, x, y, __UNIQUE_ID(x_), __UNIQUE_ID(y_))
9090

9191
#define __careful_cmp_once(op, x, y, ux, uy) ({ \
92-
__auto_type ux = (x); __auto_type uy = (y); \
92+
auto ux = (x); auto uy = (y); \
9393
BUILD_BUG_ON_MSG(!__types_ok(ux, uy), \
9494
#op"("#x", "#y") signedness error"); \
9595
__cmp(op, ux, uy); })
@@ -129,7 +129,7 @@
129129
__careful_cmp(max, (x) + 0u + 0ul + 0ull, (y) + 0u + 0ul + 0ull)
130130

131131
#define __careful_op3(op, x, y, z, ux, uy, uz) ({ \
132-
__auto_type ux = (x); __auto_type uy = (y);__auto_type uz = (z);\
132+
auto ux = (x); auto uy = (y); auto uz = (z); \
133133
BUILD_BUG_ON_MSG(!__types_ok3(ux, uy, uz), \
134134
#op"3("#x", "#y", "#z") signedness error"); \
135135
__cmp(op, ux, __cmp(op, uy, uz)); })
@@ -203,7 +203,7 @@
203203
* This macro checks @val/@lo/@hi to make sure they have compatible
204204
* signedness.
205205
*/
206-
#define clamp(val, lo, hi) __careful_clamp(__auto_type, val, lo, hi)
206+
#define clamp(val, lo, hi) __careful_clamp(auto, val, lo, hi)
207207

208208
/**
209209
* clamp_t - return a value clamped to a given range using a given type

0 commit comments

Comments
 (0)