[PATCH] gpib: gpio: use %pe to print error pointer

From: Chen Jung Ku

Date: Sun Oct 18 2026 - 03:37:44 EST


In allocate_gpios(), the error from gpiod_get_index() is printed using
PTR_ERR() and the %ld format specifier. Use the %pe format specifier
and pass the error pointer directly instead.

This allows the symbolic error name (e.g. -EBUSY) to be printed rather
than a bare number, making the log easier to read.

No functional change.

Signed-off-by: Chen Jung Ku <ku.loong@xxxxxxxxxxxxxxxx>
---
drivers/gpib/gpio/gpib_bitbang.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpib/gpio/gpib_bitbang.c b/drivers/gpib/gpio/gpib_bitbang.c
index 34d14b94a0b8..e6f3a3a239ce 100644
--- a/drivers/gpib/gpio/gpib_bitbang.c
+++ b/drivers/gpib/gpio/gpib_bitbang.c
@@ -1152,8 +1152,8 @@ static int allocate_gpios(struct gpib_board *board)
table_index++;
lookup_table = lookup_tables[table_index];
if (!lookup_table) {
- dev_err(board->gpib_dev, "Unable to obtain gpio descriptor for pin %d error %ld\n",
- gpios_vector[j], PTR_ERR(desc));
+ dev_err(board->gpib_dev, "Unable to obtain gpio descriptor for pin %d error %pe\n",
+ gpios_vector[j], desc);
goto alloc_gpios_fail;
}
dbg_printk(1, "Allocation failed, now using table_index %d\n", table_index);
--
2.43.0