[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251025164023.308884-15-yury.norov@gmail.com>
Date: Sat, 25 Oct 2025 12:40:13 -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>,
Haren Myneni <haren@...ibm.com>,
linux-kernel@...r.kernel.org
Cc: "Yury Norov (NVIDIA)" <yury.norov@...il.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>
Subject: [PATCH 14/21] lib: 842: don't use GENMASK_ULL()
GENMASK_ULL(high, low) notation is confusing. FIRST_BITS_ULL() is more
appropriate.
Signed-off-by: Yury Norov (NVIDIA) <yury.norov@...il.com>
---
lib/842/842_compress.c | 2 +-
lib/842/842_decompress.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/842/842_compress.c b/lib/842/842_compress.c
index 055356508d97..83b68c85904f 100644
--- a/lib/842/842_compress.c
+++ b/lib/842/842_compress.c
@@ -161,7 +161,7 @@ static int __split_add_bits(struct sw842_param *p, u64 d, u8 n, u8 s)
ret = add_bits(p, d >> s, n - s);
if (ret)
return ret;
- return add_bits(p, d & GENMASK_ULL(s - 1, 0), s);
+ return add_bits(p, d & FIRST_BITS_ULL(s), s);
}
static int add_bits(struct sw842_param *p, u64 d, u8 n)
diff --git a/lib/842/842_decompress.c b/lib/842/842_decompress.c
index 582085ef8b49..0520f20f4121 100644
--- a/lib/842/842_decompress.c
+++ b/lib/842/842_decompress.c
@@ -115,7 +115,7 @@ static int next_bits(struct sw842_param *p, u64 *d, u8 n)
else
*d = be64_to_cpu(get_unaligned((__be64 *)in)) >> (64 - bits);
- *d &= GENMASK_ULL(n - 1, 0);
+ *d &= FIRST_BITS_ULL(n);
p->bit += n;
--
2.43.0
Powered by blists - more mailing lists