Skip to content

Commit fa188ed

Browse files
H. Peter AnvinYuryNorov
authored andcommitted
linux/bitfield.h: replace __auto_type with auto
Replace "__auto_type" as described in commit: 2fb6915 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>
1 parent 3609fa9 commit fa188ed

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

include/linux/bitfield.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#define _LINUX_BITFIELD_H
99

1010
#include <linux/build_bug.h>
11+
#include <linux/compiler.h>
1112
#include <linux/typecheck.h>
1213
#include <asm/byteorder.h>
1314

@@ -243,7 +244,7 @@ __MAKE_OP(64)
243244

244245
#define __field_prep(mask, val) \
245246
({ \
246-
__auto_type __mask = (mask); \
247+
auto __mask = (mask); \
247248
typeof(__mask) __val = (val); \
248249
unsigned int __shift = BITS_PER_TYPE(__mask) <= 32 ? \
249250
__ffs(__mask) : __ffs64(__mask); \
@@ -252,7 +253,7 @@ __MAKE_OP(64)
252253

253254
#define __field_get(mask, reg) \
254255
({ \
255-
__auto_type __mask = (mask); \
256+
auto __mask = (mask); \
256257
typeof(__mask) __reg = (reg); \
257258
unsigned int __shift = BITS_PER_TYPE(__mask) <= 32 ? \
258259
__ffs(__mask) : __ffs64(__mask); \

0 commit comments

Comments
 (0)