Re: [PATCH v3 5/5] PCI/ATS: Mandate checking pci_ats_supported() before pci_prepare_ats()

From: Jason Gunthorpe

Date: Mon Aug 24 2026 - 14:13:48 EST


On Mon, 24 Aug 2026 12:23:47 +0000, Pranjal Shrivastava <praan@xxxxxxxxxx> wrote:
> Currently, pci_prepare_ats() internally calls pci_ats_supported() and
> returns -EINVAL if the device does not support ATS. While this provides
> a silent safety check, it conflates support detection with configuration.
>
> Update pci_prepare_ats() to wrap the internal pci_ats_supported check in
> a WARN_ON(). This mandates all callers to call pci_prepare_ats() only if
> the function supports ATS.
>
> [...]

Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>

--
Jason