[PATCH v3 1/4] PCI/DPC: Rename pdev to err_port for dpc_handler

Sathyanarayanan Kuppuswamy sathyanarayanan.kuppuswamy at linux.intel.com
Wed Feb 12 08:17:55 AEDT 2025


On 2/7/25 1:34 AM, Shuai Xue wrote:
> The irq handler is registered for error port which recevie DPC
> interrupt. Rename pdev to err_port.
>
> No functional changes.
>
> Signed-off-by: Shuai Xue <xueshuai at linux.alibaba.com>
> ---

I think you can combine patch 1 & 2 into a single patch. Change wise, it 
looks
fine to me.

Reviewed-by: Kuppuswamy Sathyanarayanan 
<sathyanarayanan.kuppuswamy at linux.intel.com>

>   drivers/pci/pcie/dpc.c | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/pci/pcie/dpc.c b/drivers/pci/pcie/dpc.c
> index 242cabd5eeeb..1a54a0b657ae 100644
> --- a/drivers/pci/pcie/dpc.c
> +++ b/drivers/pci/pcie/dpc.c
> @@ -346,21 +346,21 @@ static bool dpc_is_surprise_removal(struct pci_dev *pdev)
>   
>   static irqreturn_t dpc_handler(int irq, void *context)
>   {
> -	struct pci_dev *pdev = context;
> +	struct pci_dev *err_port = context;
>   
>   	/*
>   	 * According to PCIe r6.0 sec 6.7.6, errors are an expected side effect
>   	 * of async removal and should be ignored by software.
>   	 */
> -	if (dpc_is_surprise_removal(pdev)) {
> -		dpc_handle_surprise_removal(pdev);
> +	if (dpc_is_surprise_removal(err_port)) {
> +		dpc_handle_surprise_removal(err_port);
>   		return IRQ_HANDLED;
>   	}
>   
> -	dpc_process_error(pdev);
> +	dpc_process_error(err_port);
>   
>   	/* We configure DPC so it only triggers on ERR_FATAL */
> -	pcie_do_recovery(pdev, pci_channel_io_frozen, dpc_reset_link);
> +	pcie_do_recovery(err_port, pci_channel_io_frozen, dpc_reset_link);
>   
>   	return IRQ_HANDLED;
>   }

-- 
Sathyanarayanan Kuppuswamy
Linux Kernel Developer



More information about the Linuxppc-dev mailing list