linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI/AER: Use consistent format when print PCI device
@ 2021-03-26  9:47 Yicong Yang
  2021-03-26 10:16 ` Krzysztof Wilczyński
  0 siblings, 1 reply; 3+ messages in thread
From: Yicong Yang @ 2021-03-26  9:47 UTC (permalink / raw)
  To: bhelgaas, linux-pci; +Cc: linuxarm, prime.zeng, yangyicong

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(-)

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);
-- 
2.8.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] PCI/AER: Use consistent format when print PCI device
  2021-03-26  9:47 [PATCH] PCI/AER: Use consistent format when print PCI device Yicong Yang
@ 2021-03-26 10:16 ` Krzysztof Wilczyński
  2021-03-29 10:54   ` Yicong Yang
  0 siblings, 1 reply; 3+ messages in thread
From: Krzysztof Wilczyński @ 2021-03-26 10:16 UTC (permalink / raw)
  To: Yicong Yang; +Cc: bhelgaas, linux-pci, linuxarm, prime.zeng

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] PCI/AER: Use consistent format when print PCI device
  2021-03-26 10:16 ` Krzysztof Wilczyński
@ 2021-03-29 10:54   ` Yicong Yang
  0 siblings, 0 replies; 3+ messages in thread
From: Yicong Yang @ 2021-03-29 10:54 UTC (permalink / raw)
  To: Krzysztof Wilczyński; +Cc: bhelgaas, linux-pci, linuxarm, prime.zeng

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-29 10:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-26  9:47 [PATCH] PCI/AER: Use consistent format when print PCI device Yicong Yang
2021-03-26 10:16 ` Krzysztof Wilczyński
2021-03-29 10:54   ` Yicong Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).