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

\
 
 \ /
  Last update: 2021-10-13 20:49    [W:0.119 / U:22.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site