diff mbox

IB/mlx5: Fix a warning message

Message ID 20170614091556.GF29394@elgon.mountain (mailing list archive)
State Superseded
Headers show

Commit Message

Dan Carpenter June 14, 2017, 9:15 a.m. UTC
"umem" is a valid pointer.  We intended to print "*umem" instead.

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

--
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

Matan Barak June 14, 2017, 9:19 a.m. UTC | #1
On Wed, Jun 14, 2017 at 12:15 PM, Dan Carpenter
<dan.carpenter@oracle.com> wrote:
> "umem" is a valid pointer.  We intended to print "*umem" instead.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c
> index 763bb5b36144..86af54b0e414 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 (%ld)\n", PTR_ERR(*umem));

I think it's better just to print err :)

>                 return err;
>         }
>

Thanks,
Matan

> --
> 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
--
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
Dan Carpenter June 14, 2017, 9:52 a.m. UTC | #2
On Wed, Jun 14, 2017 at 12:19:57PM +0300, Matan Barak wrote:
> On Wed, Jun 14, 2017 at 12:15 PM, Dan Carpenter
> <dan.carpenter@oracle.com> wrote:
> > "umem" is a valid pointer.  We intended to print "*umem" instead.
> >
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> >
> > diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c
> > index 763bb5b36144..86af54b0e414 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 (%ld)\n", PTR_ERR(*umem));
> 
> I think it's better just to print err :)
> 

I don't understand what you're saying.

regards,
dan carpenter

--
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
Matan Barak June 14, 2017, 9:57 a.m. UTC | #3
On Wed, Jun 14, 2017 at 12:52 PM, Dan Carpenter
<dan.carpenter@oracle.com> wrote:
> On Wed, Jun 14, 2017 at 12:19:57PM +0300, Matan Barak wrote:
>> On Wed, Jun 14, 2017 at 12:15 PM, Dan Carpenter
>> <dan.carpenter@oracle.com> wrote:
>> > "umem" is a valid pointer.  We intended to print "*umem" instead.
>> >
>> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>> >
>> > diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c
>> > index 763bb5b36144..86af54b0e414 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 (%ld)\n", PTR_ERR(*umem));
>>
>> I think it's better just to print err :)
>>
>
> I don't understand what you're saying.
>

mlx5_ib_err(dev, "umem get failed (%d)\n", err);

> regards,
> dan carpenter
>

Thanks,
Matan
--
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
diff mbox

Patch

diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c
index 763bb5b36144..86af54b0e414 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 (%ld)\n", PTR_ERR(*umem));
 		return err;
 	}