Skip to contentSkip to conversation

RDMA/rxe: remove the redundant variable

PATCH Applied Zhu Yanjun 2 participants 2 messages Sep 14, 2021

Subsystems (2)
lore
Share & tools
lore

Zhu Yanjun

author
#0 lore raw

PATCH 1/1 RDMA/rxe: remove the redundant variable

From: Zhu Yanjun <[email protected]>

The variable port is not necessary. So remove it.

---
 drivers/infiniband/sw/rxe/rxe_verbs.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/infiniband/sw/rxe/rxe_verbs.c +1 -4
index 267b5a9c345d..586ef102986e 100644
@@ -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,
Signature · 1 line
2.27.0