diff mbox series

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

Message ID 20250207093500.70885-2-xueshuai@linux.alibaba.com (mailing list archive)
State Superseded
Delegated to: Bjorn Helgaas
Headers show
Series PCI/AER: Report fatal errors of RCiEP and EP if link recoverd | expand

Commit Message

Shuai Xue Feb. 7, 2025, 9:34 a.m. UTC
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@linux.alibaba.com>
---
 drivers/pci/pcie/dpc.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Sathyanarayanan Kuppuswamy Feb. 11, 2025, 9:17 p.m. UTC | #1
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@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@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;
>   }
Shuai Xue Feb. 12, 2025, 2:47 a.m. UTC | #2
在 2025/2/12 05:17, Sathyanarayanan Kuppuswamy 写道:
> 
> 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@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@linux.intel.com>

Will do in next version.

Thanks.
Shuai
diff mbox series

Patch

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;
 }