RE: [PATCH v5 07/14] iommufd/viommu: Add iommufd_viommu_get_vdev_id helper

From: Tian, Kevin
Date: Fri Jan 10 2025 - 02:08:03 EST


> From: Nicolin Chen <nicolinc@xxxxxxxxxx>
> Sent: Wednesday, January 8, 2025 1:10 AM
> +
> + xa_lock(&viommu->vdevs);
> + xa_for_each(&viommu->vdevs, index, vdev) {
> + if (vdev && vdev->dev == dev) {
> + vdev_id = (unsigned long)vdev->id;
> + break;
> + }
> + }

Nit. No need to check vdev pointer as commented in last review.

Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>