diff mbox series

PCI/AER:Add error message when unable to handle additional devices

Message ID 20241227071910.1719-1-evepolonium@gmail.com (mailing list archive)
State New
Delegated to: Bjorn Helgaas
Headers show
Series PCI/AER:Add error message when unable to handle additional devices | expand

Commit Message

Atharva Tiwari Dec. 27, 2024, 7:19 a.m. UTC
Log an error message in `find_device_iter'
when the system cannot handle more error devices.

Signed-off-by: Atharva Tiwari <evepolonium@gmail.com>
---
 drivers/pci/pcie/aer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jonathan Cameron Jan. 3, 2025, 11:17 a.m. UTC | #1
On Fri, 27 Dec 2024 12:49:10 +0530
Atharva Tiwari <evepolonium@gmail.com> wrote:

> Log an error message in `find_device_iter'
> when the system cannot handle more error devices.
Needs a statement of 'why'

Jonathan

> 
> Signed-off-by: Atharva Tiwari <evepolonium@gmail.com>
> ---
>  drivers/pci/pcie/aer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
> index 34ce9f834d0c..04743617202e 100644
> --- a/drivers/pci/pcie/aer.c
> +++ b/drivers/pci/pcie/aer.c
> @@ -886,7 +886,7 @@ static int find_device_iter(struct pci_dev *dev, void *data)
>  		/* List this device */
>  		if (add_error_device(e_info, dev)) {
>  			/* We cannot handle more... Stop iteration */
> -			/* TODO: Should print error message here? */
> +			pr_err("PCI: Unable to handle additional error devices\n");
>  			return 1;
>  		}
>
Atharva Tiwari Jan. 3, 2025, 1:20 p.m. UTC | #2
i completed the todo on line 886 thats why
Jonathan Cameron Jan. 3, 2025, 4:32 p.m. UTC | #3
On Fri,  3 Jan 2025 18:50:35 +0530
Atharva Tiwari <evepolonium@gmail.com> wrote:

> i completed the todo on line 886 thats why
> 

It is a question, not a todo.  So if you wish to
make the change you need to discuss why the answer to that
question was 'yes it makes sense to print an error message here'.

Jonathan
diff mbox series

Patch

diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
index 34ce9f834d0c..04743617202e 100644
--- a/drivers/pci/pcie/aer.c
+++ b/drivers/pci/pcie/aer.c
@@ -886,7 +886,7 @@  static int find_device_iter(struct pci_dev *dev, void *data)
 		/* List this device */
 		if (add_error_device(e_info, dev)) {
 			/* We cannot handle more... Stop iteration */
-			/* TODO: Should print error message here? */
+			pr_err("PCI: Unable to handle additional error devices\n");
 			return 1;
 		}