Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will@kernel.org>
To: Hans Zhang <18255117159@163.com>
Cc: robin.murphy@arm.com, joro@8bytes.org, iommu@lists.linux.dev,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 0/2] iommu/arm-smmu: Use FIELD_MODIFY() for bitfield operations
Date: Tue, 19 May 2026 11:51:42 +0100	[thread overview]
Message-ID: <agxAvl02rcPoEHaq@willie-the-truck> (raw)
In-Reply-To: <20260430164545.49637-1-18255117159@163.com>

On Fri, May 01, 2026 at 12:45:43AM +0800, Hans Zhang wrote:
> Replace open-coded bitfield modifications with the standard FIELD_MODIFY()
> macro. This improves code readability and adds type/range checking without
> functional changes.

Does it _really_ improve the readability? '&=' and '|=' patterns are
pretty idiomatic C code, if you ask me.

> FIELD_MODIFY() internally performs the same mask-clear + set operation but
> eliminates repetitive boilerplate.
> 
> ---
> Hi, If the Maintainers think it's not necessary, please ignore it.

I don't really mind the code either way, so I think I'd prefer to leave
it as-is unless somebody wants to convince me otherwise...

Will


  parent reply	other threads:[~2026-05-19 10:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-30 16:45 [PATCH 0/2] iommu/arm-smmu: Use FIELD_MODIFY() for bitfield operations Hans Zhang
2026-04-30 16:45 ` [PATCH 1/2] iommu/arm-smmu-qcom: Use FIELD_MODIFY() Hans Zhang
2026-04-30 16:45 ` [PATCH 2/2] iommu/arm-smmu-v3: " Hans Zhang
2026-05-19 10:51 ` Will Deacon [this message]
2026-05-19 12:20   ` [PATCH 0/2] iommu/arm-smmu: Use FIELD_MODIFY() for bitfield operations Hans Zhang

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=agxAvl02rcPoEHaq@willie-the-truck \
    --to=will@kernel.org \
    --cc=18255117159@163.com \
    --cc=iommu@lists.linux.dev \
    --cc=joro@8bytes.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.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