]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
linux/bitfield.h: replace __auto_type with auto
authorH. Peter Anvin <hpa@zytor.com>
Wed, 17 Dec 2025 01:21:53 +0000 (17:21 -0800)
committerYury Norov (NVIDIA) <yury.norov@gmail.com>
Tue, 6 Jan 2026 17:14:10 +0000 (12:14 -0500)
Replace "__auto_type" as described in commit:

2fb6915fa22d compiler_types.h: add "auto" as a macro for "__auto_type"

[Yury: keep inclusions alphabetically ordered]

Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> (reviewer:BITMAP API)
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
include/linux/bitfield.h

index 126dc5b380afacdfc8ebabf3f9eaeadf56e91c3a..54aeeef1f0ec7d14386cd8a69100b90797c21c8f 100644 (file)
@@ -8,6 +8,7 @@
 #define _LINUX_BITFIELD_H
 
 #include <linux/build_bug.h>
+#include <linux/compiler.h>
 #include <linux/typecheck.h>
 #include <asm/byteorder.h>
 
@@ -243,7 +244,7 @@ __MAKE_OP(64)
 
 #define __field_prep(mask, val)                                                \
        ({                                                              \
-               __auto_type __mask = (mask);                            \
+               auto __mask = (mask);                                   \
                typeof(__mask) __val = (val);                           \
                unsigned int __shift = BITS_PER_TYPE(__mask) <= 32 ?    \
                                       __ffs(__mask) : __ffs64(__mask); \
@@ -252,7 +253,7 @@ __MAKE_OP(64)
 
 #define __field_get(mask, reg)                                         \
        ({                                                              \
-               __auto_type __mask = (mask);                            \
+               auto __mask = (mask);                                   \
                typeof(__mask) __reg =  (reg);                          \
                unsigned int __shift = BITS_PER_TYPE(__mask) <= 32 ?    \
                                       __ffs(__mask) : __ffs64(__mask); \