[Very RFC 05/46] powernv/pci: Remove the pnv_phb dma_dev_setup callback

Alexey Kardashevskiy aik at ozlabs.ru
Thu Nov 21 15:03:02 AEDT 2019



On 20/11/2019 12:28, Oliver O'Halloran wrote:
> This is only ever set for IODA PHBs. The only call site is in
> pnv_pci_dma_dev_setup(), which is also only used by normal IODA PHBs, so remove
> the callback in favour of a direct call.
> 
> Signed-off-by: Oliver O'Halloran <oohall at gmail.com>



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



> ---
>  arch/powerpc/platforms/powernv/pci-ioda.c | 4 +---
>  arch/powerpc/platforms/powernv/pci.h      | 1 -
>  2 files changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
> index c2b3a5a13004..45f974258766 100644
> --- a/arch/powerpc/platforms/powernv/pci-ioda.c
> +++ b/arch/powerpc/platforms/powernv/pci-ioda.c
> @@ -3656,8 +3656,7 @@ void pnv_pci_dma_dev_setup(struct pci_dev *pdev)
>  	}
>  #endif /* CONFIG_PCI_IOV */
>  
> -	if (phb && phb->dma_dev_setup)
> -		phb->dma_dev_setup(phb, pdev);
> +	pnv_pci_ioda_dma_dev_setup(phb, pdev);
>  }
>  
>  void pnv_pci_dma_bus_setup(struct pci_bus *bus)
> @@ -3940,7 +3939,6 @@ static void __init pnv_pci_init_ioda_phb(struct device_node *np,
>  		hose->controller_ops = pnv_npu_ocapi_ioda_controller_ops;
>  		break;
>  	default:
> -		phb->dma_dev_setup = pnv_pci_ioda_dma_dev_setup;
>  		hose->controller_ops = pnv_pci_ioda_controller_ops;
>  	}
>  
> diff --git a/arch/powerpc/platforms/powernv/pci.h b/arch/powerpc/platforms/powernv/pci.h
> index f23145575048..3c33a0c91a69 100644
> --- a/arch/powerpc/platforms/powernv/pci.h
> +++ b/arch/powerpc/platforms/powernv/pci.h
> @@ -108,7 +108,6 @@ struct pnv_phb {
>  	int (*msi_setup)(struct pnv_phb *phb, struct pci_dev *dev,
>  			 unsigned int hwirq, unsigned int virq,
>  			 unsigned int is_64, struct msi_msg *msg);
> -	void (*dma_dev_setup)(struct pnv_phb *phb, struct pci_dev *pdev);
>  	int (*init_m64)(struct pnv_phb *phb);
>  	int (*get_pe_state)(struct pnv_phb *phb, int pe_no);
>  	void (*freeze_pe)(struct pnv_phb *phb, int pe_no);
> 

-- 
Alexey


More information about the Linuxppc-dev mailing list