[ofa-general] [PATCH 2/8] Remove unused function madrpc_save_mad

Ira Weiny weiny2 at llnl.gov
Tue Feb 17 21:06:45 PST 2009


>From 17ff2ea4947b64453e00b93ab1dfd639a69a7c35 Mon Sep 17 00:00:00 2001
From: weiny2 at llnl.gov <weiny2 at wopri.(none)>
Date: Tue, 17 Feb 2009 17:40:01 -0800
Subject: [PATCH] Remove unused function madrpc_save_mad

   including the internal data used by it.

Signed-off-by: weiny2 at llnl.gov <weiny2 at wopri.(none)>
---
 libibmad/include/infiniband/mad.h |    1 -
 libibmad/src/libibmad.map         |    1 -
 libibmad/src/rpc.c                |   14 --------------
 3 files changed, 0 insertions(+), 16 deletions(-)

diff --git a/libibmad/include/infiniband/mad.h b/libibmad/include/infiniband/mad.h
index 56b87e6..5806e70 100644
--- a/libibmad/include/infiniband/mad.h
+++ b/libibmad/include/infiniband/mad.h
@@ -731,7 +731,6 @@ void *madrpc_rmpp(ib_rpc_t * rpc, ib_portid_t * dport, ib_rmpp_hdr_t * rmpp,
 		  void *data);
 MAD_EXPORT void madrpc_init(char *dev_name, int dev_port, int *mgmt_classes,
 			    int num_classes);
-void madrpc_save_mad(void *madbuf, int len);
 
 /* New interface */
 MAD_EXPORT void madrpc_show_errors(int set);
diff --git a/libibmad/src/libibmad.map b/libibmad/src/libibmad.map
index 94d7762..6f0c0b5 100644
--- a/libibmad/src/libibmad.map
+++ b/libibmad/src/libibmad.map
@@ -75,7 +75,6 @@ IBMAD_1.3 {
 		madrpc_init;
 		madrpc_portid;
 		madrpc_rmpp;
-		madrpc_save_mad;
 		madrpc_set_retries;
 		madrpc_set_timeout;
 		madrpc_show_errors;
diff --git a/libibmad/src/rpc.c b/libibmad/src/rpc.c
index d47873b..20eeb89 100644
--- a/libibmad/src/rpc.c
+++ b/libibmad/src/rpc.c
@@ -57,8 +57,6 @@ static int iberrs;
 
 static int madrpc_retries = MAD_DEF_RETRIES;
 static int def_madrpc_timeout = MAD_DEF_TIMEOUT_MS;
-static void *save_mad;
-static int save_mad_len = 256;
 
 #undef DEBUG
 #define DEBUG	if (ibdebug)	IBWARN
@@ -71,12 +69,6 @@ void madrpc_show_errors(int set)
 	iberrs = set;
 }
 
-void madrpc_save_mad(void *madbuf, int len)
-{
-	save_mad = madbuf;
-	save_mad_len = len;
-}
-
 int madrpc_set_retries(int retries)
 {
 	if (retries > 0)
@@ -121,12 +113,6 @@ _do_madrpc(int port_id, void *sndbuf, void *rcvbuf, int agentid, int len,
 		xdump(stderr, "send buf\n", sndbuf, umad_size() + len);
 	}
 
-	if (save_mad) {
-		memcpy(save_mad, umad_get_mad(sndbuf),
-		       save_mad_len < len ? save_mad_len : len);
-		save_mad = 0;
-	}
-
 	trid =
 	    (uint32_t) mad_get_field64(umad_get_mad(sndbuf), 0, IB_MAD_TRID_F);
 
-- 
1.5.4.5




More information about the general mailing list