Re: [PATCH] iommu: simplify list initialization in iommu_create_device_direct_mappings()

From: Markus Elfring

Date: Sat Jan 10 2026 - 06:48:35 EST


> Use LIST_HEAD() to declare and initialize the 'mappings' list head in
> iommu_create_device_direct_mappings() instead of separate declaration and
> INIT_LIST_HEAD(). This simplifies the code by combining declaration and
> initialization into a single idiomatic form, improving readability without
> changing functionality.


How do you think about to repeat the mentioned transformation approach for the implementation
of the function “iommu_group_show_resv_regions”?
https://elixir.bootlin.com/linux/v6.19-rc4/source/drivers/iommu/iommu.c#L949-L969

Regards,
Markus