From: Hans Zhang <18255117159@163.com>
To: Will Deacon <will@kernel.org>
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 20:20:43 +0800 [thread overview]
Message-ID: <941b93d9-2251-4222-8914-73bb7d4e6ac7@163.com> (raw)
In-Reply-To: <agxAvl02rcPoEHaq@willie-the-truck>
On 5/19/26 18:51, Will Deacon wrote:
> 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
Hi Will,
It's not like that. Please take a look at the accepted patch below.
https://lore.kernel.org/linux-pci/20260505165436.GA737933@bhelgaas/
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=42ec65b46a4fc7565d48daa42bf025fdc67800eb
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=5fd6f2154734f447e83b6de9a08d16848605191e
Best regards,
Hans
prev parent reply other threads:[~2026-05-19 12:21 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 ` [PATCH 0/2] iommu/arm-smmu: Use FIELD_MODIFY() for bitfield operations Will Deacon
2026-05-19 12:20 ` Hans Zhang [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=941b93d9-2251-4222-8914-73bb7d4e6ac7@163.com \
--to=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 \
--cc=will@kernel.org \
/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