[PATCH 0/2] iommu/arm-smmu: Use FIELD_MODIFY() for bitfield operations
Will Deacon
will at kernel.org
Tue May 19 03:51:42 PDT 2026
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
More information about the linux-arm-kernel
mailing list