lkml.org 
[lkml]   [2023]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2023-10-23 02:26    [W:0.134 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site