From: "H. Peter Anvin" <hpa@zytor.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
"H. Peter Anvin" <hpa@zytor.com>,
Yury Norov <yury.norov@gmail.com>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>
Subject: [PATCH v2 1/1] linux/bitfield.h: replace __auto_type with auto
Date: Tue, 16 Dec 2025 17:21:53 -0800 [thread overview]
Message-ID: <20251217012153.1628723-1-hpa@zytor.com> (raw)
In-Reply-To: <aUHKrztKHyxsQM-M@yury>
Replace "__auto_type" as described in commit:
2fb6915fa22d compiler_types.h: add "auto" as a macro for "__auto_type"
[ v2: add an explicit #include <linux/compiler.h> to this header ]
Cc: Yury Norov <yury.norov@gmail.com> (maintainer:BITMAP API)
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> (reviewer:BITMAP API)
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
---
include/linux/bitfield.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/linux/bitfield.h b/include/linux/bitfield.h
index 126dc5b380af..7c3fff2437d4 100644
--- a/include/linux/bitfield.h
+++ b/include/linux/bitfield.h
@@ -7,6 +7,7 @@
#ifndef _LINUX_BITFIELD_H
#define _LINUX_BITFIELD_H
+#include <linux/compiler.h>
#include <linux/build_bug.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); \
--
2.52.0
prev parent reply other threads:[~2025-12-17 1:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-16 20:52 [PATCH " H. Peter Anvin
2025-12-16 21:10 ` Yury Norov
2025-12-17 1:21 ` H. Peter Anvin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251217012153.1628723-1-hpa@zytor.com \
--to=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=torvalds@linux-foundation.org \
--cc=yury.norov@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®