diff mbox series

RDMA/rxe: Remove unused 'iova' parameter from rxe_mr_init_user

Message ID 20240201125745.21525-1-guoqing.jiang@linux.dev (mailing list archive)
State Superseded
Headers show
Series RDMA/rxe: Remove unused 'iova' parameter from rxe_mr_init_user | expand

Commit Message

Guoqing Jiang Feb. 1, 2024, 12:57 p.m. UTC
This one is not needed since commit 954afc5a8fd8 ("RDMA/rxe:
Use members of generic struct in rxe_mr").

Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
---
 drivers/infiniband/sw/rxe/rxe_loc.h | 2 +-
 drivers/infiniband/sw/rxe/rxe_mr.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Zhu Yanjun Feb. 2, 2024, 8 a.m. UTC | #1
On Thu, Feb 1, 2024 at 8:58 PM Guoqing Jiang <guoqing.jiang@linux.dev> wrote:
>
> This one is not needed since commit 954afc5a8fd8 ("RDMA/rxe:
> Use members of generic struct in rxe_mr").
>

Thanks.
Acked-by: Zhu Yanjun <zyjzyj2000@gmail.com>

Zhu Yanjun

> Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
> ---
>  drivers/infiniband/sw/rxe/rxe_loc.h | 2 +-
>  drivers/infiniband/sw/rxe/rxe_mr.c  | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/infiniband/sw/rxe/rxe_loc.h b/drivers/infiniband/sw/rxe/rxe_loc.h
> index 4d2a8ef52c85..746110898a0e 100644
> --- a/drivers/infiniband/sw/rxe/rxe_loc.h
> +++ b/drivers/infiniband/sw/rxe/rxe_loc.h
> @@ -59,7 +59,7 @@ int rxe_mmap(struct ib_ucontext *context, struct vm_area_struct *vma);
>  /* rxe_mr.c */
>  u8 rxe_get_next_key(u32 last_key);
>  void rxe_mr_init_dma(int access, struct rxe_mr *mr);
> -int rxe_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length, u64 iova,
> +int rxe_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length,
>                      int access, struct rxe_mr *mr);
>  int rxe_mr_init_fast(int max_pages, struct rxe_mr *mr);
>  int rxe_flush_pmem_iova(struct rxe_mr *mr, u64 iova, unsigned int length);
> diff --git a/drivers/infiniband/sw/rxe/rxe_mr.c b/drivers/infiniband/sw/rxe/rxe_mr.c
> index bc81fde696ee..da3dee520876 100644
> --- a/drivers/infiniband/sw/rxe/rxe_mr.c
> +++ b/drivers/infiniband/sw/rxe/rxe_mr.c
> @@ -126,7 +126,7 @@ static int rxe_mr_fill_pages_from_sgt(struct rxe_mr *mr, struct sg_table *sgt)
>         return xas_error(&xas);
>  }
>
> -int rxe_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length, u64 iova,
> +int rxe_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length,
>                      int access, struct rxe_mr *mr)
>  {
>         struct ib_umem *umem;
> --
> 2.35.3
>
Zhu Yanjun Feb. 2, 2024, 11:49 a.m. UTC | #2
On Thu, Feb 1, 2024 at 8:58 PM Guoqing Jiang <guoqing.jiang@linux.dev> wrote:
>
> This one is not needed since commit 954afc5a8fd8 ("RDMA/rxe:
> Use members of generic struct in rxe_mr").
>
> Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
> ---
>  drivers/infiniband/sw/rxe/rxe_loc.h | 2 +-
>  drivers/infiniband/sw/rxe/rxe_mr.c  | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/infiniband/sw/rxe/rxe_loc.h b/drivers/infiniband/sw/rxe/rxe_loc.h
> index 4d2a8ef52c85..746110898a0e 100644
> --- a/drivers/infiniband/sw/rxe/rxe_loc.h
> +++ b/drivers/infiniband/sw/rxe/rxe_loc.h
> @@ -59,7 +59,7 @@ int rxe_mmap(struct ib_ucontext *context, struct vm_area_struct *vma);
>  /* rxe_mr.c */
>  u8 rxe_get_next_key(u32 last_key);
>  void rxe_mr_init_dma(int access, struct rxe_mr *mr);
> -int rxe_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length, u64 iova,
> +int rxe_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length,
>                      int access, struct rxe_mr *mr);
>  int rxe_mr_init_fast(int max_pages, struct rxe_mr *mr);
>  int rxe_flush_pmem_iova(struct rxe_mr *mr, u64 iova, unsigned int length);
> diff --git a/drivers/infiniband/sw/rxe/rxe_mr.c b/drivers/infiniband/sw/rxe/rxe_mr.c
> index bc81fde696ee..da3dee520876 100644
> --- a/drivers/infiniband/sw/rxe/rxe_mr.c
> +++ b/drivers/infiniband/sw/rxe/rxe_mr.c
> @@ -126,7 +126,7 @@ static int rxe_mr_fill_pages_from_sgt(struct rxe_mr *mr, struct sg_table *sgt)
>         return xas_error(&xas);
>  }
>
> -int rxe_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length, u64 iova,
> +int rxe_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length,
>                      int access, struct rxe_mr *mr)
>  {
>         struct ib_umem *umem;

diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c
b/drivers/infiniband/sw/rxe/rxe_verbs.c
index 48f86839d36a..04427238fcab 100644
--- a/drivers/infiniband/sw/rxe/rxe_verbs.c
+++ b/drivers/infiniband/sw/rxe/rxe_verbs.c
@@ -1278,7 +1278,7 @@ static struct ib_mr *rxe_reg_user_mr(struct
ib_pd *ibpd, u64 start,
        mr->ibmr.pd = ibpd;
        mr->ibmr.device = ibpd->device;

-       err = rxe_mr_init_user(rxe, start, length, iova, access, mr);
+       err = rxe_mr_init_user(rxe, start, length, access, mr);
        if (err) {
                rxe_dbg_mr(mr, "reg_user_mr failed, err = %d", err);
                goto err_cleanup;

Zhu Yanjun
> --
> 2.35.3
>
Zhu Yanjun Feb. 2, 2024, 12:12 p.m. UTC | #3
On Fri, Feb 2, 2024 at 7:49 PM Zhu Yanjun <zyjzyj2000@gmail.com> wrote:
>
> On Thu, Feb 1, 2024 at 8:58 PM Guoqing Jiang <guoqing.jiang@linux.dev> wrote:
> >
> > This one is not needed since commit 954afc5a8fd8 ("RDMA/rxe:
> > Use members of generic struct in rxe_mr").
> >
> > Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
> > ---
> >  drivers/infiniband/sw/rxe/rxe_loc.h | 2 +-
> >  drivers/infiniband/sw/rxe/rxe_mr.c  | 2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/infiniband/sw/rxe/rxe_loc.h b/drivers/infiniband/sw/rxe/rxe_loc.h
> > index 4d2a8ef52c85..746110898a0e 100644
> > --- a/drivers/infiniband/sw/rxe/rxe_loc.h
> > +++ b/drivers/infiniband/sw/rxe/rxe_loc.h
> > @@ -59,7 +59,7 @@ int rxe_mmap(struct ib_ucontext *context, struct vm_area_struct *vma);
> >  /* rxe_mr.c */
> >  u8 rxe_get_next_key(u32 last_key);
> >  void rxe_mr_init_dma(int access, struct rxe_mr *mr);
> > -int rxe_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length, u64 iova,
> > +int rxe_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length,
> >                      int access, struct rxe_mr *mr);
> >  int rxe_mr_init_fast(int max_pages, struct rxe_mr *mr);
> >  int rxe_flush_pmem_iova(struct rxe_mr *mr, u64 iova, unsigned int length);
> > diff --git a/drivers/infiniband/sw/rxe/rxe_mr.c b/drivers/infiniband/sw/rxe/rxe_mr.c
> > index bc81fde696ee..da3dee520876 100644
> > --- a/drivers/infiniband/sw/rxe/rxe_mr.c
> > +++ b/drivers/infiniband/sw/rxe/rxe_mr.c
> > @@ -126,7 +126,7 @@ static int rxe_mr_fill_pages_from_sgt(struct rxe_mr *mr, struct sg_table *sgt)
> >         return xas_error(&xas);
> >  }
> >
> > -int rxe_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length, u64 iova,
> > +int rxe_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length,
> >                      int access, struct rxe_mr *mr)
> >  {
> >         struct ib_umem *umem;
>
> diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c
> b/drivers/infiniband/sw/rxe/rxe_verbs.c
> index 48f86839d36a..04427238fcab 100644
> --- a/drivers/infiniband/sw/rxe/rxe_verbs.c
> +++ b/drivers/infiniband/sw/rxe/rxe_verbs.c
> @@ -1278,7 +1278,7 @@ static struct ib_mr *rxe_reg_user_mr(struct
> ib_pd *ibpd, u64 start,
>         mr->ibmr.pd = ibpd;
>         mr->ibmr.device = ibpd->device;
>
> -       err = rxe_mr_init_user(rxe, start, length, iova, access, mr);
> +       err = rxe_mr_init_user(rxe, start, length, access, mr);
>         if (err) {
>                 rxe_dbg_mr(mr, "reg_user_mr failed, err = %d", err);
>                 goto err_cleanup;
>
Without the above, the following will appear.

drivers/infiniband/sw/rxe/rxe_verbs.c: In function ‘rxe_reg_user_mr’:
drivers/infiniband/sw/rxe/rxe_verbs.c:1281:58: warning: passing
argument 5 of ‘rxe_mr_init_user’ makes pointer from integer without a
cast [-Wint-conversion]
 1281 |         err = rxe_mr_init_user(rxe, start, length, iova, access, mr);
      |                                                          ^~~~~~
      |                                                          |
      |                                                          int
In file included from drivers/infiniband/sw/rxe/rxe.h:31,
                 from drivers/infiniband/sw/rxe/rxe_verbs.c:11:
drivers/infiniband/sw/rxe/rxe_loc.h:63:49: note: expected ‘struct
rxe_mr *’ but argument is of type ‘int’
   63 |                      int access, struct rxe_mr *mr);
      |                                  ~~~~~~~~~~~~~~~^~
drivers/infiniband/sw/rxe/rxe_verbs.c:1281:15: error: too many
arguments to function ‘rxe_mr_init_user’
 1281 |         err = rxe_mr_init_user(rxe, start, length, iova, access, mr);
      |               ^~~~~~~~~~~~~~~~
drivers/infiniband/sw/rxe/rxe_loc.h:62:5: note: declared here
   62 | int rxe_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length,
      |     ^~~~~~~~~~~~~~~~
make[6]: *** [scripts/Makefile.build:243:
drivers/infiniband/sw/rxe/rxe_verbs.o] Error 1
make[6]: *** Waiting for unfinished jobs....
make[5]: *** [scripts/Makefile.build:480: drivers/infiniband/sw/rxe] Error 2
make[4]: *** [scripts/Makefile.build:480: drivers/infiniband/sw] Error 2
make[3]: *** [scripts/Makefile.build:480: drivers/infiniband] Error 2
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [scripts/Makefile.build:480: drivers] Error 2
make[1]: *** [/images/upstream-linux/Makefile:1911: .] Error 2
make: *** [Makefile:234: __sub-make] Error 2

Zhu Yanjun

> Zhu Yanjun
> > --
> > 2.35.3
> >
Guoqing Jiang Feb. 2, 2024, 12:24 p.m. UTC | #4
On 2/2/24 19:49, Zhu Yanjun wrote:
> On Thu, Feb 1, 2024 at 8:58 PM Guoqing Jiang <guoqing.jiang@linux.dev> wrote:
>> This one is not needed since commit 954afc5a8fd8 ("RDMA/rxe:
>> Use members of generic struct in rxe_mr").
>>
>> Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
>> ---
>>   drivers/infiniband/sw/rxe/rxe_loc.h | 2 +-
>>   drivers/infiniband/sw/rxe/rxe_mr.c  | 2 +-
>>   2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/infiniband/sw/rxe/rxe_loc.h b/drivers/infiniband/sw/rxe/rxe_loc.h
>> index 4d2a8ef52c85..746110898a0e 100644
>> --- a/drivers/infiniband/sw/rxe/rxe_loc.h
>> +++ b/drivers/infiniband/sw/rxe/rxe_loc.h
>> @@ -59,7 +59,7 @@ int rxe_mmap(struct ib_ucontext *context, struct vm_area_struct *vma);
>>   /* rxe_mr.c */
>>   u8 rxe_get_next_key(u32 last_key);
>>   void rxe_mr_init_dma(int access, struct rxe_mr *mr);
>> -int rxe_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length, u64 iova,
>> +int rxe_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length,
>>                       int access, struct rxe_mr *mr);
>>   int rxe_mr_init_fast(int max_pages, struct rxe_mr *mr);
>>   int rxe_flush_pmem_iova(struct rxe_mr *mr, u64 iova, unsigned int length);
>> diff --git a/drivers/infiniband/sw/rxe/rxe_mr.c b/drivers/infiniband/sw/rxe/rxe_mr.c
>> index bc81fde696ee..da3dee520876 100644
>> --- a/drivers/infiniband/sw/rxe/rxe_mr.c
>> +++ b/drivers/infiniband/sw/rxe/rxe_mr.c
>> @@ -126,7 +126,7 @@ static int rxe_mr_fill_pages_from_sgt(struct rxe_mr *mr, struct sg_table *sgt)
>>          return xas_error(&xas);
>>   }
>>
>> -int rxe_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length, u64 iova,
>> +int rxe_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length,
>>                       int access, struct rxe_mr *mr)
>>   {
>>          struct ib_umem *umem;
> diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c
> b/drivers/infiniband/sw/rxe/rxe_verbs.c
> index 48f86839d36a..04427238fcab 100644
> --- a/drivers/infiniband/sw/rxe/rxe_verbs.c
> +++ b/drivers/infiniband/sw/rxe/rxe_verbs.c
> @@ -1278,7 +1278,7 @@ static struct ib_mr *rxe_reg_user_mr(struct
> ib_pd *ibpd, u64 start,
>          mr->ibmr.pd = ibpd;
>          mr->ibmr.device = ibpd->device;
>
> -       err = rxe_mr_init_user(rxe, start, length, iova, access, mr);
> +       err = rxe_mr_init_user(rxe, start, length, access, mr);
>          if (err) {
>                  rxe_dbg_mr(mr, "reg_user_mr failed, err = %d", err);
>                  goto err_cleanup;

Oops, my mistake, will add above in v2.

Thanks,
Guoqing
diff mbox series

Patch

diff --git a/drivers/infiniband/sw/rxe/rxe_loc.h b/drivers/infiniband/sw/rxe/rxe_loc.h
index 4d2a8ef52c85..746110898a0e 100644
--- a/drivers/infiniband/sw/rxe/rxe_loc.h
+++ b/drivers/infiniband/sw/rxe/rxe_loc.h
@@ -59,7 +59,7 @@  int rxe_mmap(struct ib_ucontext *context, struct vm_area_struct *vma);
 /* rxe_mr.c */
 u8 rxe_get_next_key(u32 last_key);
 void rxe_mr_init_dma(int access, struct rxe_mr *mr);
-int rxe_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length, u64 iova,
+int rxe_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length,
 		     int access, struct rxe_mr *mr);
 int rxe_mr_init_fast(int max_pages, struct rxe_mr *mr);
 int rxe_flush_pmem_iova(struct rxe_mr *mr, u64 iova, unsigned int length);
diff --git a/drivers/infiniband/sw/rxe/rxe_mr.c b/drivers/infiniband/sw/rxe/rxe_mr.c
index bc81fde696ee..da3dee520876 100644
--- a/drivers/infiniband/sw/rxe/rxe_mr.c
+++ b/drivers/infiniband/sw/rxe/rxe_mr.c
@@ -126,7 +126,7 @@  static int rxe_mr_fill_pages_from_sgt(struct rxe_mr *mr, struct sg_table *sgt)
 	return xas_error(&xas);
 }
 
-int rxe_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length, u64 iova,
+int rxe_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length,
 		     int access, struct rxe_mr *mr)
 {
 	struct ib_umem *umem;