Skip to contentSkip to conversation

ibsendtrap.c: Eliminate unused parameter from send_trap

PATCH Applied Hal Rosenstock 2 participants 2 messages Nov 10, 2015 – Dec 12, 2015 1 message not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ibsendtrap.c: Eliminate unused parameter from send_trap

src/ibsendtrap.c: In function ?send_trap?:
src/ibsendtrap.c:124: warning: unused parameter ?name?

---

src/ibsendtrap.c +2 -3
index 46fd6e7..659f2d2 100644
@@ -121,8 +121,7 @@ static void build_trap129(ib_mad_notice_attr_t * n, ib_portid_t * port)
 	n->data_details.ntc_129_131.port_num = (uint8_t) error_port;
 }
 
-static int send_trap(const char *name,
-		     void (*build) (ib_mad_notice_attr_t *, ib_portid_t *))
+static int send_trap(void (*build) (ib_mad_notice_attr_t *, ib_portid_t *))
 {
 	ib_portid_t sm_port;
 	ib_portid_t selfportid;
@@ -169,7 +168,7 @@ int process_send_trap(char *trap_name)
 
 	for (i = 0; traps[i].trap_name; i++)
 		if (strcmp(traps[i].trap_name, trap_name) == 0)
-			return send_trap(trap_name, traps[i].build_func);
+			return send_trap(traps[i].build_func);
 	ibdiag_show_usage();
 	return 1;
 }

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 5641D3BB.4090003-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org

Applied
#2 lore raw
Quoted 5 lines · Hal Rosenstock

src/ibsendtrap.c: In function ?send_trap?:
src/ibsendtrap.c:124: warning: unused parameter ?name?

Thanks applied,
Ira

Quoted 16 lines

---

src/ibsendtrap.c +1 -2
index 46fd6e7..659f2d2 100644
@@ -121,8 +121,7 @@ static void build_trap129(ib_mad_notice_attr_t * n, ib_portid_t * port)
 	n->data_details.ntc_129_131.port_num = (uint8_t) error_port;
 }
 
-static int send_trap(const char *name,
-		     void (*build) (ib_mad_notice_attr_t *, ib_portid_t *))
+static int send_trap(void (*build) (ib_mad_notice_attr_t *, ib_portid_t *))
 {
 	ib_portid_t sm_port;
 	ib_portid_t selfportid;

src/ibsendtrap.c int process_send_trap(char *trap_name) · line 174

Quoted 8 lines
src/ibsendtrap.c +1 -1
@@ -169,7 +168,7 @@ int process_send_trap(char *trap_name)
 
 	for (i = 0; traps[i].trap_name; i++)
 		if (strcmp(traps[i].trap_name, trap_name) == 0)
-			return send_trap(trap_name, traps[i].build_func);
+			return send_trap(traps[i].build_func);
 	ibdiag_show_usage();
 	return 1;
 }

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html