linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] IB/rxe: remove redudant parameter in function
@ 2018-01-30  7:07 Zhu Yanjun
       [not found] ` <1517296074-14459-1-git-send-email-yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 16+ messages in thread
From: Zhu Yanjun @ 2018-01-30  7:07 UTC (permalink / raw)
  To: monis-VPRAkNaXOzVWk0Htik3J/w, dledford-H+wXaHxf7aLQT0dZR+AlfA,
	jgg-uk2M96/98Pc, linux-rdma-u79uwXL29TY76Z2rM5mHXA

In the function rxe_av_from_attr, the parameter rxe
is not used. So it is removed.

CC: Srinivas Eeda <srinivas.eeda-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
CC: Junxiao Bi <junxiao.bi-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Zhu Yanjun <yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
---
 drivers/infiniband/sw/rxe/rxe_av.c    | 4 ++--
 drivers/infiniband/sw/rxe/rxe_loc.h   | 4 ++--
 drivers/infiniband/sw/rxe/rxe_qp.c    | 5 ++---
 drivers/infiniband/sw/rxe/rxe_verbs.c | 2 +-
 4 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_av.c b/drivers/infiniband/sw/rxe/rxe_av.c
index 1cc9e2e..8accd5d 100644
--- a/drivers/infiniband/sw/rxe/rxe_av.c
+++ b/drivers/infiniband/sw/rxe/rxe_av.c
@@ -52,8 +52,8 @@ int rxe_av_chk_attr(struct rxe_dev *rxe, struct rdma_ah_attr *attr)
 	return 0;
 }
 
-int rxe_av_from_attr(struct rxe_dev *rxe, u8 port_num,
-		     struct rxe_av *av, struct rdma_ah_attr *attr)
+int rxe_av_from_attr(u8 port_num, struct rxe_av *av,
+		     struct rdma_ah_attr *attr)
 {
 	memset(av, 0, sizeof(*av));
 	memcpy(&av->grh, rdma_ah_read_grh(attr),
diff --git a/drivers/infiniband/sw/rxe/rxe_loc.h b/drivers/infiniband/sw/rxe/rxe_loc.h
index d7472a4..4eb0ff1 100644
--- a/drivers/infiniband/sw/rxe/rxe_loc.h
+++ b/drivers/infiniband/sw/rxe/rxe_loc.h
@@ -38,8 +38,8 @@
 
 int rxe_av_chk_attr(struct rxe_dev *rxe, struct rdma_ah_attr *attr);
 
-int rxe_av_from_attr(struct rxe_dev *rxe, u8 port_num,
-		     struct rxe_av *av, struct rdma_ah_attr *attr);
+int rxe_av_from_attr(u8 port_num, struct rxe_av *av,
+		     struct rdma_ah_attr *attr);
 
 int rxe_av_to_attr(struct rxe_dev *rxe, struct rxe_av *av,
 		   struct rdma_ah_attr *attr);
diff --git a/drivers/infiniband/sw/rxe/rxe_qp.c b/drivers/infiniband/sw/rxe/rxe_qp.c
index 4469592..11655a0 100644
--- a/drivers/infiniband/sw/rxe/rxe_qp.c
+++ b/drivers/infiniband/sw/rxe/rxe_qp.c
@@ -633,8 +633,7 @@ int rxe_qp_from_attr(struct rxe_qp *qp, struct ib_qp_attr *attr, int mask,
 		ib_get_cached_gid(&rxe->ib_dev, 1,
 				  rdma_ah_read_grh(&attr->ah_attr)->sgid_index,
 				  &sgid, &sgid_attr);
-		rxe_av_from_attr(rxe, attr->port_num, &qp->pri_av,
-				 &attr->ah_attr);
+		rxe_av_from_attr(attr->port_num, &qp->pri_av, &attr->ah_attr);
 		rxe_av_fill_ip_info(rxe, &qp->pri_av, &attr->ah_attr,
 				    &sgid_attr, &sgid);
 		if (sgid_attr.ndev)
@@ -648,7 +647,7 @@ int rxe_qp_from_attr(struct rxe_qp *qp, struct ib_qp_attr *attr, int mask,
 		ib_get_cached_gid(&rxe->ib_dev, 1, sgid_index,
 				  &sgid, &sgid_attr);
 
-		rxe_av_from_attr(rxe, attr->alt_port_num, &qp->alt_av,
+		rxe_av_from_attr(attr->alt_port_num, &qp->alt_av,
 				 &attr->alt_ah_attr);
 		rxe_av_fill_ip_info(rxe, &qp->alt_av, &attr->alt_ah_attr,
 				    &sgid_attr, &sgid);
diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c
index d03002b..abbc983 100644
--- a/drivers/infiniband/sw/rxe/rxe_verbs.c
+++ b/drivers/infiniband/sw/rxe/rxe_verbs.c
@@ -271,7 +271,7 @@ static int rxe_init_av(struct rxe_dev *rxe, struct rdma_ah_attr *attr,
 		return err;
 	}
 
-	err = rxe_av_from_attr(rxe, rdma_ah_get_port_num(attr), av, attr);
+	err = rxe_av_from_attr(rdma_ah_get_port_num(attr), av, attr);
 	if (!err)
 		err = rxe_av_fill_ip_info(rxe, av, attr, &sgid_attr, &sgid);
 
-- 
2.7.4

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

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/1] IB/rxe: remove redudant parameter in function
       [not found] ` <1517296074-14459-1-git-send-email-yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
@ 2018-01-30  7:27   ` Leon Romanovsky
  2018-01-30  7:30   ` Yuval Shaia
  1 sibling, 0 replies; 16+ messages in thread
From: Leon Romanovsky @ 2018-01-30  7:27 UTC (permalink / raw)
  To: Zhu Yanjun
  Cc: monis-VPRAkNaXOzVWk0Htik3J/w, dledford-H+wXaHxf7aLQT0dZR+AlfA,
	jgg-uk2M96/98Pc, linux-rdma-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 885 bytes --]

On Tue, Jan 30, 2018 at 02:07:54AM -0500, Zhu Yanjun wrote:
> In the function rxe_av_from_attr, the parameter rxe
> is not used. So it is removed.
>
> CC: Srinivas Eeda <srinivas.eeda-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> CC: Junxiao Bi <junxiao.bi-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Zhu Yanjun <yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> ---
>  drivers/infiniband/sw/rxe/rxe_av.c    | 4 ++--
>  drivers/infiniband/sw/rxe/rxe_loc.h   | 4 ++--
>  drivers/infiniband/sw/rxe/rxe_qp.c    | 5 ++---
>  drivers/infiniband/sw/rxe/rxe_verbs.c | 2 +-
>  4 files changed, 7 insertions(+), 8 deletions(-)

Thanks, while you are doing that, can you please change the function
signature to be void? And do the same trick for rxe_av_fill_ip_info(),
it doesn't use rxe too.

Reviewed-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

