Re: [PATCH v3 1/5] iommu/amd: Refactor device probe and capability initialization

From: Jason Gunthorpe

Date: Tue Aug 25 2026 - 07:51:00 EST


On Tue, Aug 25, 2026 at 10:24:16AM +0000, Pranjal Shrivastava wrote:
> On Mon, Aug 24, 2026 at 03:13:21PM -0300, Jason Gunthorpe wrote:
> > > [ ... 14 lines skipped ... ]
> > > @@ -675,7 +675,8 @@ static void pdev_disable_caps(struct pci_dev *pdev)
> > > * This function checks if the driver got a valid device from the caller to
> > > * avoid dereferencing invalid pointers.
> > > */
> > > -static bool check_device(struct device *dev)
> > > +static bool iommu_lookup_device(struct device *dev,
> > > + struct amd_iommu **iommu_out, u16 *devid_out)
> > > {
> >
> > If we are touching the names driver functions should not be called
> > iommu_*, it is confusing..
> >
>
> Ack. So just lookup_device works?

Yeah that seems a little common in this driver, amd_xxx would be OK
too

Jason