[PATCH ibdiags 14/14] ibdiags/ibtracert: Remove srcport parameter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jason Gunthorpe <jgg@xxxxxxxxxxxx>

All callers pass this as NULL, remove it and just use NULL instead. Avoids
shadowing a global.

Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx>
---
 src/ibtracert.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/ibtracert.c b/src/ibtracert.c
index 2fc8b9879225a8..98911db1442236 100644
--- a/src/ibtracert.c
+++ b/src/ibtracert.c
@@ -740,12 +740,12 @@ free_name:
 	free(nodename);
 }
 
-static int resolve_lid(ib_portid_t * portid, const void *srcport)
+static int resolve_lid(ib_portid_t *portid)
 {
 	uint8_t portinfo[64] = { 0 };
 	uint16_t lid;
 
-	if (!smp_query_via(portinfo, portid, IB_ATTR_PORT_INFO, 0, 0, srcport))
+	if (!smp_query_via(portinfo, portid, IB_ATTR_PORT_INFO, 0, 0, NULL))
 		return -1;
 	mad_decode_field(portinfo, IB_PORT_LID_F, &lid);
 
@@ -804,12 +804,12 @@ static int get_route(char *srcid, char *dstid) {
 	}
 
 	if (ibd_dest_type == IB_DEST_DRPATH) {
-		if (resolve_lid(&src_portid, NULL) < 0) {
+		if (resolve_lid(&src_portid) < 0) {
 			IBWARN("cannot resolve lid for port \'%s\'",
 				portid2str(&src_portid));
 			return -1;
 		}
-		if (resolve_lid(&dest_portid, NULL) < 0) {
+		if (resolve_lid(&dest_portid) < 0) {
 			IBWARN("cannot resolve lid for port \'%s\'",
 				portid2str(&dest_portid));
 			return -1;
-- 
2.21.0




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux