[PATCH v2 4/7] arch/nios2: replace "__auto_type" and adjacent equivalent with "auto"

H. Peter Anvin posted 7 patches 2 months, 2 weeks ago
[PATCH v2 4/7] arch/nios2: replace "__auto_type" and adjacent equivalent with "auto"
Posted by H. Peter Anvin 2 months, 2 weeks ago
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 <torvalds@linux-foundation.org>
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
---
 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/uaccess.h
index b8299082adbe..6ccc9a232c23 100644
--- a/arch/nios2/include/asm/uaccess.h
+++ b/arch/nios2/include/asm/uaccess.h
@@ -172,15 +172,15 @@ do {									\
 
 #define __put_user(x, ptr)						\
 ({									\
-	__auto_type __pu_ptr = (ptr);					\
-	typeof(*__pu_ptr) __pu_val = (typeof(*__pu_ptr))(x);		\
+	auto __pu_ptr = (ptr);						\
+	auto __pu_val = (typeof(*__pu_ptr))(x);				\
 	__put_user_common(__pu_val, __pu_ptr);				\
 })
 
 #define put_user(x, ptr)						\
 ({									\
-	__auto_type __pu_ptr = (ptr);					\
-	typeof(*__pu_ptr) __pu_val = (typeof(*__pu_ptr))(x);		\
+	auto __pu_ptr = (ptr);						\
+	auto __pu_val = (typeof(*__pu_ptr))(x);				\
 	access_ok(__pu_ptr, sizeof(*__pu_ptr)) ?			\
 		__put_user_common(__pu_val, __pu_ptr) :			\
 		-EFAULT;						\
-- 
2.50.1
Re: [PATCH v2 4/7] arch/nios2: replace "__auto_type" and adjacent equivalent with "auto"
Posted by Dinh Nguyen 2 months, 2 weeks ago
On 7/20/25 01:50, H. Peter Anvin wrote:
> 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 <torvalds@linux-foundation.org>
> Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
> ---
>   arch/nios2/include/asm/uaccess.h | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
> 

Acked-by: Dinh Nguyen <dinguyen@kernel.org>