Re: [PATCH v2] Drivers/PCI: Logging clean-up [1]

From: Joe Perches
Date: Wed Apr 16 2014 - 01:41:31 EST


On Wed, 2014-04-16 at 07:37 +0200, Fabian Frederick wrote:
> -Convert printk(KERN_WARNING|KERN_ERR|KERN_INFO to pr_foo()
> -Define pr_fmt where it doesn't break existing format.
[]
> (other ones ?)
[]
> diff --git a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c
[]
> @@ -830,8 +831,8 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>
> err = pci_enable_device(pdev);
> if (err) {
> - printk(KERN_ERR MY_NAME ": cannot enable PCI device %s (%d)\n",
> - pci_name(pdev), err);
> + pr_err("cannot enable PCI device %s (%d)\n", pci_name(pdev),
> + err);

trivia:

My preference is to keep format and argument
on a single line where possible and on
separate lines when not.

pr_err("cannot enable PCI device %s (%d)\n",
pci_name(pdev), err);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/