[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZTW9jnyhBNZm8p0+@Asurada-Nvidia>
Date: Sun, 22 Oct 2023 17:25:50 -0700
From: Nicolin Chen <nicolinc@...dia.com>
To: Baolu Lu <baolu.lu@...ux.intel.com>
CC: <jgg@...dia.com>, <kevin.tian@...el.com>, <joro@...tes.org>,
<will@...nel.org>, <robin.murphy@....com>, <iommu@...ts.linux.dev>,
<linux-kernel@...r.kernel.org>, <yi.l.liu@...el.com>
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@...ux.intel.com>
Thanks!
Nic
Powered by blists - more mailing lists