From: Bjorn Helgaas <helgaas@kernel.org>
To: Frederick Lawler <fred@fredlawl.com>
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
mika.westerberg@linux.intel.com, lukas@wunner.de,
andriy.shevchenko@linux.intel.com, keith.busch@intel.com,
mr.nuke.me@gmail.com, liudongdong3@huawei.com,
thesven73@gmail.com
Subject: Re: [PATCH v2 1/9] PCI/AER: Cleanup dmesg logs
Date: Fri, 3 May 2019 14:31:54 -0500 [thread overview]
Message-ID: <20190503193154.GA180403@google.com> (raw)
In-Reply-To: <20190503035946.23608-2-fred@fredlawl.com>
On Thu, May 02, 2019 at 10:59:38PM -0500, Frederick Lawler wrote:
> Cleanup dmesg logs.
To specific, I think you did this:
- Drop the kzalloc() failure message because those failures are logged
elsewhere.
- Convert other printk(KERN_DEBUG) to pci_info() or dev_err() as
appropriate because printk(KERN_DEBUG) is ugly and don't match the
other logging. These could have been converted to pci_dbg() or
dev_dbg() instead, but that would make them depend on
CONFIG_DYNAMIC_DEBUG or DEBUG, and these messages are important enough
that we always want them.
I think the summary (subject line) is something like:
PCI/AER: Convert printk(KERN_DEBUG) to pci_info() or dev_err()
> Signed-off-by: Frederick Lawler <fred@fredlawl.com>
> ---
> drivers/pci/pcie/aer.c | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
> index f8fc2114ad39..82eb45335b6f 100644
> --- a/drivers/pci/pcie/aer.c
> +++ b/drivers/pci/pcie/aer.c
> @@ -964,8 +964,8 @@ static bool find_source_device(struct pci_dev *parent,
> pci_walk_bus(parent->subordinate, find_device_iter, e_info);
>
> if (!e_info->error_dev_num) {
> - pci_printk(KERN_DEBUG, parent, "can't find device of ID%04x\n",
> - e_info->id);
> + pci_info(parent, "can't find device of ID%04x\n",
> + e_info->id);
> return false;
> }
> return true;
> @@ -1380,7 +1380,6 @@ static int aer_probe(struct pcie_device *dev)
>
> rpc = devm_kzalloc(device, sizeof(struct aer_rpc), GFP_KERNEL);
> if (!rpc) {
> - dev_printk(KERN_DEBUG, device, "alloc AER rpc failed\n");
> return -ENOMEM;
> }
> rpc->rpd = dev->port;
> @@ -1389,8 +1388,8 @@ static int aer_probe(struct pcie_device *dev)
> status = devm_request_threaded_irq(device, dev->irq, aer_irq, aer_isr,
> IRQF_SHARED, "aerdrv", dev);
> if (status) {
> - dev_printk(KERN_DEBUG, device, "request AER IRQ %d failed\n",
> - dev->irq);
> + dev_err(device, "request AER IRQ %d failed\n",
> + dev->irq);
> return status;
> }
>
> @@ -1419,7 +1418,7 @@ static pci_ers_result_t aer_root_reset(struct pci_dev *dev)
> pci_write_config_dword(dev, pos + PCI_ERR_ROOT_COMMAND, reg32);
>
> rc = pci_bus_error_reset(dev);
> - pci_printk(KERN_DEBUG, dev, "Root Port link has been reset\n");
> + pci_info(dev, "Root Port link has been reset\n");
>
> /* Clear Root Error Status */
> pci_read_config_dword(dev, pos + PCI_ERR_ROOT_STATUS, ®32);
> --
> 2.17.1
>
next prev parent reply other threads:[~2019-05-03 19:31 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-03 3:59 [PATCH v2 0/9] PCI: Use PCIe service name in dmesg logs Frederick Lawler
2019-05-03 3:59 ` [PATCH v2 1/9] PCI/AER: Cleanup " Frederick Lawler
2019-05-03 19:31 ` Bjorn Helgaas [this message]
2019-05-06 8:22 ` Andy Shevchenko
2019-05-03 3:59 ` [PATCH v2 2/9] PCI/DPC: Prefix dmesg logs with PCIe service name Frederick Lawler
2019-05-03 16:44 ` Keith Busch
2019-05-03 19:44 ` Bjorn Helgaas
2019-05-03 3:59 ` [PATCH v2 3/9] PCI/PME: " Frederick Lawler
2019-05-03 19:55 ` Bjorn Helgaas
2019-05-03 3:59 ` [PATCH v2 4/9] PCI/LINK: " Frederick Lawler
2019-05-09 14:12 ` Bjorn Helgaas
2019-05-03 3:59 ` [PATCH v2 5/9] PCI/AER: " Frederick Lawler
2019-05-03 3:59 ` [PATCH v2 6/9] PCI: hotplug: " Frederick Lawler
2019-05-03 20:04 ` Bjorn Helgaas
2019-05-06 8:29 ` Andy Shevchenko
2019-05-03 3:59 ` [PATCH v2 7/9] PCI: hotplug: Prefer CONFIG_DYNAMIC_DEBUG/DEBUG for dmesg logs Frederick Lawler
2019-05-03 20:48 ` Bjorn Helgaas
2019-05-03 3:59 ` [PATCH v2 8/9] PCI: hotplug: Remove unnecessary dbg/err/info/warn() printk() wrappers Frederick Lawler
2019-05-03 3:59 ` [PATCH v2 9/9] PCI: hotplug: Prefix ctrl_*() dmesg logs with pciehp slot name Frederick Lawler
2019-05-09 14:03 ` Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190503193154.GA180403@google.com \
--to=helgaas@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=fred@fredlawl.com \
--cc=keith.busch@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=liudongdong3@huawei.com \
--cc=lukas@wunner.de \
--cc=mika.westerberg@linux.intel.com \
--cc=mr.nuke.me@gmail.com \
--cc=thesven73@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).