[Very RFC 14/46] powernv/eeh: Remove un-necessary call to eeh_add_device_early()

Alexey Kardashevskiy aik at ozlabs.ru
Fri Nov 22 17:01:35 AEDT 2019



On 20/11/2019 12:28, Oliver O'Halloran wrote:
> eeh_add_device_early() is used to initialise the EEH state for a PCI device
> based on the contents of it's devicetree node. It doesn't do anything
> unless EEH_FLAG_PROBE_MODE_DEVTREE is set and that only happens on pseries.
> 
> Remove the call to eeh_add_device_early() in the powernv code to squash
> another pci_dn usage.
> 
> Signed-off-by: Oliver O'Halloran <oohall at gmail.com>


Reviewed-by: Alexey Kardashevskiy <aik at ozlabs.ru>


> ---
>  arch/powerpc/platforms/powernv/eeh-powernv.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/powernv/eeh-powernv.c b/arch/powerpc/platforms/powernv/eeh-powernv.c
> index 5250c4525544..aa2935a08464 100644
> --- a/arch/powerpc/platforms/powernv/eeh-powernv.c
> +++ b/arch/powerpc/platforms/powernv/eeh-powernv.c
> @@ -40,13 +40,10 @@ static int eeh_event_irq = -EINVAL;
>  
>  void pnv_pcibios_bus_add_device(struct pci_dev *pdev)
>  {
> -	struct pci_dn *pdn = pci_get_pdn(pdev);
> -
> -	if (!pdn || eeh_has_flag(EEH_FORCE_DISABLED))
> +	if (eeh_has_flag(EEH_FORCE_DISABLED))
>  		return;
>  
>  	dev_dbg(&pdev->dev, "EEH: Setting up device\n");
> -	eeh_add_device_early(pdn);
>  	eeh_add_device_late(pdev);
>  }
>  
> 

-- 
Alexey


More information about the Linuxppc-dev mailing list