linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 1/1] RDMA/rxe: Remove the unnecessary variable
  2021-12-07 19:40 [PATCH 1/1] RDMA/rxe: Remove the unnecessary variable yanjun.zhu
@ 2021-12-07 18:18 ` Jason Gunthorpe
  0 siblings, 0 replies; 4+ messages in thread
From: Jason Gunthorpe @ 2021-12-07 18:18 UTC (permalink / raw)
  To: yanjun.zhu; +Cc: zyjzyj2000, dledford, linux-rdma, leon

On Tue, Dec 07, 2021 at 02:40:57PM -0500, yanjun.zhu@linux.dev wrote:
> From: Zhu Yanjun <yanjun.zhu@linux.dev>
> 
> The variable pkey is assigned to a macro. Then this variable is passed
> to a function bth_init directly. And pkey is not used again. So remove
> it and use the macro directly.
> 
> Fixes: 76251e15ea73 ("RDMA/rxe: Remove pkey table")
> Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
> ---
>  drivers/infiniband/sw/rxe/rxe_req.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)

Applied to for-next, thanks

Jason

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

* [PATCH 1/1] RDMA/rxe: Remove the unnecessary variable
@ 2021-12-07 19:40 yanjun.zhu
  2021-12-07 18:18 ` Jason Gunthorpe
  0 siblings, 1 reply; 4+ messages in thread
From: yanjun.zhu @ 2021-12-07 19:40 UTC (permalink / raw)
  To: zyjzyj2000, dledford, jgg, linux-rdma, yanjun.zhu, leon

From: Zhu Yanjun <yanjun.zhu@linux.dev>

The variable pkey is assigned to a macro. Then this variable is passed
to a function bth_init directly. And pkey is not used again. So remove
it and use the macro directly.

Fixes: 76251e15ea73 ("RDMA/rxe: Remove pkey table")
Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev>
---
 drivers/infiniband/sw/rxe/rxe_req.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_req.c b/drivers/infiniband/sw/rxe/rxe_req.c
index 0c9d2af15f3d..350c47174aca 100644
--- a/drivers/infiniband/sw/rxe/rxe_req.c
+++ b/drivers/infiniband/sw/rxe/rxe_req.c
@@ -372,7 +372,6 @@ static struct sk_buff *init_req_packet(struct rxe_qp *qp,
 	int			pad = (-payload) & 0x3;
 	int			paylen;
 	int			solicited;
-	u16			pkey;
 	u32			qp_num;
 	int			ack_req;
 
@@ -404,8 +403,6 @@ static struct sk_buff *init_req_packet(struct rxe_qp *qp,
 			(pkt->mask & (RXE_WRITE_MASK | RXE_IMMDT_MASK)) ==
 			(RXE_WRITE_MASK | RXE_IMMDT_MASK));
 
-	pkey = IB_DEFAULT_PKEY_FULL;
-
 	qp_num = (pkt->mask & RXE_DETH_MASK) ? ibwr->wr.ud.remote_qpn :
 					 qp->attr.dest_qp_num;
 
@@ -414,7 +411,7 @@ static struct sk_buff *init_req_packet(struct rxe_qp *qp,
 	if (ack_req)
 		qp->req.noack_pkts = 0;
 
-	bth_init(pkt, pkt->opcode, solicited, 0, pad, pkey, qp_num,
+	bth_init(pkt, pkt->opcode, solicited, 0, pad, IB_DEFAULT_PKEY_FULL, qp_num,
 		 ack_req, pkt->psn);
 
 	/* init optional headers */
-- 
2.27.0


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

* [PATCH 1/1] RDMA/rxe: remove the unnecessary variable
@ 2021-09-15  7:51 Zhu Yanjun
  2021-09-14 19:17 ` Jason Gunthorpe
  0 siblings, 1 reply; 4+ messages in thread
From: Zhu Yanjun @ 2021-09-15  7:51 UTC (permalink / raw)
  To: dledford, jgg, linux-rdma, leonro; +Cc: Zhu Yanjun

From: Zhu Yanjun <zyjzyj2000@gmail.com>

In the struct rxe_qp, the variable send_pkts is never used.
So remove it.

Signed-off-by: Zhu Yanjun <zyjzyj2000@gmail.com>
---
 drivers/infiniband/sw/rxe/rxe_qp.c    | 2 --
 drivers/infiniband/sw/rxe/rxe_verbs.h | 1 -
 2 files changed, 3 deletions(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_qp.c b/drivers/infiniband/sw/rxe/rxe_qp.c
index 1ab6af7ddb25..fa97ce9eaea3 100644
--- a/drivers/infiniband/sw/rxe/rxe_qp.c
+++ b/drivers/infiniband/sw/rxe/rxe_qp.c
@@ -190,8 +190,6 @@ static void rxe_qp_init_misc(struct rxe_dev *rxe, struct rxe_qp *qp,
 
 	INIT_LIST_HEAD(&qp->grp_list);
 
-	skb_queue_head_init(&qp->send_pkts);
-
 	spin_lock_init(&qp->grp_lock);
 	spin_lock_init(&qp->state_lock);
 
diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.h b/drivers/infiniband/sw/rxe/rxe_verbs.h
index ac2a2148027f..1fd53fb3a4b3 100644
--- a/drivers/infiniband/sw/rxe/rxe_verbs.h
+++ b/drivers/infiniband/sw/rxe/rxe_verbs.h
@@ -240,7 +240,6 @@ struct rxe_qp {
 
 	struct sk_buff_head	req_pkts;
 	struct sk_buff_head	resp_pkts;
-	struct sk_buff_head	send_pkts;
 
 	struct rxe_req_info	req;
 	struct rxe_comp_info	comp;
-- 
2.27.0


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

* Re: [PATCH 1/1] RDMA/rxe: remove the unnecessary variable
  2021-09-15  7:51 [PATCH 1/1] RDMA/rxe: remove " Zhu Yanjun
@ 2021-09-14 19:17 ` Jason Gunthorpe
  0 siblings, 0 replies; 4+ messages in thread
From: Jason Gunthorpe @ 2021-09-14 19:17 UTC (permalink / raw)
  To: Zhu Yanjun; +Cc: dledford, linux-rdma, leonro, Zhu Yanjun

On Wed, Sep 15, 2021 at 03:51:28AM -0400, Zhu Yanjun wrote:
> From: Zhu Yanjun <zyjzyj2000@gmail.com>
> 
> In the struct rxe_qp, the variable send_pkts is never used.
> So remove it.
> 
> Signed-off-by: Zhu Yanjun <zyjzyj2000@gmail.com>
> ---
>  drivers/infiniband/sw/rxe/rxe_qp.c    | 2 --
>  drivers/infiniband/sw/rxe/rxe_verbs.h | 1 -
>  2 files changed, 3 deletions(-)

Applied to for-next, thanks

Jason

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

end of thread, other threads:[~2021-12-07 18:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-07 19:40 [PATCH 1/1] RDMA/rxe: Remove the unnecessary variable yanjun.zhu
2021-12-07 18:18 ` Jason Gunthorpe
  -- strict thread matches above, loose matches on Subject: below --
2021-09-15  7:51 [PATCH 1/1] RDMA/rxe: remove " Zhu Yanjun
2021-09-14 19:17 ` Jason Gunthorpe

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