[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251025164023.308884-19-yury.norov@gmail.com>
Date: Sat, 25 Oct 2025 12:40:17 -0400
From: "Yury Norov (NVIDIA)" <yury.norov@...il.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>,
Linus Walleij <linus.walleij@...aro.org>,
Nicolas Frattaroli <nicolas.frattaroli@...labora.com>,
Arnd Bergmann <arnd@...db.de>,
linux-arch@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: "Yury Norov (NVIDIA)" <yury.norov@...il.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>
Subject: [PATCH 18/21] fprobe: don't use GENMASK()
GENMASK(high, low) notation is confusing. FIRST/LAST_BITS() are
more appropriate.
Signed-off-by: Yury Norov (NVIDIA) <yury.norov@...il.com>
---
include/asm-generic/fprobe.h | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/include/asm-generic/fprobe.h b/include/asm-generic/fprobe.h
index 8659a4dc6eb6..bf2523078661 100644
--- a/include/asm-generic/fprobe.h
+++ b/include/asm-generic/fprobe.h
@@ -16,17 +16,14 @@
#define ARCH_DEFINE_ENCODE_FPROBE_HEADER
#define FPROBE_HEADER_MSB_SIZE_SHIFT (BITS_PER_LONG - FPROBE_DATA_SIZE_BITS)
-#define FPROBE_HEADER_MSB_MASK \
- GENMASK(FPROBE_HEADER_MSB_SIZE_SHIFT - 1, 0)
+#define FPROBE_HEADER_MSB_MASK FIRST_BITS(FPROBE_HEADER_MSB_SIZE_SHIFT)
/*
* By default, this expects the MSBs in the address of kprobe is 0xf.
* If any arch needs another fixed pattern (e.g. s390 is zero filled),
* override this.
*/
-#define FPROBE_HEADER_MSB_PATTERN \
- GENMASK(BITS_PER_LONG - 1, FPROBE_HEADER_MSB_SIZE_SHIFT)
-
+#define FPROBE_HEADER_MSB_PATTERN LAST_BITS(FPROBE_HEADER_MSB_SIZE_SHIFT)
#define arch_fprobe_header_encodable(fp) \
(((unsigned long)(fp) & ~FPROBE_HEADER_MSB_MASK) == \
FPROBE_HEADER_MSB_PATTERN)
--
2.43.0
Powered by blists - more mailing lists