linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 1/1] RDMA/rxe: remove the redundant variable
  2021-09-15  1:24 [PATCH 1/1] RDMA/rxe: remove the redundant variable Zhu Yanjun
@ 2021-09-14 19:17 ` Jason Gunthorpe
  0 siblings, 0 replies; 2+ 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 Tue, Sep 14, 2021 at 09:24:56PM -0400, Zhu Yanjun wrote:
> From: Zhu Yanjun <zyjzyj2000@gmail.com>
> 
> The variable port is not necessary. So remove it.
> 
> Signed-off-by: Zhu Yanjun <zyjzyj2000@gmail.com>
> ---
>  drivers/infiniband/sw/rxe/rxe_verbs.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)

Applied to for-next, thanks

Jason

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

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

From: Zhu Yanjun <zyjzyj2000@gmail.com>

The variable port is not necessary. So remove it.

Signed-off-by: Zhu Yanjun <zyjzyj2000@gmail.com>
---
 drivers/infiniband/sw/rxe/rxe_verbs.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c
index 267b5a9c345d..586ef102986e 100644
--- a/drivers/infiniband/sw/rxe/rxe_verbs.c
+++ b/drivers/infiniband/sw/rxe/rxe_verbs.c
@@ -29,13 +29,10 @@ static int rxe_query_port(struct ib_device *dev,
 			  u32 port_num, struct ib_port_attr *attr)
 {
 	struct rxe_dev *rxe = to_rdev(dev);
-	struct rxe_port *port;
 	int rc;
 
-	port = &rxe->port;
-
 	/* *attr being zeroed by the caller, avoid zeroing it here */
-	*attr = port->attr;
+	*attr = rxe->port.attr;
 
 	mutex_lock(&rxe->usdev_lock);
 	rc = ib_get_eth_speed(dev, port_num, &attr->active_speed,
-- 
2.27.0


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

end of thread, other threads:[~2021-09-14 19:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-15  1:24 [PATCH 1/1] RDMA/rxe: remove the redundant variable 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).