From: Bjorn Helgaas <[email protected]>
Use dev_printk() when possible to include device and driver information in
the conventional format.
Bjorn Helgaas (2):
xen-pciback: Use dev_printk() when possible
xenbus: Use dev_printk() when possible
drivers/xen/xen-pciback/conf_space.c | 16 +++++----
drivers/xen/xen-pciback/conf_space_header.c | 40 +++++++++------------
drivers/xen/xen-pciback/conf_space_quirks.c | 6 ++--
drivers/xen/xen-pciback/pci_stub.c | 38 +++++++++-----------
drivers/xen/xen-pciback/pciback_ops.c | 38 ++++++++------------
drivers/xen/xen-pciback/vpci.c | 10 +++---
drivers/xen/xenbus/xenbus_probe.c | 11 +++---
7 files changed, 70 insertions(+), 89 deletions(-)
base-commit: 8f3d9f354286745c751374f5f1fcafee6b3f3136
--
2.25.1
From: Bjorn Helgaas <[email protected]>
Use dev_printk() when possible to include device and driver information in
the conventional format.
Add "#define dev_fmt" to preserve KBUILD_MODNAME in messages.
No functional change intended.
Signed-off-by: Bjorn Helgaas <[email protected]>
---
drivers/xen/xenbus/xenbus_probe.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c
index 8c4d05b687b7..ee9a9170b43a 100644
--- a/drivers/xen/xenbus/xenbus_probe.c
+++ b/drivers/xen/xenbus/xenbus_probe.c
@@ -31,6 +31,7 @@
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+#define dev_fmt pr_fmt
#define DPRINTK(fmt, args...) \
pr_debug("xenbus_probe (%s:%d) " fmt ".\n", \
@@ -608,7 +609,7 @@ int xenbus_dev_suspend(struct device *dev)
if (drv->suspend)
err = drv->suspend(xdev);
if (err)
- pr_warn("suspend %s failed: %i\n", dev_name(dev), err);
+ dev_warn(dev, "suspend failed: %i\n", err);
return 0;
}
EXPORT_SYMBOL_GPL(xenbus_dev_suspend);
@@ -627,8 +628,7 @@ int xenbus_dev_resume(struct device *dev)
drv = to_xenbus_driver(dev->driver);
err = talk_to_otherend(xdev);
if (err) {
- pr_warn("resume (talk_to_otherend) %s failed: %i\n",
- dev_name(dev), err);
+ dev_warn(dev, "resume (talk_to_otherend) failed: %i\n", err);
return err;
}
@@ -637,15 +637,14 @@ int xenbus_dev_resume(struct device *dev)
if (drv->resume) {
err = drv->resume(xdev);
if (err) {
- pr_warn("resume %s failed: %i\n", dev_name(dev), err);
+ dev_warn(dev, "resume failed: %i\n", err);
return err;
}
}
err = watch_otherend(xdev);
if (err) {
- pr_warn("resume (watch_otherend) %s failed: %d.\n",
- dev_name(dev), err);
+ dev_warn(dev, "resume (watch_otherend) failed: %d\n", err);
return err;
}
--
2.25.1
On 5/27/20 1:43 PM, Bjorn Helgaas wrote:
> From: Bjorn Helgaas <[email protected]>
>
> Use dev_printk() when possible to include device and driver information in
> the conventional format.
>
> Add "#define dev_fmt" to preserve KBUILD_MODNAME in messages.
>
> No functional change intended.
>
> Signed-off-by: Bjorn Helgaas <[email protected]>
Reviewed-by: Boris Ostrovsky <[email protected]>