diff mbox series

[v2,3/9] PCI/PME: Prefix dmesg logs with PCIe service name

Message ID 20190503035946.23608-4-fred@fredlawl.com (mailing list archive)
State New, archived
Delegated to: Bjorn Helgaas
Headers show
Series PCI: Use PCIe service name in dmesg logs | expand

Commit Message

Frederick Lawler May 3, 2019, 3:59 a.m. UTC
Prefix dmesg logs with PCIe service name.

Signed-off-by: Frederick Lawler <fred@fredlawl.com>
---
 drivers/pci/pcie/pme.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Bjorn Helgaas May 3, 2019, 7:55 p.m. UTC | #1
On Thu, May 02, 2019 at 10:59:40PM -0500, Frederick Lawler wrote:
> Prefix dmesg logs with PCIe service name.

... to make it consistent with other PCIe services.

It's interesting that there are three uses here:

  pci_dbg(port, "PME interrupt generated for non-existent device ...")
  pci_dbg(port, "Spurious native PME interrupt!\n")
  pci_info(port, "Signaling PME with IRQ %d\n", srv->irq)

The first two use pci_dbg(), so whether it goes anywhere depends on
CONFIG_DYNAMIC_DEBUG and DEBUG.  To me they seem interesting enough to
become pci_info().

And all three already include "PME", so I could go either way with
adding the prefix.  But I agree that having it consistent with the
other services is probably a nice small hint that this is a PCIe port
thing, not an endpoint thing.

> Signed-off-by: Frederick Lawler <fred@fredlawl.com>
> ---
>  drivers/pci/pcie/pme.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/pci/pcie/pme.c b/drivers/pci/pcie/pme.c
> index 54d593d10396..d6698423a6d6 100644
> --- a/drivers/pci/pcie/pme.c
> +++ b/drivers/pci/pcie/pme.c
> @@ -7,6 +7,8 @@
>   * Copyright (C) 2009 Rafael J. Wysocki <rjw@sisk.pl>, Novell Inc.
>   */
>  
> +#define dev_fmt(fmt) "PME: " fmt
> +
>  #include <linux/pci.h>
>  #include <linux/kernel.h>
>  #include <linux/errno.h>
> -- 
> 2.17.1
>
diff mbox series

Patch

diff --git a/drivers/pci/pcie/pme.c b/drivers/pci/pcie/pme.c
index 54d593d10396..d6698423a6d6 100644
--- a/drivers/pci/pcie/pme.c
+++ b/drivers/pci/pcie/pme.c
@@ -7,6 +7,8 @@ 
  * Copyright (C) 2009 Rafael J. Wysocki <rjw@sisk.pl>, Novell Inc.
  */
 
+#define dev_fmt(fmt) "PME: " fmt
+
 #include <linux/pci.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>