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

From: Bjorn Helgaas
Date: Fri May 03 2019 - 15:56:30 EST


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@xxxxxxxxxxxx>
> ---
> 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@xxxxxxx>, Novell Inc.
> */
>
> +#define dev_fmt(fmt) "PME: " fmt
> +
> #include <linux/pci.h>
> #include <linux/kernel.h>
> #include <linux/errno.h>
> --
> 2.17.1
>