Re: [PATCH v2 4/8] iommu: Factor out some helpers

From: Baolu Lu
Date: Sat Jan 28 2023 - 03:13:10 EST


On 2023/1/27 2:26, Robin Murphy wrote:
The pattern for picking the first device out of the group list is
repeated a few times now, so it's clearly worth factoring out to hide
the group_device detail from places that don't need to know. Similarly,
the safety check for dev_iommu_ops() at public interfaces starts looking
a bit repetitive, and might not be completely obvious at first glance,
so let's factor that out for clarity as well, in preparation for more
uses of both.

Signed-off-by: Robin Murphy<robin.murphy@xxxxxxx>

Reviewed-by: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>

Best regards,
baolu