Linux Power Management development
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: "Bryan B. Lima" <bblima@usp.br>
Cc: rafael@kernel.org,  daniel.lezcano@kernel.org,
	 rui.zhang@intel.com, lukasz.luba@arm.com,
	 gustavoscorrea@usp.br,  linux-pm@vger.kernel.org
Subject: Re: [PATCH] thermal: armada: Use bitfield and bitmask macros
Date: Wed, 01 Jul 2026 15:15:16 +0200	[thread overview]
Message-ID: <87qzlmrguz.fsf@bootlin.com> (raw)
In-Reply-To: <20260701010802.99029-1-bblima@usp.br> (Bryan B. Lima's message of "Tue, 30 Jun 2026 22:07:18 -0300")

Hi,

On 30/06/2026 at 22:07:18 -03, "Bryan B. Lima" <bblima@usp.br> wrote:

> Replace manual bitfield manipulations with FIELD_MODIFY() and define
> constants with BIT() and GENMASK() to make code more readable.
>
> Also, remove offset and shift constants for clarity in use of bitfield
> macros.
>
> Signed-off-by: Bryan B. Lima <bblima@usp.br>
> Co-developed-by: Gustavo S. Correa <gustavoscorrea@usp.br>
> Signed-off-by: Gustavo S. Correa <gustavoscorrea@usp.br>

I find the BIT/GENMASK conversion useful (I would definitely use them
today if I had to rewrite the driver), but I personally kind of dislike
the FIELD_MODIFY() macro and don't see how it improves the
readability. I prefer plain bit operations. Nevertheless, fine with it.

Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>

Thanks,
Miquèl

      reply	other threads:[~2026-07-01 13:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-01  1:07 [PATCH] thermal: armada: Use bitfield and bitmask macros Bryan B. Lima
2026-07-01 13:15 ` Miquel Raynal [this message]

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=87qzlmrguz.fsf@bootlin.com \
    --to=miquel.raynal@bootlin.com \
    --cc=bblima@usp.br \
    --cc=daniel.lezcano@kernel.org \
    --cc=gustavoscorrea@usp.br \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=rafael@kernel.org \
    --cc=rui.zhang@intel.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