aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Heusel <[email protected]>2024-01-11 15:13:07 +0100
committerLeon Romanovsky <[email protected]>2024-01-25 11:50:58 +0200
commit64854534ff96641e69fa1b7b2caab54259255c14 (patch)
tree245cd600b686a60dad0bd82294591b678ae16315
parent190a7affeece58f7727b5cad51d4d51461ece146 (diff)
RDMA/ipoib: Print symbolic error name instead of error code
Utilize the %pe print specifier to get the symbolic error name as a string (i.e "-ENOMEM") in the log message instead of the error code to increase its readability. This change was suggested in https://lore.kernel.org/all/[email protected]/ Signed-off-by: Christian Heusel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Dan Carpenter <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]>
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_multicast.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
index 319d4288eddd..8a4ab9ff0a68 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
@@ -287,8 +287,7 @@ static int ipoib_mcast_join_finish(struct ipoib_mcast *mcast,
ah = ipoib_create_ah(dev, priv->pd, &av);
if (IS_ERR(ah)) {
- ipoib_warn(priv, "ib_address_create failed %ld\n",
- -PTR_ERR(ah));
+ ipoib_warn(priv, "ib_address_create failed %pe\n", ah);
/* use original error */
return PTR_ERR(ah);
}