[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211013184839.GA1909162@bhelgaas>
Date: Wed, 13 Oct 2021 13:48:39 -0500
From: Bjorn Helgaas <helgaas@...nel.org>
To: Naveen Naidu <naveennaidu479@...il.com>
Cc: Rob Herring <robh@...nel.org>, Bjorn Helgaas <bhelgaas@...gle.com>,
PCI <linux-pci@...r.kernel.org>,
linux-kernel-mentees@...ts.linuxfoundation.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Pali Rohár <pali@...nel.org>
Subject: Re: [PATCH 02/22] PCI: Unify PCI error response checking
On Wed, Oct 13, 2021 at 10:46:53PM +0530, Naveen Naidu wrote:
> 2. "Rework any callers expecting a positive return value"
>
> This means, find out the places where we have something like
>
> err = pci_read_config_dword();
> if (err > 0)
>
> Then change it to:
>
> err = pci_read_config_dword(pdev, PCI_REG_NPKDSC, &npkdsc);
> if (err != PCIBIOS_SUCCESSFUL)
I'm sure this is obvious, but I would try hard not to add any new uses
of PCIBIOS_SUCCESSFUL.
> Is there any easy way to search for these patterns, or should I look
> for each instance of pci_read_config_* and other such variants and
> see if such an case exists?
coccigrep might be able to find things like this, but I'ver never
really become friends with it.
Powered by blists - more mailing lists