lkml.org 
[lkml]   [2020]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 3/8] IB/hfi1: Convert PCIBIOS_* errors to generic -E* errors
From
Date
On 6/15/2020 3:32 AM, refactormyself@gmail.com wrote:
> From: Bolarinwa Olayemi Saheed <refactormyself@gmail.com>
>
> restore_pci_variables() and save_pci_variables() return PCIBIOS_ error
> codes from PCIe capability accessors.
>
> PCIBIOS_ error codes have positive values. Passing on these values is
> inconsistent with functions which return only a negative value on failure.
>
> Before passing on the return value of PCIe capability accessors, call
> pcibios_err_to_errno() to convert any positive PCIBIOS_ error codes to
> negative generic error values.
>
> Fix redundant initialisation.
>
> Suggested-by: Bjorn Helgaas <bjorn@helgaas.com>
> Signed-off-by: Bolarinwa Olayemi Saheed <refactormyself@gmail.com>

Looks like we may have had a problem when calling
pci_read_config_dword() from the init dd path and doing a check for < 0
to bail. So this looks like goodness to me.

Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>

\
 
 \ /
  Last update: 2020-06-29 22:23    [W:0.134 / U:0.860 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site