[<prev] [next>] [day] [month] [year] [list]
Message-ID: <3fbe9674-bc06-430d-8702-74d9dd9c3cb0@p183>
Date: Sat, 25 Oct 2025 21:01:37 +0300
From: Alexey Dobriyan <adobriyan@...il.com>
To: "Yury Norov (NVIDIA)" <yury.norov@...il.com>
Cc: Linus Walleij <linus.walleij@...aro.org>,
Nicolas Frattaroli <nicolas.frattaroli@...labora.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 00/21] lib: add alternatives for GENMASK()
> GENMASK(high, low) notation reflects a common pattern to describe
> hardware registers. However, out of drivers context it's confusing and
> error-prone.
>
> This series introduces alternatives for GENMASK():
>
> - BITS(low, high);
This is less bad (low bit then high), but in a perfect world high bit
should have been exclusive.
> - FIRST_BITS(nbits);
> - LAST_BITS(start);
Now it is 200% more confusing.
Powered by blists - more mailing lists