diff mbox series

PCI/AER: Use consistent format when print PCI device

Message ID 1616752057-9720-1-git-send-email-yangyicong@hisilicon.com
State New
Headers show
Series PCI/AER: Use consistent format when print PCI device | expand

Commit Message

Yicong Yang March 26, 2021, 9:47 a.m. UTC
We use format domain:bus:slot.function when print
PCI device. Use consistent format in AER messages.

Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
---
 drivers/pci/pcie/aer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Krzysztof Wilczy��ski March 26, 2021, 10:16 a.m. UTC | #1
Hi Yicong,

> We use format domain:bus:slot.function when print
> PCI device. Use consistent format in AER messages.

A small nitpick: the commit message and in the subject line it should
probably use "printing" rather than "print".  But I suppose whoever is
going be applying this patch can fix this, so probably no need to send
another version, unless you really want to do it.

[...]
> -			pr_err("AER recover: Can not find pci_dev for %04x:%02x:%02x:%x\n",
> +			pr_err("AER recover: Can not find pci_dev for %04x:%02x:%02x.%x\n",
>  			       entry.domain, entry.bus,
>  			       PCI_SLOT(entry.devfn), PCI_FUNC(entry.devfn));
[...]
> -		pr_err("AER recover: Buffer overflow when recovering AER for %04x:%02x:%02x:%x\n",
> +		pr_err("AER recover: Buffer overflow when recovering AER for %04x:%02x:%02x.%x\n",
>  		       domain, bus, PCI_SLOT(devfn), PCI_FUNC(devfn));

Seems like a good idea!  This BDF-like notation is used at few other
places.  Nice catch.

Reviewed-by: Krzysztof Wilczyński <kw@linux.com>

Krzysztof
Yicong Yang March 29, 2021, 10:54 a.m. UTC | #2
On 2021/3/26 18:16, Krzysztof Wilczyński wrote:
> Hi Yicong,
> 
>> We use format domain:bus:slot.function when print
>> PCI device. Use consistent format in AER messages.
> 
> A small nitpick: the commit message and in the subject line it should
> probably use "printing" rather than "print".  But I suppose whoever is
> going be applying this patch can fix this, so probably no need to send
> another version, unless you really want to do it.
> 

sorry for the late reply. it's ok for me to get this fixed in a v2 one. :)

> [...]
>> -			pr_err("AER recover: Can not find pci_dev for %04x:%02x:%02x:%x\n",
>> +			pr_err("AER recover: Can not find pci_dev for %04x:%02x:%02x.%x\n",
>>  			       entry.domain, entry.bus,
>>  			       PCI_SLOT(entry.devfn), PCI_FUNC(entry.devfn));
> [...]
>> -		pr_err("AER recover: Buffer overflow when recovering AER for %04x:%02x:%02x:%x\n",
>> +		pr_err("AER recover: Buffer overflow when recovering AER for %04x:%02x:%02x.%x\n",
>>  		       domain, bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
> 
> Seems like a good idea!  This BDF-like notation is used at few other
> places.  Nice catch.
> 
> Reviewed-by: Krzysztof Wilczyński <kw@linux.com>
> 

thanks.

Yicong
diff mbox series

Patch

diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
index ba22388..f7f0ca5 100644
--- a/drivers/pci/pcie/aer.c
+++ b/drivers/pci/pcie/aer.c
@@ -983,7 +983,7 @@  static void aer_recover_work_func(struct work_struct *work)
 		pdev = pci_get_domain_bus_and_slot(entry.domain, entry.bus,
 						   entry.devfn);
 		if (!pdev) {
-			pr_err("AER recover: Can not find pci_dev for %04x:%02x:%02x:%x\n",
+			pr_err("AER recover: Can not find pci_dev for %04x:%02x:%02x.%x\n",
 			       entry.domain, entry.bus,
 			       PCI_SLOT(entry.devfn), PCI_FUNC(entry.devfn));
 			continue;
@@ -1022,7 +1022,7 @@  void aer_recover_queue(int domain, unsigned int bus, unsigned int devfn,
 				 &aer_recover_ring_lock))
 		schedule_work(&aer_recover_work);
 	else
-		pr_err("AER recover: Buffer overflow when recovering AER for %04x:%02x:%02x:%x\n",
+		pr_err("AER recover: Buffer overflow when recovering AER for %04x:%02x:%02x.%x\n",
 		       domain, bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
 }
 EXPORT_SYMBOL_GPL(aer_recover_queue);