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 readablility.
This change was suggested in
https://lore.kernel.org/all/[email protected]/
Signed-off-by: Christian Heusel <[email protected]>
---
drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
index 5b3154503bf4..b9cb2cc6ebf0 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);
}
--
2.43.0
On Thu, Jan 11, 2024 at 03:13:07PM +0100, Christian Heusel wrote:
> 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 readablility.
>
> This change was suggested in
> https://lore.kernel.org/all/[email protected]/
>
> Signed-off-by: Christian Heusel <[email protected]>
Thanks!
Reviewed-by: Dan Carpenter <[email protected]>
regards,
dan carpenter
On Thu, 11 Jan 2024 15:13:07 +0100, Christian Heusel wrote:
> 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 readablility.
>
> This change was suggested in
> https://lore.kernel.org/all/[email protected]/
>
> [...]
Applied, thanks!
[1/1] RDMA/ipoib: print symbolic error name instead of error code
https://git.kernel.org/rdma/rdma/c/64854534ff9664
Best regards,
--
Leon Romanovsky <[email protected]>