diff mbox

[v2] IB/mlx5: Fix a warning message

Message ID 20170614102009.GA5171@elgon.mountain (mailing list archive)
State Accepted
Headers show

Commit Message

Dan Carpenter June 14, 2017, 10:20 a.m. UTC
"umem" is a valid pointer.  We intended to print "*umem" or even just
"err" instead.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
v2: style change

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Leon Romanovsky June 14, 2017, 10:41 a.m. UTC | #1
On Wed, Jun 14, 2017 at 01:20:09PM +0300, Dan Carpenter wrote:
> "umem" is a valid pointer.  We intended to print "*umem" or even just
> "err" instead.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> v2: style change
>

Thanks,
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Doug Ledford July 22, 2017, 5:30 p.m. UTC | #2
On 6/14/2017 6:20 AM, Dan Carpenter wrote:
> "umem" is a valid pointer.  We intended to print "*umem" or even just
> "err" instead.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

This was accepted into 4.13-rc, thanks.
diff mbox

Patch

diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c
index 763bb5b36144..2c89757b0223 100644
--- a/drivers/infiniband/hw/mlx5/mr.c
+++ b/drivers/infiniband/hw/mlx5/mr.c
@@ -825,7 +825,7 @@  static int mr_umem_get(struct ib_pd *pd, u64 start, u64 length,
 			    access_flags, 0);
 	err = PTR_ERR_OR_ZERO(*umem);
 	if (err < 0) {
-		mlx5_ib_err(dev, "umem get failed (%ld)\n", PTR_ERR(umem));
+		mlx5_ib_err(dev, "umem get failed (%d)\n", err);
 		return err;
 	}