mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexey Dobriyan <adobriyan@gmail.com>
To: "Yury Norov (NVIDIA)" <yury.norov@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Nicolas Frattaroli <nicolas.frattaroli@collabora.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 00/21] lib: add alternatives for GENMASK()
Date: Sat, 25 Oct 2025 21:01:37 +0300	[thread overview]
Message-ID: <3fbe9674-bc06-430d-8702-74d9dd9c3cb0@p183> (raw)

> 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.

             reply	other threads:[~2025-10-25 18:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-25 18:01 Alexey Dobriyan [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-10-25 16:39 Yury Norov (NVIDIA)
2025-10-25 17:56 ` Linus Torvalds
2025-11-26  9:07   ` Rasmus Villemoes
2025-11-26 10:38     ` david laight
2025-11-26 19:44     ` Linus Torvalds
2025-11-26 22:17       ` david laight
2025-11-26 23:47         ` Linus Torvalds
2025-11-27  9:37           ` david laight
2025-11-27 14:11           ` Nicolas Frattaroli
2025-11-27 17:29             ` Linus Torvalds
2025-11-27 18:51         ` david laight
2025-11-29 11:46       ` david laight
2025-10-25 16:28 Yury Norov (NVIDIA)
2025-10-25 16:37 ` Yury Norov

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=3fbe9674-bc06-430d-8702-74d9dd9c3cb0@p183 \
    --to=adobriyan@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=nicolas.frattaroli@collabora.com \
    --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®