Thanks

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/1] IB/rxe: remove redudant parameter in function
       [not found] ` <1517296074-14459-1-git-send-email-yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
  2018-01-30  7:27   ` Leon Romanovsky
@ 2018-01-30  7:30   ` Yuval Shaia
  2018-01-31 11:06     ` [PATCH 0/6] Trivial patches for SoftRoCE Zhu Yanjun
  1 sibling, 1 reply; 16+ messages in thread
From: Yuval Shaia @ 2018-01-30  7:30 UTC (permalink / raw)
  To: Zhu Yanjun
  Cc: monis-VPRAkNaXOzVWk0Htik3J/w, dledford-H+wXaHxf7aLQT0dZR+AlfA,
	jgg-uk2M96/98Pc, linux-rdma-u79uwXL29TY76Z2rM5mHXA

On Tue, Jan 30, 2018 at 02:07:54AM -0500, Zhu Yanjun wrote:
> In the function rxe_av_from_attr, the parameter rxe
> is not used. So it is removed.

Looks like it is also not used in rxe_av_to_attr and rxe_av_fill_ip_info.
Can you fix them as well?

> 
> CC: Srinivas Eeda <srinivas.eeda-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> CC: Junxiao Bi <junxiao.bi-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Zhu Yanjun <yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> ---
>  drivers/infiniband/sw/rxe/rxe_av.c    | 4 ++--
>  drivers/infiniband/sw/rxe/rxe_loc.h   | 4 ++--
>  drivers/infiniband/sw/rxe/rxe_qp.c    | 5 ++---
>  drivers/infiniband/sw/rxe/rxe_verbs.c | 2 +-
>  4 files changed, 7 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/infiniband/sw/rxe/rxe_av.c b/drivers/infiniband/sw/rxe/rxe_av.c
> index 1cc9e2e..8accd5d 100644
> --- a/drivers/infiniband/sw/rxe/rxe_av.c
> +++ b/drivers/infiniband/sw/rxe/rxe_av.c
> @@ -52,8 +52,8 @@ int rxe_av_chk_attr(struct rxe_dev *rxe, struct rdma_ah_attr *attr)
>  	return 0;
>  }
>  
> -int rxe_av_from_attr(struct rxe_dev *rxe, u8 port_num,
> -		     struct rxe_av *av, struct rdma_ah_attr *attr)
> +int rxe_av_from_attr(u8 port_num, struct rxe_av *av,
> +		     struct rdma_ah_attr *attr)
>  {
>  	memset(av, 0, sizeof(*av));
>  	memcpy(&av->grh, rdma_ah_read_grh(attr),
> diff --git a/drivers/infiniband/sw/rxe/rxe_loc.h b/drivers/infiniband/sw/rxe/rxe_loc.h
> index d7472a4..4eb0ff1 100644
> --- a/drivers/infiniband/sw/rxe/rxe_loc.h
> +++ b/drivers/infiniband/sw/rxe/rxe_loc.h
> @@ -38,8 +38,8 @@
>  
>  int rxe_av_chk_attr(struct rxe_dev *rxe, struct rdma_ah_attr *attr);
>  
> -int rxe_av_from_attr(struct rxe_dev *rxe, u8 port_num,
> -		     struct rxe_av *av, struct rdma_ah_attr *attr);
> +int rxe_av_from_attr(u8 port_num, struct rxe_av *av,
> +		     struct rdma_ah_attr *attr);
>  
>  int rxe_av_to_attr(struct rxe_dev *rxe, struct rxe_av *av,
>  		   struct rdma_ah_attr *attr);
> diff --git a/drivers/infiniband/sw/rxe/rxe_qp.c b/drivers/infiniband/sw/rxe/rxe_qp.c
> index 4469592..11655a0 100644
> --- a/drivers/infiniband/sw/rxe/rxe_qp.c
> +++ b/drivers/infiniband/sw/rxe/rxe_qp.c
> @@ -633,8 +633,7 @@ int rxe_qp_from_attr(struct rxe_qp *qp, struct ib_qp_attr *attr, int mask,
>  		ib_get_cached_gid(&rxe->ib_dev, 1,
>  				  rdma_ah_read_grh(&attr->ah_attr)->sgid_index,
>  				  &sgid, &sgid_attr);
> -		rxe_av_from_attr(rxe, attr->port_num, &qp->pri_av,
> -				 &attr->ah_attr);
> +		rxe_av_from_attr(attr->port_num, &qp->pri_av, &attr->ah_attr);
>  		rxe_av_fill_ip_info(rxe, &qp->pri_av, &attr->ah_attr,
>  				    &sgid_attr, &sgid);
>  		if (sgid_attr.ndev)
> @@ -648,7 +647,7 @@ int rxe_qp_from_attr(struct rxe_qp *qp, struct ib_qp_attr *attr, int mask,
>  		ib_get_cached_gid(&rxe->ib_dev, 1, sgid_index,
>  				  &sgid, &sgid_attr);
>  
> -		rxe_av_from_attr(rxe, attr->alt_port_num, &qp->alt_av,
> +		rxe_av_from_attr(attr->alt_port_num, &qp->alt_av,
>  				 &attr->alt_ah_attr);
>  		rxe_av_fill_ip_info(rxe, &qp->alt_av, &attr->alt_ah_attr,
>  				    &sgid_attr, &sgid);
> diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c
> index d03002b..abbc983 100644
> --- a/drivers/infiniband/sw/rxe/rxe_verbs.c
> +++ b/drivers/infiniband/sw/rxe/rxe_verbs.c
> @@ -271,7 +271,7 @@ static int rxe_init_av(struct rxe_dev *rxe, struct rdma_ah_attr *attr,
>  		return err;
>  	}
>  
> -	err = rxe_av_from_attr(rxe, rdma_ah_get_port_num(attr), av, attr);
> +	err = rxe_av_from_attr(rdma_ah_get_port_num(attr), av, attr);
>  	if (!err)
>  		err = rxe_av_fill_ip_info(rxe, av, attr, &sgid_attr, &sgid);
>  
> -- 
> 2.7.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 0/6] Trivial patches for SoftRoCE
  2018-01-30  7:30   ` Yuval Shaia
@ 2018-01-31 11:06     ` Zhu Yanjun
       [not found]       ` <1517396819-29597-1-git-send-email-yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 16+ messages in thread
From: Zhu Yanjun @ 2018-01-31 11:06 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA, jgg-uk2M96/98Pc,
	dledford-H+wXaHxf7aLQT0dZR+AlfA, monis-VPRAkNaXOzVWk0Htik3J/w,
	yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA, leon-DgEjT+Ai2ygdnm+yROfE0A

Follow advice from Yuval and Leon, to the functions rxe_av_chk_attr,
rxe_av_to_attr and rxe_av_fill_ip_info, the unnecessary parameter
are removed and the funtion type are changed to void.

To track the changes to these functions, every change is made
to a single patch.

Zhu Yanjun (6):
  IB/rxe: remove redudant parameter in function
  IB/rxe: change the function to void from int
  IB/rxe: remove unnecessary parameter in rxe_av_to_attr
  IB/rxe: change the function to void from int
  IB/rxe: change the function rxe_av_fill_ip_info to void
  IB/rxe: remove redudant parameter in rxe_av_fill_ip_info

 drivers/infiniband/sw/rxe/rxe_av.c    | 14 ++++----------
 drivers/infiniband/sw/rxe/rxe_loc.h   | 10 ++++------
 drivers/infiniband/sw/rxe/rxe_qp.c    | 15 ++++++---------
 drivers/infiniband/sw/rxe/rxe_verbs.c | 10 ++++------
 4 files changed, 18 insertions(+), 31 deletions(-)

-- 
2.7.4

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/6] IB/rxe: remove redudant parameter in function
       [not found]       ` <1517396819-29597-1-git-send-email-yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
@ 2018-01-31 11:06         ` Zhu Yanjun
       [not found]           ` <1517396819-29597-2-git-send-email-yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
  2018-01-31 11:06         ` [PATCH 2/6] IB/rxe: change the function to void from int Zhu Yanjun
                           ` (5 subsequent siblings)
  6 siblings, 1 reply; 16+ messages in thread
From: Zhu Yanjun @ 2018-01-31 11:06 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA, jgg-uk2M96/98Pc,
	dledford-H+wXaHxf7aLQT0dZR+AlfA, monis-VPRAkNaXOzVWk0Htik3J/w,
	yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA, leon-DgEjT+Ai2ygdnm+yROfE0A

In the function rxe_av_from_attr, the parameter rxe
is not used. So it is removed.

CC: Srinivas Eeda <srinivas.eeda-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
CC: Junxiao Bi <junxiao.bi-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Zhu Yanjun <yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
---
 drivers/infiniband/sw/rxe/rxe_av.c    | 4 ++--
 drivers/infiniband/sw/rxe/rxe_loc.h   | 4 ++--
 drivers/infiniband/sw/rxe/rxe_qp.c    | 5 ++---
 drivers/infiniband/sw/rxe/rxe_verbs.c | 2 +-
 4 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_av.c b/drivers/infiniband/sw/rxe/rxe_av.c
index 1cc9e2e..8accd5d 100644
--- a/drivers/infiniband/sw/rxe/rxe_av.c
+++ b/drivers/infiniband/sw/rxe/rxe_av.c
@@ -52,8 +52,8 @@ int rxe_av_chk_attr(struct rxe_dev *rxe, struct rdma_ah_attr *attr)
 	return 0;
 }
 
-int rxe_av_from_attr(struct rxe_dev *rxe, u8 port_num,
-		     struct rxe_av *av, struct rdma_ah_attr *attr)
+int rxe_av_from_attr(u8 port_num, struct rxe_av *av,
+		     struct rdma_ah_attr *attr)
 {
 	memset(av, 0, sizeof(*av));
 	memcpy(&av->grh, rdma_ah_read_grh(attr),
diff --git a/drivers/infiniband/sw/rxe/rxe_loc.h b/drivers/infiniband/sw/rxe/rxe_loc.h
index d7472a4..4eb0ff1 100644
--- a/drivers/infiniband/sw/rxe/rxe_loc.h
+++ b/drivers/infiniband/sw/rxe/rxe_loc.h
@@ -38,8 +38,8 @@
 
 int rxe_av_chk_attr(struct rxe_dev *rxe, struct rdma_ah_attr *attr);
 
-int rxe_av_from_attr(struct rxe_dev *rxe, u8 port_num,
-		     struct rxe_av *av, struct rdma_ah_attr *attr);
+int rxe_av_from_attr(u8 port_num, struct rxe_av *av,
+		     struct rdma_ah_attr *attr);
 
 int rxe_av_to_attr(struct rxe_dev *rxe, struct rxe_av *av,
 		   struct rdma_ah_attr *attr);
diff --git a/drivers/infiniband/sw/rxe/rxe_qp.c b/drivers/infiniband/sw/rxe/rxe_qp.c
index 4469592..11655a0 100644
--- a/drivers/infiniband/sw/rxe/rxe_qp.c
+++ b/drivers/infiniband/sw/rxe/rxe_qp.c
@@ -633,8 +633,7 @@ int rxe_qp_from_attr(struct rxe_qp *qp, struct ib_qp_attr *attr, int mask,
 		ib_get_cached_gid(&rxe->ib_dev, 1,
 				  rdma_ah_read_grh(&attr->ah_attr)->sgid_index,
 				  &sgid, &sgid_attr);
-		rxe_av_from_attr(rxe, attr->port_num, &qp->pri_av,
-				 &attr->ah_attr);
+		rxe_av_from_attr(attr->port_num, &qp->pri_av, &attr->ah_attr);
 		rxe_av_fill_ip_info(rxe, &qp->pri_av, &attr->ah_attr,
 				    &sgid_attr, &sgid);
 		if (sgid_attr.ndev)
@@ -648,7 +647,7 @@ int rxe_qp_from_attr(struct rxe_qp *qp, struct ib_qp_attr *attr, int mask,
 		ib_get_cached_gid(&rxe->ib_dev, 1, sgid_index,
 				  &sgid, &sgid_attr);
 
-		rxe_av_from_attr(rxe, attr->alt_port_num, &qp->alt_av,
+		rxe_av_from_attr(attr->alt_port_num, &qp->alt_av,
 				 &attr->alt_ah_attr);
 		rxe_av_fill_ip_info(rxe, &qp->alt_av, &attr->alt_ah_attr,
 				    &sgid_attr, &sgid);
diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c
index d03002b..abbc983 100644
--- a/drivers/infiniband/sw/rxe/rxe_verbs.c
+++ b/drivers/infiniband/sw/rxe/rxe_verbs.c
@@ -271,7 +271,7 @@ static int rxe_init_av(struct rxe_dev *rxe, struct rdma_ah_attr *attr,
 		return err;
 	}
 
-	err = rxe_av_from_attr(rxe, rdma_ah_get_port_num(attr), av, attr);
+	err = rxe_av_from_attr(rdma_ah_get_port_num(attr), av, attr);
 	if (!err)
 		err = rxe_av_fill_ip_info(rxe, av, attr, &sgid_attr, &sgid);
 
-- 
2.7.4

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

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 2/6] IB/rxe: change the function to void from int
       [not found]       ` <1517396819-29597-1-git-send-email-yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
  2018-01-31 11:06         ` [PATCH 1/6] IB/rxe: remove redudant parameter in function Zhu Yanjun
@ 2018-01-31 11:06         ` Zhu Yanjun
       [not found]           ` <1517396819-29597-3-git-send-email-yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
  2018-01-31 11:06         ` [PATCH 3/6] IB/rxe: remove unnecessary parameter in rxe_av_to_attr Zhu Yanjun
                           ` (4 subsequent siblings)
  6 siblings, 1 reply; 16+ messages in thread
From: Zhu Yanjun @ 2018-01-31 11:06 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA, jgg-uk2M96/98Pc,
	dledford-H+wXaHxf7aLQT0dZR+AlfA, monis-VPRAkNaXOzVWk0Htik3J/w,
	yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA, leon-DgEjT+Ai2ygdnm+yROfE0A

The function rxe_av_from_attr always return 0. So change the
function to void.

CC: Srinivas Eeda <srinivas.eeda-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
CC: Junxiao Bi <junxiao.bi-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Zhu Yanjun <yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
---
 drivers/infiniband/sw/rxe/rxe_av.c    | 3 +--
 drivers/infiniband/sw/rxe/rxe_loc.h   | 2 +-
 drivers/infiniband/sw/rxe/rxe_verbs.c | 5 ++---
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_av.c b/drivers/infiniband/sw/rxe/rxe_av.c
index 8accd5d..11e7bed 100644
--- a/drivers/infiniband/sw/rxe/rxe_av.c
+++ b/drivers/infiniband/sw/rxe/rxe_av.c
@@ -52,14 +52,13 @@ int rxe_av_chk_attr(struct rxe_dev *rxe, struct rdma_ah_attr *attr)
 	return 0;
 }
 
-int rxe_av_from_attr(u8 port_num, struct rxe_av *av,
+void rxe_av_from_attr(u8 port_num, struct rxe_av *av,
 		     struct rdma_ah_attr *attr)
 {
 	memset(av, 0, sizeof(*av));
 	memcpy(&av->grh, rdma_ah_read_grh(attr),
 	       sizeof(*rdma_ah_read_grh(attr)));
 	av->port_num = port_num;
-	return 0;
 }
 
 int rxe_av_to_attr(struct rxe_dev *rxe, struct rxe_av *av,
diff --git a/drivers/infiniband/sw/rxe/rxe_loc.h b/drivers/infiniband/sw/rxe/rxe_loc.h
index 4eb0ff1..ba25c81 100644
--- a/drivers/infiniband/sw/rxe/rxe_loc.h
+++ b/drivers/infiniband/sw/rxe/rxe_loc.h
@@ -38,7 +38,7 @@
 
 int rxe_av_chk_attr(struct rxe_dev *rxe, struct rdma_ah_attr *attr);
 
-int rxe_av_from_attr(u8 port_num, struct rxe_av *av,
+void rxe_av_from_attr(u8 port_num, struct rxe_av *av,
 		     struct rdma_ah_attr *attr);
 
 int rxe_av_to_attr(struct rxe_dev *rxe, struct rxe_av *av,
diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c
index abbc983..1cc8e0b 100644
--- a/drivers/infiniband/sw/rxe/rxe_verbs.c
+++ b/drivers/infiniband/sw/rxe/rxe_verbs.c
@@ -271,9 +271,8 @@ static int rxe_init_av(struct rxe_dev *rxe, struct rdma_ah_attr *attr,
 		return err;
 	}
 
-	err = rxe_av_from_attr(rdma_ah_get_port_num(attr), av, attr);
-	if (!err)
-		err = rxe_av_fill_ip_info(rxe, av, attr, &sgid_attr, &sgid);
+	rxe_av_from_attr(rdma_ah_get_port_num(attr), av, attr);
+	err = rxe_av_fill_ip_info(rxe, av, attr, &sgid_attr, &sgid);
 
 	if (sgid_attr.ndev)
 		dev_put(sgid_attr.ndev);
-- 
2.7.4

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

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 3/6] IB/rxe: remove unnecessary parameter in rxe_av_to_attr
       [not found]       ` <1517396819-29597-1-git-send-email-yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
  2018-01-31 11:06         ` [PATCH 1/6] IB/rxe: remove redudant parameter in function Zhu Yanjun
  2018-01-31 11:06         ` [PATCH 2/6] IB/rxe: change the function to void from int Zhu Yanjun
@ 2018-01-31 11:06         ` Zhu Yanjun
       [not found]           ` <1517396819-29597-4-git-send-email-yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
  2018-01-31 11:06         ` [PATCH 4/6] IB/rxe: change the function to void from int Zhu Yanjun
                           ` (3 subsequent siblings)
  6 siblings, 1 reply; 16+ messages in thread
From: Zhu Yanjun @ 2018-01-31 11:06 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA, jgg-uk2M96/98Pc,
	dledford-H+wXaHxf7aLQT0dZR+AlfA, monis-VPRAkNaXOzVWk0Htik3J/w,
	yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA, leon-DgEjT+Ai2ygdnm+yROfE0A

In the function rxe_av_to_attr, the parameter rxe is
not used. So it is removed.

CC: Srinivas Eeda <srinivas.eeda-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
CC: Junxiao Bi <junxiao.bi-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Zhu Yanjun <yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
---
 drivers/infiniband/sw/rxe/rxe_av.c    | 3 +--
 drivers/infiniband/sw/rxe/rxe_loc.h   | 3 +--
 drivers/infiniband/sw/rxe/rxe_qp.c    | 6 ++----
 drivers/infiniband/sw/rxe/rxe_verbs.c | 3 +--
 4 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_av.c b/drivers/infiniband/sw/rxe/rxe_av.c
index 11e7bed..26ed069 100644
--- a/drivers/infiniband/sw/rxe/rxe_av.c
+++ b/drivers/infiniband/sw/rxe/rxe_av.c
@@ -61,8 +61,7 @@ void rxe_av_from_attr(u8 port_num, struct rxe_av *av,
 	av->port_num = port_num;
 }
 
-int rxe_av_to_attr(struct rxe_dev *rxe, struct rxe_av *av,
-		   struct rdma_ah_attr *attr)
+int rxe_av_to_attr(struct rxe_av *av, struct rdma_ah_attr *attr)
 {
 	attr->type = RDMA_AH_ATTR_TYPE_ROCE;
 	memcpy(rdma_ah_retrieve_grh(attr), &av->grh, sizeof(av->grh));
diff --git a/drivers/infiniband/sw/rxe/rxe_loc.h b/drivers/infiniband/sw/rxe/rxe_loc.h
index ba25c81..ef8da26 100644
--- a/drivers/infiniband/sw/rxe/rxe_loc.h
+++ b/drivers/infiniband/sw/rxe/rxe_loc.h
@@ -41,8 +41,7 @@ int rxe_av_chk_attr(struct rxe_dev *rxe, struct rdma_ah_attr *attr);
 void rxe_av_from_attr(u8 port_num, struct rxe_av *av,
 		     struct rdma_ah_attr *attr);
 
-int rxe_av_to_attr(struct rxe_dev *rxe, struct rxe_av *av,
-		   struct rdma_ah_attr *attr);
+int rxe_av_to_attr(struct rxe_av *av, struct rdma_ah_attr *attr);
 
 int rxe_av_fill_ip_info(struct rxe_dev *rxe,
 			struct rxe_av *av,
diff --git a/drivers/infiniband/sw/rxe/rxe_qp.c b/drivers/infiniband/sw/rxe/rxe_qp.c
index 11655a0..5a2d339 100644
--- a/drivers/infiniband/sw/rxe/rxe_qp.c
+++ b/drivers/infiniband/sw/rxe/rxe_qp.c
@@ -764,8 +764,6 @@ int rxe_qp_from_attr(struct rxe_qp *qp, struct ib_qp_attr *attr, int mask,
 /* called by the query qp verb */
 int rxe_qp_to_attr(struct rxe_qp *qp, struct ib_qp_attr *attr, int mask)
 {
-	struct rxe_dev *rxe = to_rdev(qp->ibqp.device);
-
 	*attr = qp->attr;
 
 	attr->rq_psn				= qp->resp.psn;
@@ -780,8 +778,8 @@ int rxe_qp_to_attr(struct rxe_qp *qp, struct ib_qp_attr *attr, int mask)
 		attr->cap.max_recv_sge		= qp->rq.max_sge;
 	}
 
-	rxe_av_to_attr(rxe, &qp->pri_av, &attr->ah_attr);
-	rxe_av_to_attr(rxe, &qp->alt_av, &attr->alt_ah_attr);
+	rxe_av_to_attr(&qp->pri_av, &attr->ah_attr);
+	rxe_av_to_attr(&qp->alt_av, &attr->alt_ah_attr);
 
 	if (qp->req.state == QP_STATE_DRAIN) {
 		attr->sq_draining = 1;
diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c
index 1cc8e0b..ccb5721 100644
--- a/drivers/infiniband/sw/rxe/rxe_verbs.c
+++ b/drivers/infiniband/sw/rxe/rxe_verbs.c
@@ -334,12 +334,11 @@ static int rxe_modify_ah(struct ib_ah *ibah, struct rdma_ah_attr *attr)
 
 static int rxe_query_ah(struct ib_ah *ibah, struct rdma_ah_attr *attr)
 {
-	struct rxe_dev *rxe = to_rdev(ibah->device);
 	struct rxe_ah *ah = to_rah(ibah);
 
 	memset(attr, 0, sizeof(*attr));
 	attr->type = ibah->type;
-	rxe_av_to_attr(rxe, &ah->av, attr);
+	rxe_av_to_attr(&ah->av, attr);
 	return 0;
 }
 
-- 
2.7.4

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

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 4/6] IB/rxe: change the function to void from int
       [not found]       ` <1517396819-29597-1-git-send-email-yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
                           ` (2 preceding siblings ...)
  2018-01-31 11:06         ` [PATCH 3/6] IB/rxe: remove unnecessary parameter in rxe_av_to_attr Zhu Yanjun
@ 2018-01-31 11:06         ` Zhu Yanjun
  2018-01-31 11:06         ` [PATCH 5/6] IB/rxe: change the function rxe_av_fill_ip_info to void Zhu Yanjun
                           ` (2 subsequent siblings)
  6 siblings, 0 replies; 16+ messages in thread
From: Zhu Yanjun @ 2018-01-31 11:06 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA, jgg-uk2M96/98Pc,
	dledford-H+wXaHxf7aLQT0dZR+AlfA, monis-VPRAkNaXOzVWk0Htik3J/w,
	yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA, leon-DgEjT+Ai2ygdnm+yROfE0A

Since the function rxe_av_to_attr always return 0, the function
type is changed to void.

CC: Srinivas Eeda <srinivas.eeda-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
CC: Junxiao Bi <junxiao.bi-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Zhu Yanjun <yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
---
 drivers/infiniband/sw/rxe/rxe_av.c  | 3 +--
 drivers/infiniband/sw/rxe/rxe_loc.h | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_av.c b/drivers/infiniband/sw/rxe/rxe_av.c
index 26ed069..9662a77 100644
--- a/drivers/infiniband/sw/rxe/rxe_av.c
+++ b/drivers/infiniband/sw/rxe/rxe_av.c
@@ -61,13 +61,12 @@ void rxe_av_from_attr(u8 port_num, struct rxe_av *av,
 	av->port_num = port_num;
 }
 
-int rxe_av_to_attr(struct rxe_av *av, struct rdma_ah_attr *attr)
+void rxe_av_to_attr(struct rxe_av *av, struct rdma_ah_attr *attr)
 {
 	attr->type = RDMA_AH_ATTR_TYPE_ROCE;
 	memcpy(rdma_ah_retrieve_grh(attr), &av->grh, sizeof(av->grh));
 	rdma_ah_set_ah_flags(attr, IB_AH_GRH);
 	rdma_ah_set_port_num(attr, av->port_num);
-	return 0;
 }
 
 int rxe_av_fill_ip_info(struct rxe_dev *rxe,
diff --git a/drivers/infiniband/sw/rxe/rxe_loc.h b/drivers/infiniband/sw/rxe/rxe_loc.h
index ef8da26..d7e059a 100644
--- a/drivers/infiniband/sw/rxe/rxe_loc.h
+++ b/drivers/infiniband/sw/rxe/rxe_loc.h
@@ -41,7 +41,7 @@ int rxe_av_chk_attr(struct rxe_dev *rxe, struct rdma_ah_attr *attr);
 void rxe_av_from_attr(u8 port_num, struct rxe_av *av,
 		     struct rdma_ah_attr *attr);
 
-int rxe_av_to_attr(struct rxe_av *av, struct rdma_ah_attr *attr);
+void rxe_av_to_attr(struct rxe_av *av, struct rdma_ah_attr *attr);
 
 int rxe_av_fill_ip_info(struct rxe_dev *rxe,
 			struct rxe_av *av,
-- 
2.7.4

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

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 5/6] IB/rxe: change the function rxe_av_fill_ip_info to void
       [not found]       ` <1517396819-29597-1-git-send-email-yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
                           ` (3 preceding siblings ...)
  2018-01-31 11:06         ` [PATCH 4/6] IB/rxe: change the function to void from int Zhu Yanjun
@ 2018-01-31 11:06         ` Zhu Yanjun
  2018-01-31 11:06         ` [PATCH 6/6] IB/rxe: remove redudant parameter in rxe_av_fill_ip_info Zhu Yanjun
  2018-01-31 12:39         ` [PATCH 0/6] Trivial patches for SoftRoCE Yuval Shaia
  6 siblings, 0 replies; 16+ messages in thread
From: Zhu Yanjun @ 2018-01-31 11:06 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA, jgg-uk2M96/98Pc,
	dledford-H+wXaHxf7aLQT0dZR+AlfA, monis-VPRAkNaXOzVWk0Htik3J/w,
	yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA, leon-DgEjT+Ai2ygdnm+yROfE0A

The function rxe_av_fill_ip_info always returns 0. So the function
type is changed to void.

CC: Srinivas Eeda <srinivas.eeda-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
CC: Junxiao Bi <junxiao.bi-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Zhu Yanjun <yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
---
 drivers/infiniband/sw/rxe/rxe_av.c    | 4 +---
 drivers/infiniband/sw/rxe/rxe_loc.h   | 2 +-
 drivers/infiniband/sw/rxe/rxe_verbs.c | 4 ++--
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_av.c b/drivers/infiniband/sw/rxe/rxe_av.c
index 9662a77..c33aa41 100644
--- a/drivers/infiniband/sw/rxe/rxe_av.c
+++ b/drivers/infiniband/sw/rxe/rxe_av.c
@@ -69,7 +69,7 @@ void rxe_av_to_attr(struct rxe_av *av, struct rdma_ah_attr *attr)
 	rdma_ah_set_port_num(attr, av->port_num);
 }
 
-int rxe_av_fill_ip_info(struct rxe_dev *rxe,
+void rxe_av_fill_ip_info(struct rxe_dev *rxe,
 			struct rxe_av *av,
 			struct rdma_ah_attr *attr,
 			struct ib_gid_attr *sgid_attr,
@@ -78,8 +78,6 @@ int rxe_av_fill_ip_info(struct rxe_dev *rxe,
 	rdma_gid2ip(&av->sgid_addr._sockaddr, sgid);
 	rdma_gid2ip(&av->dgid_addr._sockaddr, &rdma_ah_read_grh(attr)->dgid);
 	av->network_type = ib_gid_to_network_type(sgid_attr->gid_type, sgid);
-
-	return 0;
 }
 
 struct rxe_av *rxe_get_av(struct rxe_pkt_info *pkt)
diff --git a/drivers/infiniband/sw/rxe/rxe_loc.h b/drivers/infiniband/sw/rxe/rxe_loc.h
index d7e059a..061fe60 100644
--- a/drivers/infiniband/sw/rxe/rxe_loc.h
+++ b/drivers/infiniband/sw/rxe/rxe_loc.h
@@ -43,7 +43,7 @@ void rxe_av_from_attr(u8 port_num, struct rxe_av *av,
 
 void rxe_av_to_attr(struct rxe_av *av, struct rdma_ah_attr *attr);
 
-int rxe_av_fill_ip_info(struct rxe_dev *rxe,
+void rxe_av_fill_ip_info(struct rxe_dev *rxe,
 			struct rxe_av *av,
 			struct rdma_ah_attr *attr,
 			struct ib_gid_attr *sgid_attr,
diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c
index ccb5721..d6e0d8e 100644
--- a/drivers/infiniband/sw/rxe/rxe_verbs.c
+++ b/drivers/infiniband/sw/rxe/rxe_verbs.c
@@ -272,11 +272,11 @@ static int rxe_init_av(struct rxe_dev *rxe, struct rdma_ah_attr *attr,
 	}
 
 	rxe_av_from_attr(rdma_ah_get_port_num(attr), av, attr);
-	err = rxe_av_fill_ip_info(rxe, av, attr, &sgid_attr, &sgid);
+	rxe_av_fill_ip_info(rxe, av, attr, &sgid_attr, &sgid);
 
 	if (sgid_attr.ndev)
 		dev_put(sgid_attr.ndev);
-	return err;
+	return 0;
 }
 
 static struct ib_ah *rxe_create_ah(struct ib_pd *ibpd,
-- 
2.7.4

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

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 6/6] IB/rxe: remove redudant parameter in rxe_av_fill_ip_info
       [not found]       ` <1517396819-29597-1-git-send-email-yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
                           ` (4 preceding siblings ...)
  2018-01-31 11:06         ` [PATCH 5/6] IB/rxe: change the function rxe_av_fill_ip_info to void Zhu Yanjun
@ 2018-01-31 11:06         ` Zhu Yanjun
       [not found]           ` <1517396819-29597-7-git-send-email-yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
  2018-01-31 12:39         ` [PATCH 0/6] Trivial patches for SoftRoCE Yuval Shaia
  6 siblings, 1 reply; 16+ messages in thread
From: Zhu Yanjun @ 2018-01-31 11:06 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA, jgg-uk2M96/98Pc,
	dledford-H+wXaHxf7aLQT0dZR+AlfA, monis-VPRAkNaXOzVWk0Htik3J/w,
	yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA, leon-DgEjT+Ai2ygdnm+yROfE0A

In the function rxe_av_fill_ip_info, the parameter rxe is not used.
So it is removed.

CC: Srinivas Eeda <srinivas.eeda-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
CC: Junxiao Bi <junxiao.bi-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Zhu Yanjun <yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
---
 drivers/infiniband/sw/rxe/rxe_av.c    | 3 +--
 drivers/infiniband/sw/rxe/rxe_loc.h   | 3 +--
 drivers/infiniband/sw/rxe/rxe_qp.c    | 4 ++--
 drivers/infiniband/sw/rxe/rxe_verbs.c | 2 +-
 4 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_av.c b/drivers/infiniband/sw/rxe/rxe_av.c
index c33aa41..7522d1a 100644
--- a/drivers/infiniband/sw/rxe/rxe_av.c
+++ b/drivers/infiniband/sw/rxe/rxe_av.c
@@ -69,8 +69,7 @@ void rxe_av_to_attr(struct rxe_av *av, struct rdma_ah_attr *attr)
 	rdma_ah_set_port_num(attr, av->port_num);
 }
 
-void rxe_av_fill_ip_info(struct rxe_dev *rxe,
-			struct rxe_av *av,
+void rxe_av_fill_ip_info(struct rxe_av *av,
 			struct rdma_ah_attr *attr,
 			struct ib_gid_attr *sgid_attr,
 			union ib_gid *sgid)
diff --git a/drivers/infiniband/sw/rxe/rxe_loc.h b/drivers/infiniband/sw/rxe/rxe_loc.h
index 061fe60..ea1aaa6 100644
--- a/drivers/infiniband/sw/rxe/rxe_loc.h
+++ b/drivers/infiniband/sw/rxe/rxe_loc.h
@@ -43,8 +43,7 @@ void rxe_av_from_attr(u8 port_num, struct rxe_av *av,
 
 void rxe_av_to_attr(struct rxe_av *av, struct rdma_ah_attr *attr);
 
-void rxe_av_fill_ip_info(struct rxe_dev *rxe,
-			struct rxe_av *av,
+void rxe_av_fill_ip_info(struct rxe_av *av,
 			struct rdma_ah_attr *attr,
 			struct ib_gid_attr *sgid_attr,
 			union ib_gid *sgid);
diff --git a/drivers/infiniband/sw/rxe/rxe_qp.c b/drivers/infiniband/sw/rxe/rxe_qp.c
index 5a2d339..4532316 100644
--- a/drivers/infiniband/sw/rxe/rxe_qp.c
+++ b/drivers/infiniband/sw/rxe/rxe_qp.c
@@ -634,7 +634,7 @@ int rxe_qp_from_attr(struct rxe_qp *qp, struct ib_qp_attr *attr, int mask,
 				  rdma_ah_read_grh(&attr->ah_attr)->sgid_index,
 				  &sgid, &sgid_attr);
 		rxe_av_from_attr(attr->port_num, &qp->pri_av, &attr->ah_attr);
-		rxe_av_fill_ip_info(rxe, &qp->pri_av, &attr->ah_attr,
+		rxe_av_fill_ip_info(&qp->pri_av, &attr->ah_attr,
 				    &sgid_attr, &sgid);
 		if (sgid_attr.ndev)
 			dev_put(sgid_attr.ndev);
@@ -649,7 +649,7 @@ int rxe_qp_from_attr(struct rxe_qp *qp, struct ib_qp_attr *attr, int mask,
 
 		rxe_av_from_attr(attr->alt_port_num, &qp->alt_av,
 				 &attr->alt_ah_attr);
-		rxe_av_fill_ip_info(rxe, &qp->alt_av, &attr->alt_ah_attr,
+		rxe_av_fill_ip_info(&qp->alt_av, &attr->alt_ah_attr,
 				    &sgid_attr, &sgid);
 		if (sgid_attr.ndev)
 			dev_put(sgid_attr.ndev);
diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c
index d6e0d8e..aea13e1 100644
--- a/drivers/infiniband/sw/rxe/rxe_verbs.c
+++ b/drivers/infiniband/sw/rxe/rxe_verbs.c
@@ -272,7 +272,7 @@ static int rxe_init_av(struct rxe_dev *rxe, struct rdma_ah_attr *attr,
 	}
 
 	rxe_av_from_attr(rdma_ah_get_port_num(attr), av, attr);
-	rxe_av_fill_ip_info(rxe, av, attr, &sgid_attr, &sgid);
+	rxe_av_fill_ip_info(av, attr, &sgid_attr, &sgid);
 
 	if (sgid_attr.ndev)
 		dev_put(sgid_attr.ndev);
-- 
2.7.4

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

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH 6/6] IB/rxe: remove redudant parameter in rxe_av_fill_ip_info
       [not found]           ` <1517396819-29597-7-git-send-email-yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
@ 2018-01-31 12:35             ` Leon Romanovsky
  0 siblings, 0 replies; 16+ messages in thread
From: Leon Romanovsky @ 2018-01-31 12:35 UTC (permalink / raw)
  To: Zhu Yanjun
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, jgg-uk2M96/98Pc,
	dledford-H+wXaHxf7aLQT0dZR+AlfA, monis-VPRAkNaXOzVWk0Htik3J/w,
	yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA

[-- Attachment #1: Type: text/plain, Size: 722 bytes --]

On Wed, Jan 31, 2018 at 06:06:59AM -0500, Zhu Yanjun wrote:
> In the function rxe_av_fill_ip_info, the parameter rxe is not used.
> So it is removed.
>
> CC: Srinivas Eeda <srinivas.eeda-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> CC: Junxiao Bi <junxiao.bi-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Zhu Yanjun <yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> ---
>  drivers/infiniband/sw/rxe/rxe_av.c    | 3 +--
>  drivers/infiniband/sw/rxe/rxe_loc.h   | 3 +--
>  drivers/infiniband/sw/rxe/rxe_qp.c    | 4 ++--
>  drivers/infiniband/sw/rxe/rxe_verbs.c | 2 +-
>  4 files changed, 5 insertions(+), 7 deletions(-)
>

Thanks,
Reviewed-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 3/6] IB/rxe: remove unnecessary parameter in rxe_av_to_attr
       [not found]           ` <1517396819-29597-4-git-send-email-yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
@ 2018-01-31 12:35             ` Leon Romanovsky
  0 siblings, 0 replies; 16+ messages in thread
From: Leon Romanovsky @ 2018-01-31 12:35 UTC (permalink / raw)
  To: Zhu Yanjun
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, jgg-uk2M96/98Pc,
	dledford-H+wXaHxf7aLQT0dZR+AlfA, monis-VPRAkNaXOzVWk0Htik3J/w,
	yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA

[-- Attachment #1: Type: text/plain, Size: 721 bytes --]

On Wed, Jan 31, 2018 at 06:06:56AM -0500, Zhu Yanjun wrote:
> In the function rxe_av_to_attr, the parameter rxe is
> not used. So it is removed.
>
> CC: Srinivas Eeda <srinivas.eeda-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> CC: Junxiao Bi <junxiao.bi-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Zhu Yanjun <yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> ---
>  drivers/infiniband/sw/rxe/rxe_av.c    | 3 +--
>  drivers/infiniband/sw/rxe/rxe_loc.h   | 3 +--
>  drivers/infiniband/sw/rxe/rxe_qp.c    | 6 ++----
>  drivers/infiniband/sw/rxe/rxe_verbs.c | 3 +--
>  4 files changed, 5 insertions(+), 10 deletions(-)
>

Thanks,
Reviewed-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/6] IB/rxe: change the function to void from int
       [not found]           ` <1517396819-29597-3-git-send-email-yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
@ 2018-01-31 12:35             ` Leon Romanovsky
  0 siblings, 0 replies; 16+ messages in thread
From: Leon Romanovsky @ 2018-01-31 12:35 UTC (permalink / raw)
  To: Zhu Yanjun
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, jgg-uk2M96/98Pc,
	dledford-H+wXaHxf7aLQT0dZR+AlfA, monis-VPRAkNaXOzVWk0Htik3J/w,
	yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA

[-- Attachment #1: Type: text/plain, Size: 667 bytes --]

On Wed, Jan 31, 2018 at 06:06:55AM -0500, Zhu Yanjun wrote:
> The function rxe_av_from_attr always return 0. So change the
> function to void.
>
> CC: Srinivas Eeda <srinivas.eeda-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> CC: Junxiao Bi <junxiao.bi-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Zhu Yanjun <yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> ---
>  drivers/infiniband/sw/rxe/rxe_av.c    | 3 +--
>  drivers/infiniband/sw/rxe/rxe_loc.h   | 2 +-
>  drivers/infiniband/sw/rxe/rxe_verbs.c | 5 ++---
>  3 files changed, 4 insertions(+), 6 deletions(-)
>

Thanks,
Reviewed-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/6] IB/rxe: remove redudant parameter in function
       [not found]           ` <1517396819-29597-2-git-send-email-yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
@ 2018-01-31 12:36             ` Leon Romanovsky
  0 siblings, 0 replies; 16+ messages in thread
From: Leon Romanovsky @ 2018-01-31 12:36 UTC (permalink / raw)
  To: Zhu Yanjun
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, jgg-uk2M96/98Pc,
	dledford-H+wXaHxf7aLQT0dZR+AlfA, monis-VPRAkNaXOzVWk0Htik3J/w,
	yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA

[-- Attachment #1: Type: text/plain, Size: 722 bytes --]

On Wed, Jan 31, 2018 at 06:06:54AM -0500, Zhu Yanjun wrote:
> In the function rxe_av_from_attr, the parameter rxe
> is not used. So it is removed.
>
> CC: Srinivas Eeda <srinivas.eeda-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> CC: Junxiao Bi <junxiao.bi-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Zhu Yanjun <yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> ---
>  drivers/infiniband/sw/rxe/rxe_av.c    | 4 ++--
>  drivers/infiniband/sw/rxe/rxe_loc.h   | 4 ++--
>  drivers/infiniband/sw/rxe/rxe_qp.c    | 5 ++---
>  drivers/infiniband/sw/rxe/rxe_verbs.c | 2 +-
>  4 files changed, 7 insertions(+), 8 deletions(-)
>

Thanks,
Reviewed-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 0/6] Trivial patches for SoftRoCE
       [not found]       ` <1517396819-29597-1-git-send-email-yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
                           ` (5 preceding siblings ...)
  2018-01-31 11:06         ` [PATCH 6/6] IB/rxe: remove redudant parameter in rxe_av_fill_ip_info Zhu Yanjun
@ 2018-01-31 12:39         ` Yuval Shaia
  2018-01-31 21:34           ` Doug Ledford
  6 siblings, 1 reply; 16+ messages in thread
From: Yuval Shaia @ 2018-01-31 12:39 UTC (permalink / raw)
  To: Zhu Yanjun
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, jgg-uk2M96/98Pc,
	dledford-H+wXaHxf7aLQT0dZR+AlfA, monis-VPRAkNaXOzVWk0Htik3J/w,
	leon-DgEjT+Ai2ygdnm+yROfE0A

On Wed, Jan 31, 2018 at 06:06:53AM -0500, Zhu Yanjun wrote:
> Follow advice from Yuval and Leon, to the functions rxe_av_chk_attr,
> rxe_av_to_attr and rxe_av_fill_ip_info, the unnecessary parameter
> are removed and the funtion type are changed to void.
> 
> To track the changes to these functions, every change is made
> to a single patch.
> 
> Zhu Yanjun (6):
>   IB/rxe: remove redudant parameter in function
>   IB/rxe: change the function to void from int
>   IB/rxe: remove unnecessary parameter in rxe_av_to_attr
>   IB/rxe: change the function to void from int
>   IB/rxe: change the function rxe_av_fill_ip_info to void
>   IB/rxe: remove redudant parameter in rxe_av_fill_ip_info

Since all seems to be related i wonder why not in a single patch.
I assume they will squashed to one before merge, right?

Besides that, for all:

Reviewed-by: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

> 
>  drivers/infiniband/sw/rxe/rxe_av.c    | 14 ++++----------
>  drivers/infiniband/sw/rxe/rxe_loc.h   | 10 ++++------
>  drivers/infiniband/sw/rxe/rxe_qp.c    | 15 ++++++---------
>  drivers/infiniband/sw/rxe/rxe_verbs.c | 10 ++++------
>  4 files changed, 18 insertions(+), 31 deletions(-)
> 
> -- 
> 2.7.4
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 0/6] Trivial patches for SoftRoCE
  2018-01-31 12:39         ` [PATCH 0/6] Trivial patches for SoftRoCE Yuval Shaia
@ 2018-01-31 21:34           ` Doug Ledford
  0 siblings, 0 replies; 16+ messages in thread
From: Doug Ledford @ 2018-01-31 21:34 UTC (permalink / raw)
  To: Yuval Shaia, Zhu Yanjun
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, jgg-uk2M96/98Pc,
	monis-VPRAkNaXOzVWk0Htik3J/w, leon-DgEjT+Ai2ygdnm+yROfE0A

[-- Attachment #1: Type: text/plain, Size: 1574 bytes --]

On Wed, 2018-01-31 at 14:39 +0200, Yuval Shaia wrote:
> On Wed, Jan 31, 2018 at 06:06:53AM -0500, Zhu Yanjun wrote:
> > Follow advice from Yuval and Leon, to the functions rxe_av_chk_attr,
> > rxe_av_to_attr and rxe_av_fill_ip_info, the unnecessary parameter
> > are removed and the funtion type are changed to void.
> > 
> > To track the changes to these functions, every change is made
> > to a single patch.
> > 
> > Zhu Yanjun (6):
> >   IB/rxe: remove redudant parameter in function
> >   IB/rxe: change the function to void from int
> >   IB/rxe: remove unnecessary parameter in rxe_av_to_attr
> >   IB/rxe: change the function to void from int
> >   IB/rxe: change the function rxe_av_fill_ip_info to void
> >   IB/rxe: remove redudant parameter in rxe_av_fill_ip_info
> 
> Since all seems to be related i wonder why not in a single patch.
> I assume they will squashed to one before merge, right?
> 
> Besides that, for all:
> 
> Reviewed-by: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

Thanks, series applied.  And I couldn't squash it without loosing info,
so they stayed separate (Leon reviewed 4 of the 6, if I squashed it I
would to have either added his name on the single commit, indicating he
reviewed all of it when I didn't have the right to indicate that, or
drop his name and thereby drop the credit for what he did review).

-- 
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
    GPG KeyID: B826A3330E572FDD
    Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2018-01-31 21:34 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-30  7:07 [PATCH 1/1] IB/rxe: remove redudant parameter in function Zhu Yanjun
     [not found] ` <1517296074-14459-1-git-send-email-yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2018-01-30  7:27   ` Leon Romanovsky
2018-01-30  7:30   ` Yuval Shaia
2018-01-31 11:06     ` [PATCH 0/6] Trivial patches for SoftRoCE Zhu Yanjun
     [not found]       ` <1517396819-29597-1-git-send-email-yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2018-01-31 11:06         ` [PATCH 1/6] IB/rxe: remove redudant parameter in function Zhu Yanjun
     [not found]           ` <1517396819-29597-2-git-send-email-yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2018-01-31 12:36             ` Leon Romanovsky
2018-01-31 11:06         ` [PATCH 2/6] IB/rxe: change the function to void from int Zhu Yanjun
     [not found]           ` <1517396819-29597-3-git-send-email-yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2018-01-31 12:35             ` Leon Romanovsky
2018-01-31 11:06         ` [PATCH 3/6] IB/rxe: remove unnecessary parameter in rxe_av_to_attr Zhu Yanjun
     [not found]           ` <1517396819-29597-4-git-send-email-yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2018-01-31 12:35             ` Leon Romanovsky
2018-01-31 11:06         ` [PATCH 4/6] IB/rxe: change the function to void from int Zhu Yanjun
2018-01-31 11:06         ` [PATCH 5/6] IB/rxe: change the function rxe_av_fill_ip_info to void Zhu Yanjun
2018-01-31 11:06         ` [PATCH 6/6] IB/rxe: remove redudant parameter in rxe_av_fill_ip_info Zhu Yanjun
     [not found]           ` <1517396819-29597-7-git-send-email-yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2018-01-31 12:35             ` Leon Romanovsky
2018-01-31 12:39         ` [PATCH 0/6] Trivial patches for SoftRoCE Yuval Shaia
2018-01-31 21:34           ` Doug Ledford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).