diff mbox series

[1/1] RDMA/rxe: remove the redundant variable

Message ID 20210915012456.476728-1-yanjun.zhu@intel.com (mailing list archive)
State Accepted
Delegated to: Jason Gunthorpe
Headers show
Series [1/1] RDMA/rxe: remove the redundant variable | expand

Commit Message

Zhu Yanjun Sept. 15, 2021, 1:24 a.m. UTC
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(-)

Comments

Jason Gunthorpe Sept. 14, 2021, 7:17 p.m. UTC | #1
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
diff mbox series

Patch

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,