From nobody Mon Oct 6 15:18:15 2025 Received: from mail.zytor.com (terminus.zytor.com [198.137.202.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AAA101C2437; Sun, 20 Jul 2025 06:53:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.136 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752994385; cv=none; b=bvCxIWPEBRIbfKub72e/XNoXaP22bDC2Si1FaJ1o9ye+j9fcqFQgwlFfmidP/2MJK1zIyg8BStGgarJ9rW+yRiPTenH2fvCALgDuBUPJNkQn03yMRwJokg23rRHgZ3zIaSyBpVMs8Qyivl5eDkxaqi1zK2wlog25DzJo7xMwp38= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752994385; c=relaxed/simple; bh=+dM1bld6YqFuWFqTeVy2M0W6B7tgTC8OPQdbIxYR2qs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=U2IiYFpX82fGke3nE1OvNmiPLjbE0YC/yKB4f5jBncSTxojBXTAKKsMWh9vRnmle53FwaAG6I1a+wZC3skcjTHKXi7Er3RIAd8FFRMe4aJUhpBjNq+N7XYVGKfafgxkMB5A6GqXtTWw1jZlj56dzRNjNQFID+0NQLIn+TBW5qpI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com; spf=pass smtp.mailfrom=zytor.com; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b=ZyDBDKwJ; arc=none smtp.client-ip=198.137.202.136 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zytor.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b="ZyDBDKwJ" Received: from mail.zytor.com ([IPv6:2601:646:8081:9484:f04a:f27d:fd66:5c61]) (authenticated bits=0) by mail.zytor.com (8.18.1/8.17.1) with ESMTPSA id 56K6oq0Y3555973 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 19 Jul 2025 23:51:00 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 56K6oq0Y3555973 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2025062101; t=1752994264; bh=vsGxPzzTTwhbkBTwSIw4sMhUPUpWMkx20cB75uEuQgk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZyDBDKwJ82kVHavnoOkwuOs1qV0y87AnM33njIS0JfpbC5KvDYtNpaF7gvZsBf0xV nVSq1R9fnrUmhCTKA1CoMUmcFc+doBbPDDA2tHj5kZmv6IcbSb6ib2YcxjMKh28I7G rKiEuAN8wWXPJWzxX1uQQLcZNbkUQOx8WJ29nOD3QSVDNWfXIaXz4tpC24uIVuq9ej oEAS2eBXkRn8ZimKfJutIoG7rn5fnjmZW+taM70aqT6aBc7FcoKRYDmXHYBg3Q2ZDS sFYPEyqjn16JROYOoPEb6WPcYXBQxczMapwNEKfsf2l6PlSWVUKL7mw/otFBLJ38Ys R0BeVUxJwySsQ== From: "H. Peter Anvin" To: Cc: "H. Peter Anvin" , =?UTF-8?q?Eugenio=20P=C3=A9rez?= , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , "Michael S. Tsirkin" , Al Viro , Alexei Starovoitov , Alexey Dobriyan , Andrew Morton , Andrii Nakryiko , Arnd Bergmann , Borislav Petkov , Dan Williams , Daniel Borkmann , Dave Hansen , David Laight , David Lechner , Dinh Nguyen , Eduard Zingerman , Gatlin Newhouse , Hao Luo , Ingo Molnar , Linus Torvalds , Jakub Sitnicki , Jan Hendrik Farr , Jason Wang , Jiri Olsa , John Fastabend , Jonathan Cameron , Josh Poimboeuf , KP Singh , Kees Cook , Luc Van Oostenryck , Marc Herbert , Martin KaFai Lau , Mateusz Guzik , Michal Luczaj , Miguel Ojeda , Mykola Lysenko , NeilBrown , Peter Zijlstra , Przemek Kitszel , Sami Tolvanen , Shuah Khan , Song Liu , Stanislav Fomichev , Thomas Gleixner , Thorsten Blum , Uros Bizjak , Xuan Zhuo , Yafang Shao , Ye Bin , Yonghong Song , Yufeng Wang , bpf@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-sparse@vger.kernel.org, virtualization@lists.linux.dev, x86@kernel.org Subject: [PATCH v2 1/7] compiler_types.h: add "auto" as a macro for "__auto_type" Date: Sat, 19 Jul 2025 23:50:38 -0700 Message-ID: <20250720065045.2859105-2-hpa@zytor.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250720065045.2859105-1-hpa@zytor.com> References: <20250720065045.2859105-1-hpa@zytor.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" "auto" was defined as a keyword back in the K&R days, but as a storage type specifier. No one ever used it, since it was and is the default storage type for local variables. C++11 recycled the keyword to allow a type to be declared based on the type of an initializer. This was finally adopted into standard C in C23. gcc and clang provide the "__auto_type" alias keyword as an extension for pre-C23, however, there is no reason to pollute the bulk of the source base with this temporary keyword; instead define "auto" as a macro unless the compiler is running in C23+ mode. This macro is added in because that header is included in some of the tools headers, wheres is not as it has a bunch of very kernel-specific things in it. Signed-off-by: H. Peter Anvin (Intel) Acked-by: Miguel Ojeda --- include/linux/compiler_types.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h index 2b77d12e07b2..c8b1ee37934e 100644 --- a/include/linux/compiler_types.h +++ b/include/linux/compiler_types.h @@ -13,6 +13,19 @@ =20 #ifndef __ASSEMBLY__ =20 +/* + * C23 introduces "auto" as a standard way to define type-inferred + * variables, but "auto" has been a (useless) keyword even since K&R C, + * so it has always been "namespace reserved." + * + * Until at some future time we require C23 support, we need the gcc + * extension __auto_type, but there is no reason to put that elsewhere + * in the source code. + */ +#if __STDC_VERSION__ < 202311L +# define auto __auto_type +#endif + /* * Skipped when running bindgen due to a libclang issue; * see https://github.com/rust-lang/rust-bindgen/issues/2244. --=20 2.50.1 From nobody Mon Oct 6 15:18:15 2025 Received: from mail.zytor.com (terminus.zytor.com [198.137.202.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 99C581917ED; Sun, 20 Jul 2025 06:53:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.136 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752994385; cv=none; b=BVg2InmxzawkC/kdxPE642ANGK1Q9ZDUq8yybvfmODbXziTnsXSh7YilDJIRDoyBC8UV8ZVoHjPu7XpxxBK+gFF4tnorUewrBSB/mkoUQbEyzwgUOrK9Xfkown2iGc5IEIS827U5HgPJosiQiHjnbEGpd8FGTSv9ZTT3nVfmeFs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752994385; c=relaxed/simple; bh=QJYX1MFqg9BEnLun28Yp5CaUuKwFY/3raKGCnx2LRNk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uB5FZeze9saFzNd+LJsl+HFQN3Ef++0/xDEUpB2I0j2raVEQbogvYOZ9k3mEDDvSA/2tet6tGdEN7f+Q0dyCZOxPQKpX2WzcVsK2VVprHhtef0ArkNHrMTpNZliYoYz5mooOtPENvNeh07m1biVBu7P/+ux0g2K1/O85PeyHI7k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com; spf=pass smtp.mailfrom=zytor.com; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b=IyaoOebw; arc=none smtp.client-ip=198.137.202.136 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zytor.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b="IyaoOebw" Received: from mail.zytor.com ([IPv6:2601:646:8081:9484:f04a:f27d:fd66:5c61]) (authenticated bits=0) by mail.zytor.com (8.18.1/8.17.1) with ESMTPSA id 56K6oq0Z3555973 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 19 Jul 2025 23:51:04 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 56K6oq0Z3555973 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2025062101; t=1752994267; bh=ELa2jqTmRsp27qDcEQ9Wkl+L9BhxZJU1zyGapTBoOEw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IyaoOebwCvNMxsbv8ant0kY7MOMwXoHKo25+4RBG5+U3uhKvfmj5aVg2EaAOi2yxd alZKTjrWigRHG3wWOvHyRHl158c/jnUUc2kx+rfHgVF7ytc+keMlp1f6UJaPZWLhBS xYNPr1xvNLrPoZ7nihezY/kliWsi1cStyLblbAPF+seEOt4BrdHQUmAwW4NDYzWYSx ybSlFTvxXT8TbUWZg2OlgUDSXzSl3Yi/aJ7/q5zUQB78Dqns8DXZfDV6gON/faQHjH cUDK6QX//Mp+t1HPJui7r42qiQC2FJtW0me/gkCx100dbyZg5bJV7Be97Om3sakIm0 a1SG8Lt8KPPpw== From: "H. Peter Anvin" To: Cc: "H. Peter Anvin" , =?UTF-8?q?Eugenio=20P=C3=A9rez?= , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , "Michael S. Tsirkin" , Al Viro , Alexei Starovoitov , Alexey Dobriyan , Andrew Morton , Andrii Nakryiko , Arnd Bergmann , Borislav Petkov , Dan Williams , Daniel Borkmann , Dave Hansen , David Laight , David Lechner , Dinh Nguyen , Eduard Zingerman , Gatlin Newhouse , Hao Luo , Ingo Molnar , Linus Torvalds , Jakub Sitnicki , Jan Hendrik Farr , Jason Wang , Jiri Olsa , John Fastabend , Jonathan Cameron , Josh Poimboeuf , KP Singh , Kees Cook , Luc Van Oostenryck , Marc Herbert , Martin KaFai Lau , Mateusz Guzik , Michal Luczaj , Miguel Ojeda , Mykola Lysenko , NeilBrown , Peter Zijlstra , Przemek Kitszel , Sami Tolvanen , Shuah Khan , Song Liu , Stanislav Fomichev , Thomas Gleixner , Thorsten Blum , Uros Bizjak , Xuan Zhuo , Yafang Shao , Ye Bin , Yonghong Song , Yufeng Wang , bpf@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-sparse@vger.kernel.org, virtualization@lists.linux.dev, x86@kernel.org Subject: [PATCH v2 2/7] include/linux: change "__auto_type" to "auto" Date: Sat, 19 Jul 2025 23:50:39 -0700 Message-ID: <20250720065045.2859105-3-hpa@zytor.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250720065045.2859105-1-hpa@zytor.com> References: <20250720065045.2859105-1-hpa@zytor.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Replace instances of "__auto_type" with "auto" in include/linux. Signed-off-by: H. Peter Anvin (Intel) --- include/linux/cleanup.h | 6 +++--- include/linux/compiler.h | 2 +- include/linux/minmax.h | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/linux/cleanup.h b/include/linux/cleanup.h index 7093e1d08af0..c7f3031ae400 100644 --- a/include/linux/cleanup.h +++ b/include/linux/cleanup.h @@ -199,10 +199,10 @@ =20 #define __free(_name) __cleanup(__free_##_name) =20 -#define __get_and_null(p, nullvalue) \ +#define __get_and_null(p, nullvalue) \ ({ \ - __auto_type __ptr =3D &(p); \ - __auto_type __val =3D *__ptr; \ + auto __ptr =3D &(p); \ + auto __val =3D *__ptr; \ *__ptr =3D nullvalue; \ __val; \ }) diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 6f04a1d8c720..7fef5cd41dfc 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -186,7 +186,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f,= int val, #define data_race(expr) \ ({ \ __kcsan_disable_current(); \ - __auto_type __v =3D (expr); \ + auto __v =3D (expr); \ __kcsan_enable_current(); \ __v; \ }) 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_)) =20 #define __careful_cmp_once(op, x, y, ux, uy) ({ \ - __auto_type ux =3D (x); __auto_type uy =3D (y); \ + auto ux =3D (x); auto uy =3D (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) =20 #define __careful_op3(op, x, y, z, ux, uy, uz) ({ \ - __auto_type ux =3D (x); __auto_type uy =3D (y);__auto_type uz =3D (z);\ + auto ux =3D (x); auto uy =3D (y); auto uz =3D (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) =20 /** * clamp_t - return a value clamped to a given range using a given type --=20 2.50.1 From nobody Mon Oct 6 15:18:15 2025 Received: from mail.zytor.com (terminus.zytor.com [198.137.202.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2672717AE11; Sun, 20 Jul 2025 06:53:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.136 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752994385; cv=none; b=mmqGq600NLvlwCGSH9doDZnfad2Fvb23opW0HXmOOs2OTu9IRts+ygCpLYFMoIpGBAwGUh8td0QuIfgpwK+QNwmBSb2cuzlFBnlYXnlm+ElFpWwzugA7L2SLrWtd0Si14PAKCRY0MJkDzq3xeQnnZpxwQtrjo26hjNVGDuFXgOo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752994385; c=relaxed/simple; bh=fMOnU1vIlgsMCZglmwZ0ph96wItjQj2xjA0Cfh/E07w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nAEWdym53arz25mxehhN6pjHBHRXJ4kqQCTiewv80PNrfmBB67niLMveJ/tnjutaF5wlgfIhlgOMcPea6BJXDVc2phoqWA5vo1mXUWkJ7e1AIf8xlDBJqPxVR6LqWTllbUSVw8lGs7pi+JlXK9mqqQxAW/Yf6mMtKGKxsbzU58Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com; spf=pass smtp.mailfrom=zytor.com; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b=Q68R1ure; arc=none smtp.client-ip=198.137.202.136 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zytor.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b="Q68R1ure" Received: from mail.zytor.com ([IPv6:2601:646:8081:9484:f04a:f27d:fd66:5c61]) (authenticated bits=0) by mail.zytor.com (8.18.1/8.17.1) with ESMTPSA id 56K6oq0a3555973 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 19 Jul 2025 23:51:07 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 56K6oq0a3555973 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2025062101; t=1752994271; bh=i1EZz1OSt3xG8CoWOY7eDgddm0jsJfUpAwtxMUdpTU0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q68R1ure0GwuzF4YIqOSL83GEH/lWXB6KFfNBH0xpmFPSZukTpkm3VEj33YET0zis NkKHKcK9XpBx5SELo5EevjrEMnDlZ4h2Yds9RqEvVfP4kdxSTO4u16aKnRSMO6ElZT tMlgQ9gypvEKLNdKnuD66J6qoWjNyQrfHOiSCKAQIcIXING6Mf5YidmEINGqnGlJwi yBREITLC7W7A5HJNBM8N2TLew3bTlw+hrmYEKyJFMIbcwSsniSe75OOa0mmDxZU+3S yika893X8LfexsYEiA5FNVEco0u/ocDaroyJpB8dMMrjGUxXLu2tRURNbzp3yVlZAf sRjCmIt2TbmVw== From: "H. Peter Anvin" To: Cc: "H. Peter Anvin" , =?UTF-8?q?Eugenio=20P=C3=A9rez?= , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , "Michael S. Tsirkin" , Al Viro , Alexei Starovoitov , Alexey Dobriyan , Andrew Morton , Andrii Nakryiko , Arnd Bergmann , Borislav Petkov , Dan Williams , Daniel Borkmann , Dave Hansen , David Laight , David Lechner , Dinh Nguyen , Eduard Zingerman , Gatlin Newhouse , Hao Luo , Ingo Molnar , Linus Torvalds , Jakub Sitnicki , Jan Hendrik Farr , Jason Wang , Jiri Olsa , John Fastabend , Jonathan Cameron , Josh Poimboeuf , KP Singh , Kees Cook , Luc Van Oostenryck , Marc Herbert , Martin KaFai Lau , Mateusz Guzik , Michal Luczaj , Miguel Ojeda , Mykola Lysenko , NeilBrown , Peter Zijlstra , Przemek Kitszel , Sami Tolvanen , Shuah Khan , Song Liu , Stanislav Fomichev , Thomas Gleixner , Thorsten Blum , Uros Bizjak , Xuan Zhuo , Yafang Shao , Ye Bin , Yonghong Song , Yufeng Wang , bpf@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-sparse@vger.kernel.org, virtualization@lists.linux.dev, x86@kernel.org Subject: [PATCH v2 3/7] fs/proc: replace "__auto_type" with "const auto" Date: Sat, 19 Jul 2025 23:50:40 -0700 Message-ID: <20250720065045.2859105-4-hpa@zytor.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250720065045.2859105-1-hpa@zytor.com> References: <20250720065045.2859105-1-hpa@zytor.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Replace use of "__auto_type" in fs/proc/inode.c with "const auto". Suggested-by: Alexey Dobriyan Signed-off-by: H. Peter Anvin (Intel) Reviewed-by: Alexey Dobriyan --- fs/proc/inode.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/fs/proc/inode.c b/fs/proc/inode.c index 3604b616311c..1afa2dd2285b 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c @@ -303,7 +303,7 @@ static ssize_t proc_reg_read_iter(struct kiocb *iocb, s= truct iov_iter *iter) =20 static ssize_t pde_read(struct proc_dir_entry *pde, struct file *file, cha= r __user *buf, size_t count, loff_t *ppos) { - __auto_type read =3D pde->proc_ops->proc_read; + const auto read =3D pde->proc_ops->proc_read; if (read) return read(file, buf, count, ppos); return -EIO; @@ -325,7 +325,7 @@ static ssize_t proc_reg_read(struct file *file, char __= user *buf, size_t count, =20 static ssize_t pde_write(struct proc_dir_entry *pde, struct file *file, co= nst char __user *buf, size_t count, loff_t *ppos) { - __auto_type write =3D pde->proc_ops->proc_write; + auto write =3D pde->proc_ops->proc_write; if (write) return write(file, buf, count, ppos); return -EIO; @@ -347,7 +347,7 @@ static ssize_t proc_reg_write(struct file *file, const = char __user *buf, size_t =20 static __poll_t pde_poll(struct proc_dir_entry *pde, struct file *file, st= ruct poll_table_struct *pts) { - __auto_type poll =3D pde->proc_ops->proc_poll; + auto poll =3D pde->proc_ops->proc_poll; if (poll) return poll(file, pts); return DEFAULT_POLLMASK; @@ -369,7 +369,7 @@ static __poll_t proc_reg_poll(struct file *file, struct= poll_table_struct *pts) =20 static long pde_ioctl(struct proc_dir_entry *pde, struct file *file, unsig= ned int cmd, unsigned long arg) { - __auto_type ioctl =3D pde->proc_ops->proc_ioctl; + auto ioctl =3D pde->proc_ops->proc_ioctl; if (ioctl) return ioctl(file, cmd, arg); return -ENOTTY; @@ -392,7 +392,7 @@ static long proc_reg_unlocked_ioctl(struct file *file, = unsigned int cmd, unsigne #ifdef CONFIG_COMPAT static long pde_compat_ioctl(struct proc_dir_entry *pde, struct file *file= , unsigned int cmd, unsigned long arg) { - __auto_type compat_ioctl =3D pde->proc_ops->proc_compat_ioctl; + auto compat_ioctl =3D pde->proc_ops->proc_compat_ioctl; if (compat_ioctl) return compat_ioctl(file, cmd, arg); return -ENOTTY; @@ -414,7 +414,7 @@ static long proc_reg_compat_ioctl(struct file *file, un= signed int cmd, unsigned =20 static int pde_mmap(struct proc_dir_entry *pde, struct file *file, struct = vm_area_struct *vma) { - __auto_type mmap =3D pde->proc_ops->proc_mmap; + auto mmap =3D pde->proc_ops->proc_mmap; if (mmap) return mmap(file, vma); return -EIO; @@ -497,7 +497,7 @@ static int proc_reg_open(struct inode *inode, struct fi= le *file) if (!use_pde(pde)) return -ENOENT; =20 - __auto_type release =3D pde->proc_ops->proc_release; + auto release =3D pde->proc_ops->proc_release; if (release) { pdeo =3D kmem_cache_alloc(pde_opener_cache, GFP_KERNEL); if (!pdeo) { @@ -534,7 +534,7 @@ static int proc_reg_release(struct inode *inode, struct= file *file) struct pde_opener *pdeo; =20 if (pde_is_permanent(pde)) { - __auto_type release =3D pde->proc_ops->proc_release; + auto release =3D pde->proc_ops->proc_release; if (release) { return release(inode, file); } --=20 2.50.1 From nobody Mon Oct 6 15:18:15 2025 Received: from mail.zytor.com (terminus.zytor.com [198.137.202.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 67E09273FD; Sun, 20 Jul 2025 06:53:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.136 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752994384; cv=none; b=eqr6/v0dk8NQCwiWRb2ekx0OuUTJ/cjr0e6NZ1sePg/EsM10EDVsdJd8YNVfwdm7AcqCGPJgrUCzm91wOAAsk/rNB73Noge8iQ693YW1EgEjENU92WmW/parUunciOAnlW4AjkVoh12khbMmQJHGwAVUfuQWTTpbTm+lwyeGAKY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752994384; c=relaxed/simple; bh=LsNKexgn6BXks9XAt1SRbHnNEwPRhDi/Uja4dX8cv2o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KDFRrub2P+Svp6YaQWM5W0AmOUoRlRRlIzo9O6civT8N4JpfimONeA/+bkBLLsClMQE8bnqF5QXESZefeEuEVg+Y5k0e1rPt78ZfS8LeUwBItvpJ4ucYB6DFSRzC/ID8r9k/n8ZleNv+amd2uDPwhXmKJXc8Wffd8vbpWg7PJkU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com; spf=pass smtp.mailfrom=zytor.com; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b=bfT8wB4N; arc=none smtp.client-ip=198.137.202.136 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zytor.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b="bfT8wB4N" Received: from mail.zytor.com ([IPv6:2601:646:8081:9484:f04a:f27d:fd66:5c61]) (authenticated bits=0) by mail.zytor.com (8.18.1/8.17.1) with ESMTPSA id 56K6oq0b3555973 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 19 Jul 2025 23:51:11 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 56K6oq0b3555973 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2025062101; t=1752994275; bh=WjknFaojsifwlKw0WpmL9PxEqgNG67NL4pP5k1y5h+E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bfT8wB4NnCNiFno5TmtLgXp0LHSfcSGYno/ulj/mwTg2eV/U0U5mXDDLkhxIzDOWu Yn//5eN6IgvkaZZDalhvPMYwur4x5RPsQ7ukQRJcrbbrK5lkTRFRTsAEs0YAqnTsPG KVJoTRtRhgCnSRb34YM7GgdSHICF6a09oJQVKyQLhuvVtLgvE2/1xBl/RDnYXBAkev Qo0cU9LsowrnxbikFqwbodWZTVIg3zcTvssyJbemvXwN/BWEB4DW/lxarrXqkESIdP s/enNrRqYcsNdynt5gF54xwhvSV3wuw+Zb75z4P8GR2cdk44p6eOJhauAxKrWxCXLp wi9VYu2Mnq6Fg== From: "H. Peter Anvin" To: Cc: "H. Peter Anvin" , =?UTF-8?q?Eugenio=20P=C3=A9rez?= , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , "Michael S. Tsirkin" , Al Viro , Alexei Starovoitov , Alexey Dobriyan , Andrew Morton , Andrii Nakryiko , Arnd Bergmann , Borislav Petkov , Dan Williams , Daniel Borkmann , Dave Hansen , David Laight , David Lechner , Dinh Nguyen , Eduard Zingerman , Gatlin Newhouse , Hao Luo , Ingo Molnar , Linus Torvalds , Jakub Sitnicki , Jan Hendrik Farr , Jason Wang , Jiri Olsa , John Fastabend , Jonathan Cameron , Josh Poimboeuf , KP Singh , Kees Cook , Luc Van Oostenryck , Marc Herbert , Martin KaFai Lau , Mateusz Guzik , Michal Luczaj , Miguel Ojeda , Mykola Lysenko , NeilBrown , Peter Zijlstra , Przemek Kitszel , Sami Tolvanen , Shuah Khan , Song Liu , Stanislav Fomichev , Thomas Gleixner , Thorsten Blum , Uros Bizjak , Xuan Zhuo , Yafang Shao , Ye Bin , Yonghong Song , Yufeng Wang , bpf@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-sparse@vger.kernel.org, virtualization@lists.linux.dev, x86@kernel.org Subject: [PATCH v2 4/7] arch/nios2: replace "__auto_type" and adjacent equivalent with "auto" Date: Sat, 19 Jul 2025 23:50:41 -0700 Message-ID: <20250720065045.2859105-5-hpa@zytor.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250720065045.2859105-1-hpa@zytor.com> References: <20250720065045.2859105-1-hpa@zytor.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Replace uses of "__auto_type" in arch/nios2/include/asm/uaccess.h with "auto", and equivalently convert an adjacent cast to the analogous form. Suggested-by: Linus Torvalds Signed-off-by: H. Peter Anvin (Intel) Acked-by: Dinh Nguyen --- arch/nios2/include/asm/uaccess.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/nios2/include/asm/uaccess.h b/arch/nios2/include/asm/uacc= ess.h index b8299082adbe..6ccc9a232c23 100644 --- a/arch/nios2/include/asm/uaccess.h +++ b/arch/nios2/include/asm/uaccess.h @@ -172,15 +172,15 @@ do { \ =20 #define __put_user(x, ptr) \ ({ \ - __auto_type __pu_ptr =3D (ptr); \ - typeof(*__pu_ptr) __pu_val =3D (typeof(*__pu_ptr))(x); \ + auto __pu_ptr =3D (ptr); \ + auto __pu_val =3D (typeof(*__pu_ptr))(x); \ __put_user_common(__pu_val, __pu_ptr); \ }) =20 #define put_user(x, ptr) \ ({ \ - __auto_type __pu_ptr =3D (ptr); \ - typeof(*__pu_ptr) __pu_val =3D (typeof(*__pu_ptr))(x); \ + auto __pu_ptr =3D (ptr); \ + auto __pu_val =3D (typeof(*__pu_ptr))(x); \ access_ok(__pu_ptr, sizeof(*__pu_ptr)) ? \ __put_user_common(__pu_val, __pu_ptr) : \ -EFAULT; \ --=20 2.50.1 From nobody Mon Oct 6 15:18:15 2025 Received: from mail.zytor.com (terminus.zytor.com [198.137.202.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 49EF11D5ACE; Sun, 20 Jul 2025 06:53:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.136 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752994387; cv=none; b=LXww5cRQlpUZj9qO4UT3HkUUJV9CIrqiIzP4NNTBk+SQEENs5Krfw6B1L4/oWHiuFXmY1eNUAuCGchSuHUR9OULTgwp6AU1kuj43a9AaseuYWT9sn3j+RA4Npr5FeE8EpRpe65l4O4hft2yWyY1LnvRL05/wKfH/IK/cTAM0mv4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752994387; c=relaxed/simple; bh=9B/wZBYPyvWNFbB8mrngMegZ+e9l8dZ1E6sWkULHdTM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YKUb4h2NcU+Unxq2WuS3ouhX+LC+poyC8ZvSSciMTBFskIjGHbmmBdu0D2uXlLtnrms/I5YxSkhgZW5IhnBzyy8keUk8VLY8GNn7mdvSRJtApkrZ2TtWFru4cqz3VuY2QqN4hFPWt1jjByoxstodABOnr/mJqeGLzgTeNTcw+KM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com; spf=pass smtp.mailfrom=zytor.com; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b=Ry7MIVIx; arc=none smtp.client-ip=198.137.202.136 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zytor.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b="Ry7MIVIx" Received: from mail.zytor.com ([IPv6:2601:646:8081:9484:f04a:f27d:fd66:5c61]) (authenticated bits=0) by mail.zytor.com (8.18.1/8.17.1) with ESMTPSA id 56K6oq0c3555973 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 19 Jul 2025 23:51:15 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 56K6oq0c3555973 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2025062101; t=1752994278; bh=V2V/3vlTdgN2wHrrKIvEmPjf5zfLF1VkrRaHOul8IRg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ry7MIVIxeKq+bj1PugdLx+b8KBvlRo2m387QkOsip2r+oO1aleuLsDvEAwrWBPWCl OdvIjWMaHy3VUCBee13XBWTDHBNQk9UpWZRS+ds/TcUJBLkE6B9GLHulITRZXpgXaa 0O7dvDWhugfiJMB1TBSBzQkpCnWO4oiAR9RSYf1gTh3OMPlvqPimJRYFZTPNNHrXQ3 8+a1A0iEhQj6vsucmJxNflT/DTHC3PMVnaVKmRBxFUc93sNR1C7B7RJ9XVpqx8I/W/ juEN8cuZkNcgwyw0gwqoEozoqnQOX8hagcQTGejl2AhZGO3ngUumGLDSdsZEz3zInc OTV6hW0uZGYJQ== From: "H. Peter Anvin" To: Cc: "H. Peter Anvin" , =?UTF-8?q?Eugenio=20P=C3=A9rez?= , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , "Michael S. Tsirkin" , Al Viro , Alexei Starovoitov , Alexey Dobriyan , Andrew Morton , Andrii Nakryiko , Arnd Bergmann , Borislav Petkov , Dan Williams , Daniel Borkmann , Dave Hansen , David Laight , David Lechner , Dinh Nguyen , Eduard Zingerman , Gatlin Newhouse , Hao Luo , Ingo Molnar , Linus Torvalds , Jakub Sitnicki , Jan Hendrik Farr , Jason Wang , Jiri Olsa , John Fastabend , Jonathan Cameron , Josh Poimboeuf , KP Singh , Kees Cook , Luc Van Oostenryck , Marc Herbert , Martin KaFai Lau , Mateusz Guzik , Michal Luczaj , Miguel Ojeda , Mykola Lysenko , NeilBrown , Peter Zijlstra , Przemek Kitszel , Sami Tolvanen , Shuah Khan , Song Liu , Stanislav Fomichev , Thomas Gleixner , Thorsten Blum , Uros Bizjak , Xuan Zhuo , Yafang Shao , Ye Bin , Yonghong Song , Yufeng Wang , bpf@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-sparse@vger.kernel.org, virtualization@lists.linux.dev, x86@kernel.org Subject: [PATCH v2 5/7] arch/x86: replace "__auto_type" with "auto" Date: Sat, 19 Jul 2025 23:50:42 -0700 Message-ID: <20250720065045.2859105-6-hpa@zytor.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250720065045.2859105-1-hpa@zytor.com> References: <20250720065045.2859105-1-hpa@zytor.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Replace instances of "__auto_type" with "auto" in: arch/x86/include/asm/bug.h arch/x86/include/asm/string_64.h arch/x86/include/asm/uaccess_64.h Signed-off-by: H. Peter Anvin (Intel) --- arch/x86/include/asm/bug.h | 2 +- arch/x86/include/asm/string_64.h | 6 +++--- arch/x86/include/asm/uaccess_64.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/x86/include/asm/bug.h b/arch/x86/include/asm/bug.h index f0e9acf72547..05e166faf9a6 100644 --- a/arch/x86/include/asm/bug.h +++ b/arch/x86/include/asm/bug.h @@ -94,7 +94,7 @@ do { \ */ #define __WARN_FLAGS(flags) \ do { \ - __auto_type __flags =3D BUGFLAG_WARNING|(flags); \ + auto __flags =3D BUGFLAG_WARNING|(flags); \ instrumentation_begin(); \ _BUG_FLAGS(ASM_UD2, __flags, ANNOTATE_REACHABLE(1b)); \ instrumentation_end(); \ diff --git a/arch/x86/include/asm/string_64.h b/arch/x86/include/asm/string= _64.h index 79e9695dc13e..4635616863f5 100644 --- a/arch/x86/include/asm/string_64.h +++ b/arch/x86/include/asm/string_64.h @@ -31,7 +31,7 @@ KCFI_REFERENCE(__memset); #define __HAVE_ARCH_MEMSET16 static inline void *memset16(uint16_t *s, uint16_t v, size_t n) { - const __auto_type s0 =3D s; + const auto s0 =3D s; asm volatile ( "rep stosw" : "+D" (s), "+c" (n) @@ -44,7 +44,7 @@ static inline void *memset16(uint16_t *s, uint16_t v, siz= e_t n) #define __HAVE_ARCH_MEMSET32 static inline void *memset32(uint32_t *s, uint32_t v, size_t n) { - const __auto_type s0 =3D s; + const auto s0 =3D s; asm volatile ( "rep stosl" : "+D" (s), "+c" (n) @@ -57,7 +57,7 @@ static inline void *memset32(uint32_t *s, uint32_t v, siz= e_t n) #define __HAVE_ARCH_MEMSET64 static inline void *memset64(uint64_t *s, uint64_t v, size_t n) { - const __auto_type s0 =3D s; + const auto s0 =3D s; asm volatile ( "rep stosq" : "+D" (s), "+c" (n) diff --git a/arch/x86/include/asm/uaccess_64.h b/arch/x86/include/asm/uacce= ss_64.h index c8a5ae35c871..b0e4533ce625 100644 --- a/arch/x86/include/asm/uaccess_64.h +++ b/arch/x86/include/asm/uaccess_64.h @@ -72,7 +72,7 @@ static inline void __user *mask_user_address(const void _= _user *ptr) return ret; } #define masked_user_access_begin(x) ({ \ - __auto_type __masked_ptr =3D (x); \ + auto __masked_ptr =3D (x); \ __masked_ptr =3D mask_user_address(__masked_ptr); \ __uaccess_begin(); __masked_ptr; }) =20 --=20 2.50.1 From nobody Mon Oct 6 15:18:15 2025 Received: from mail.zytor.com (terminus.zytor.com [198.137.202.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EA782192598; Sun, 20 Jul 2025 06:53:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.136 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752994385; cv=none; b=TiDwVodWW3p0Fl6iRXzht0zKBhboneZD1F2vWfcxhjntJIKZR2Loh0oCk/DPLSDGayk1mXTHHk5YGigfnKTKzVeM3ExP5yMpiBjhkGJuvWgkZULocSKLgXVn5Z/KmBA0E1cFO+Nyj0ERLX0h5The4olhL2japaYO1RapWrGj3ho= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752994385; c=relaxed/simple; bh=xSzAA2gv0ibDrNTKlxM9ctRGuuU7YJyBmHWCcxfeOeY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=idHZ9p3Zi2IxzyFDjPayt2ahbEW97cuMhER+nPCLq3neSGHSBxwqUxiBxhQxzbqdnC2anO3Xa06QTTjIm39+HBQpYw3RQfGER2/vEsZUrwEagf8K8Zolkfh8WIBS3Vr8FSDAAha2jb2t3FEdpEMjiEq6XS6cFuCCL4MSsyRu+Ts= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com; spf=pass smtp.mailfrom=zytor.com; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b=WbPJ5jDG; arc=none smtp.client-ip=198.137.202.136 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zytor.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b="WbPJ5jDG" Received: from mail.zytor.com ([IPv6:2601:646:8081:9484:f04a:f27d:fd66:5c61]) (authenticated bits=0) by mail.zytor.com (8.18.1/8.17.1) with ESMTPSA id 56K6oq0d3555973 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 19 Jul 2025 23:51:18 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 56K6oq0d3555973 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2025062101; t=1752994282; bh=D2ugkTWHSXT0lgY/l81pjC122eFLTRxMlbXL6ZHS8/U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WbPJ5jDG6RivnIGPGdH7tAxTfD9XHzmh0bmqjk3F973Xb5FIbCaOvDyDyN0WiLW+c tAy5g/9v8RqOIbjCNSInPta52bvotaWD5hPRM2K4tYGULsfe821h/r4HdujoW8rdGn 9EFmbltCfQLyLdRDItbhgPJ53ZPZCGhW9HCQnawRm07kUSSfwL45JVPL9XpFRKMy2D 2hEyzbhiOW+lCYQ3FyZ2P2GRpqPNw/1YfkCVJZKyzBpSVwn52GICIvNqCBCCqxkzGf FrZ/9vdEL1jhvq2l9eNoQhYhFkql9Vhx4htZWEqN/Ersst18Dlw9Y8kG++tO6qOW3y MmwLHD5lW3ing== From: "H. Peter Anvin" To: Cc: "H. Peter Anvin" , =?UTF-8?q?Eugenio=20P=C3=A9rez?= , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , "Michael S. Tsirkin" , Al Viro , Alexei Starovoitov , Alexey Dobriyan , Andrew Morton , Andrii Nakryiko , Arnd Bergmann , Borislav Petkov , Dan Williams , Daniel Borkmann , Dave Hansen , David Laight , David Lechner , Dinh Nguyen , Eduard Zingerman , Gatlin Newhouse , Hao Luo , Ingo Molnar , Linus Torvalds , Jakub Sitnicki , Jan Hendrik Farr , Jason Wang , Jiri Olsa , John Fastabend , Jonathan Cameron , Josh Poimboeuf , KP Singh , Kees Cook , Luc Van Oostenryck , Marc Herbert , Martin KaFai Lau , Mateusz Guzik , Michal Luczaj , Miguel Ojeda , Mykola Lysenko , NeilBrown , Peter Zijlstra , Przemek Kitszel , Sami Tolvanen , Shuah Khan , Song Liu , Stanislav Fomichev , Thomas Gleixner , Thorsten Blum , Uros Bizjak , Xuan Zhuo , Yafang Shao , Ye Bin , Yonghong Song , Yufeng Wang , bpf@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-sparse@vger.kernel.org, virtualization@lists.linux.dev, x86@kernel.org Subject: [PATCH v2 6/7] selftests/bpf: replace "__auto_type" with "auto" Date: Sat, 19 Jul 2025 23:50:43 -0700 Message-ID: <20250720065045.2859105-7-hpa@zytor.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250720065045.2859105-1-hpa@zytor.com> References: <20250720065045.2859105-1-hpa@zytor.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Replace instances of "__auto_type" with "auto" in: tools/testing/selftests/bpf/prog_tests/socket_helpers.h This file does not seem to be including directly or indirectly, so copy the definition but guard it with !defined(auto). Signed-off-by: H. Peter Anvin (Intel) Acked-by: Eduard Zingerman --- tools/testing/selftests/bpf/prog_tests/socket_helpers.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/bpf/prog_tests/socket_helpers.h b/tool= s/testing/selftests/bpf/prog_tests/socket_helpers.h index e02cabcc814e..0d59503a0c73 100644 --- a/tools/testing/selftests/bpf/prog_tests/socket_helpers.h +++ b/tools/testing/selftests/bpf/prog_tests/socket_helpers.h @@ -17,11 +17,16 @@ #define VMADDR_CID_LOCAL 1 #endif =20 +/* include/linux/compiler_types.h */ +#if __STDC_VERSION__ < 202311L && !defined(auto) +# define auto __auto_type +#endif + /* include/linux/cleanup.h */ #define __get_and_null(p, nullvalue) = \ ({ \ - __auto_type __ptr =3D &(p); \ - __auto_type __val =3D *__ptr; \ + auto __ptr =3D &(p); \ + auto __val =3D *__ptr; \ *__ptr =3D nullvalue; \ __val; \ }) --=20 2.50.1 From nobody Mon Oct 6 15:18:15 2025 Received: from mail.zytor.com (terminus.zytor.com [198.137.202.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 267841C5F35; Sun, 20 Jul 2025 06:53:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.136 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752994385; cv=none; b=bC0b6dWJW4EaxQ5v7IFgCXGtFzYZNCj+fdNKD5veRQCs4GUmkPxSTZZKmzU6BOnm27SI10Op+WJFcIebQqoxfX79LQy6xWxgKtsJBUio9WFriutBJ/awEf2o/b1HOQ0OYBia9EeE5ZTyNCzSHSuycFmKxXGCFTRmkO3/+QStkqI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752994385; c=relaxed/simple; bh=hbvAwknEuBZZy8wzM2rrw6C9ssd7Qd2r3sI2ZSM6FRc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=trJB/hn/P4lKOwfCeqgY5yOW9X16sIiZMFQacTkNco1Brfg+pHPMAUcwMSV7JpnmzP6AJo2JPtYZjgWiBG1IW2kQFnIyPMLDgkziKg1NYo94p+x5DiuRZ5uJcMpuLlO76x7l/Xb79UjX9zs7HCh0kBFy10SJV5fJbWNxc5KKwvI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com; spf=pass smtp.mailfrom=zytor.com; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b=FktW2hKM; arc=none smtp.client-ip=198.137.202.136 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zytor.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b="FktW2hKM" Received: from mail.zytor.com ([IPv6:2601:646:8081:9484:f04a:f27d:fd66:5c61]) (authenticated bits=0) by mail.zytor.com (8.18.1/8.17.1) with ESMTPSA id 56K6oq0e3555973 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 19 Jul 2025 23:51:22 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 56K6oq0e3555973 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2025062101; t=1752994285; bh=is1xGlkfyHt70hEGiHhmNMzkwdIVhZyUiA44BEc8nvs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FktW2hKMjcrEahQ4BX+tnQYpnVrlQ0KHypZy5Z6dQU+OtvbravrDm40vu8FXR4g8H xbCM/ysi7vqQh6gNwfRz4t52FBII1ke1vd0E83TOBa6FeyoVzvi4tuqeEbYhDHfsUq tKZC4cywsDIyDVp8aHVNxDfNeooea1dYznAMQh8tZvGy1q1JAJCGRPVLWK7bYXu3Cl 19V6FZZCYpobZ4DD5XRnnV+JrEendA569OUpmtttbVpcCaqaelNI6vdaSzVH08LDUM snW6ecw1wTrRCUnkpjzR8rw5F7Cf4oQToZgwDTuMRprULu9l1rp9zgbU46IPbH4Nim lXHN2zQagbwqg== From: "H. Peter Anvin" To: Cc: "H. Peter Anvin" , =?UTF-8?q?Eugenio=20P=C3=A9rez?= , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , "Michael S. Tsirkin" , Al Viro , Alexei Starovoitov , Alexey Dobriyan , Andrew Morton , Andrii Nakryiko , Arnd Bergmann , Borislav Petkov , Dan Williams , Daniel Borkmann , Dave Hansen , David Laight , David Lechner , Dinh Nguyen , Eduard Zingerman , Gatlin Newhouse , Hao Luo , Ingo Molnar , Linus Torvalds , Jakub Sitnicki , Jan Hendrik Farr , Jason Wang , Jiri Olsa , John Fastabend , Jonathan Cameron , Josh Poimboeuf , KP Singh , Kees Cook , Luc Van Oostenryck , Marc Herbert , Martin KaFai Lau , Mateusz Guzik , Michal Luczaj , Miguel Ojeda , Mykola Lysenko , NeilBrown , Peter Zijlstra , Przemek Kitszel , Sami Tolvanen , Shuah Khan , Song Liu , Stanislav Fomichev , Thomas Gleixner , Thorsten Blum , Uros Bizjak , Xuan Zhuo , Yafang Shao , Ye Bin , Yonghong Song , Yufeng Wang , bpf@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-sparse@vger.kernel.org, virtualization@lists.linux.dev, x86@kernel.org Subject: [PATCH v2 7/7] tools/virtio: replace "__auto_type" with "auto" Date: Sat, 19 Jul 2025 23:50:44 -0700 Message-ID: <20250720065045.2859105-8-hpa@zytor.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250720065045.2859105-1-hpa@zytor.com> References: <20250720065045.2859105-1-hpa@zytor.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Replace one instance of "__auto_type" with "auto" in: tools/virtio/linux/compiler.h This file *does* include directly, so there is no need to duplicate the definition. Signed-off-by: H. Peter Anvin (Intel) --- tools/virtio/linux/compiler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virtio/linux/compiler.h b/tools/virtio/linux/compiler.h index 204ef0e9f542..725b93bfeee1 100644 --- a/tools/virtio/linux/compiler.h +++ b/tools/virtio/linux/compiler.h @@ -31,7 +31,7 @@ */ #define data_race(expr) \ ({ \ - __auto_type __v =3D (expr); \ + auto __v =3D (expr); \ __v; \ }) =20 --=20 2.50.1