Re: [PATCH] include/linux: replace remaining __auto_type with auto
From: Marco Elver
Date: Mon Aug 17 2026 - 12:05:14 EST
On Mon, 17 Aug 2026 at 10:11, Zhan Xusheng <zhanxusheng1024@xxxxxxxxx> wrote:
>
> From: Zhan Xusheng <zhanxusheng1024@xxxxxxxxx>
>
> From: Zhan Xusheng <zhanxusheng@xxxxxxxxxx>
>
> Replace "__auto_type" as described in commit:
>
> 2fb6915fa22d compiler_types.h: add "auto" as a macro for "__auto_type"
>
> srcu.h and compiler-context-analysis.h gained new users shortly after the
> last sweep. With these, __auto_type under include/ is left only in the
> definition itself and the comment above it.
>
> Signed-off-by: Zhan Xusheng <zhanxusheng@xxxxxxxxxx>
Acked-by: Marco Elver <elver@xxxxxxxxxx>
> ---
> include/linux/compiler-context-analysis.h | 4 ++--
> include/linux/srcu.h | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/compiler-context-analysis.h b/include/linux/compiler-context-analysis.h
> index 8302ebc2ea8c..ba6f5bd4b745 100644
> --- a/include/linux/compiler-context-analysis.h
> +++ b/include/linux/compiler-context-analysis.h
> @@ -447,7 +447,7 @@ static inline void _context_unsafe_alias(void **p) { }
> */
> #define __acquire_ret(call, ret_expr) \
> ({ \
> - __auto_type __ret = call; \
> + auto __ret = call; \
> __acquire(ret_expr); \
> __ret; \
> })
> @@ -459,7 +459,7 @@ static inline void _context_unsafe_alias(void **p) { }
> */
> #define __acquire_shared_ret(call, ret_expr) \
> ({ \
> - __auto_type __ret = call; \
> + auto __ret = call; \
> __acquire_shared(ret_expr); \
> __ret; \
> })
> diff --git a/include/linux/srcu.h b/include/linux/srcu.h
> index a54ce9e808b9..0275832d2004 100644
> --- a/include/linux/srcu.h
> +++ b/include/linux/srcu.h
> @@ -237,7 +237,7 @@ static inline void __srcu_read_lock_must_hold(const struct srcu_struct *ssp) __m
> ({ \
> __srcu_read_lock_must_hold(ssp); \
> __acquire_shared_ctx_lock(RCU); \
> - __auto_type __v = __rcu_dereference_check((p), __UNIQUE_ID(rcu), \
> + auto __v = __rcu_dereference_check((p), __UNIQUE_ID(rcu), \
> (c) || srcu_read_lock_held(ssp), __rcu); \
> __release_shared_ctx_lock(RCU); \
> __v; \
> --
> 2.43.0
>