Messages in this thread | | | Date | Sun, 22 Oct 2023 17:25:50 -0700 | From | Nicolin Chen <> | Subject | Re: [PATCH 1/2] iommufd/device: Drop enforce_cache_coherency in iommufd_device_do_replace |
| |
On Sat, Oct 21, 2023 at 09:25:18AM +0800, Baolu Lu wrote: > > @@ -465,6 +455,8 @@ iommufd_device_do_replace(struct iommufd_device *idev, > > > > igroup->hwpt = hwpt; > > > > + list_for_each_entry(cur, &igroup->device_list, group_item) > > + num_devices++; > > Minor: How about using list_count_nodes()?
That's better I think. Replaced with:
+ num_devices = list_count_nodes(&igroup->device_list);
> > /* > > * Move the refcounts held by the device_list to the new hwpt. Retain a > > * refcount for this thread as the caller will free it. > > Either way, > > Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Thanks! Nic
| |