[PATCH 14/21] lib: 842: don't use GENMASK_ULL()
Yury Norov (NVIDIA)
yury.norov at gmail.com
Sat Oct 25 09:32:56 PDT 2025
GENMASK_ULL(high, low) notation is confusing. FIRST_BITS_ULL() is more
appropriate.
Signed-off-by: Yury Norov (NVIDIA) <yury.norov at gmail.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
More information about the linux-arm-kernel
mailing list