[PATCH] staging: greybus: use %pe to print PTR_ERR in fw-core.c

From: Tomasz Unger

Date: Sun Mar 15 2026 - 04:41:05 EST


Replace PTR_ERR() with %pe format specifier which directly prints
the error pointer in a human readable way, making the code cleaner
and more idiomatic.

Signed-off-by: Tomasz Unger <tomasz.unger@xxxxxxxx>
---
Verified with checkpatch.pl - no errors or warnings.
Compiled the gb-firmware module successfully.
Module compiles and loads in a QEMU environment.
---
drivers/staging/greybus/fw-core.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/greybus/fw-core.c b/drivers/staging/greybus/fw-core.c
index 2016a74f137f..7053afa9ab3e 100644
--- a/drivers/staging/greybus/fw-core.c
+++ b/drivers/staging/greybus/fw-core.c
@@ -112,8 +112,8 @@ static int gb_fw_core_probe(struct gb_bundle *bundle,
connection = gb_connection_create(bundle, cport_id,
gb_fw_download_request_handler);
if (IS_ERR(connection)) {
- dev_err(&bundle->dev, "failed to create download connection (%ld)\n",
- PTR_ERR(connection));
+ dev_err(&bundle->dev, "failed to create download connection (%pe)\n",
+ connection);
} else {
fw_core->download_connection = connection;
}
@@ -131,8 +131,8 @@ static int gb_fw_core_probe(struct gb_bundle *bundle,
connection = gb_connection_create(bundle, cport_id,
NULL);
if (IS_ERR(connection)) {
- dev_err(&bundle->dev, "failed to create SPI connection (%ld)\n",
- PTR_ERR(connection));
+ dev_err(&bundle->dev, "failed to create SPI connection (%pe)\n",
+ connection);
} else {
fw_core->spi_connection = connection;
}
@@ -149,8 +149,8 @@ static int gb_fw_core_probe(struct gb_bundle *bundle,
connection = gb_connection_create(bundle, cport_id,
NULL);
if (IS_ERR(connection)) {
- dev_err(&bundle->dev, "failed to create Authentication connection (%ld)\n",
- PTR_ERR(connection));
+ dev_err(&bundle->dev, "failed to create Authentication connection (%pe)\n",
+ connection);
} else {
fw_core->cap_connection = connection;
}

---
base-commit: ad6bb64332bb4297110950769ad5af52791e33a2
change-id: 20260314-greybus-pe-format-85993705ee22

Best regards,
--
Tomasz Unger <tomasz.unger@xxxxxxxx>