[PATCH 3/3] powerpc/pseries: clean up ibmebus printks
Johan Hovold
johan at kernel.org
Fri Apr 24 20:36:04 AEST 2026
Clean up the imbebus printks by switching to pr_warn() and pr_err(),
adding a missing newline and making the error messages a bit more
uniform.
Signed-off-by: Johan Hovold <johan at kernel.org>
---
arch/powerpc/platforms/pseries/ibmebus.c | 20 +++++++-------------
1 file changed, 7 insertions(+), 13 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/ibmebus.c b/arch/powerpc/platforms/pseries/ibmebus.c
index e3b41e2d844f..8797b2137d9c 100644
--- a/arch/powerpc/platforms/pseries/ibmebus.c
+++ b/arch/powerpc/platforms/pseries/ibmebus.c
@@ -203,8 +203,7 @@ static int ibmebus_create_devices(const struct of_device_id *matches)
ret = ibmebus_create_device(child);
if (ret) {
- printk(KERN_ERR "%s: failed to create device (%i)",
- __func__, ret);
+ pr_err("%s: failed to create device: %d\n", __func__, ret);
of_node_put(child);
break;
}
@@ -282,8 +281,7 @@ static ssize_t probe_store(const struct bus_type *bus, const char *buf, size_t c
ibmebus_match_path);
if (dev) {
put_device(dev);
- printk(KERN_WARNING "%s: %s has already been probed\n",
- __func__, path);
+ pr_warn("%s: %s has already been probed\n", __func__, path);
rc = -EEXIST;
goto out;
}
@@ -292,8 +290,7 @@ static ssize_t probe_store(const struct bus_type *bus, const char *buf, size_t c
rc = ibmebus_create_device(dn);
of_node_put(dn);
} else {
- printk(KERN_WARNING "%s: no such device node: %s\n",
- __func__, path);
+ pr_warn("%s: no such device node: %s\n", __func__, path);
rc = -ENODEV;
}
@@ -322,8 +319,7 @@ static ssize_t remove_store(const struct bus_type *bus, const char *buf, size_t
kfree(path);
return count;
} else {
- printk(KERN_WARNING "%s: %s not on the bus\n",
- __func__, path);
+ pr_warn("%s: %s not on the bus\n", __func__, path);
kfree(path);
return -ENODEV;
@@ -447,20 +443,18 @@ static int __init ibmebus_bus_init(void)
{
int err;
- printk(KERN_INFO "IBM eBus Device Driver\n");
+ pr_info("IBM eBus Device Driver\n");
err = bus_register(&ibmebus_bus_type);
if (err) {
- printk(KERN_ERR "%s: failed to register IBM eBus.\n",
- __func__);
+ pr_err("%s: failed to register IBM eBus\n", __func__);
return err;
}
ibmebus_bus_device = root_device_register("ibmebus");
if (IS_ERR(ibmebus_bus_device)) {
err = PTR_ERR(ibmebus_bus_device);
- printk(KERN_WARNING "%s: root_device_register returned %i\n",
- __func__, err);
+ pr_err("%s: failed to register root device: %d\n", __func__, err);
bus_unregister(&ibmebus_bus_type);
return err;
--
2.53.0
More information about the Linuxppc-dev
mailing list