]> git.openfabrics.org - ~shefty/librdmacm.git/commitdiff
import
authorSean Hefty <sean.hefty@intel.com>
Tue, 30 Jul 2013 22:43:56 +0000 (15:43 -0700)
committerSean Hefty <sean.hefty@intel.com>
Tue, 30 Jul 2013 22:43:56 +0000 (15:43 -0700)
meta
patches/1-4-acm-remove-the-unused-vari [new file with mode: 0644]
patches/2-4-cma-remove-the-unused-vari [new file with mode: 0644]
patches/3-4-rsocket-remove-the-unused- [new file with mode: 0644]
patches/4-4-declare-server_port-as-an- [new file with mode: 0644]

diff --git a/meta b/meta
index 0256e5fec33c2f2d1a2f3493edc1cada62cca967..31831a55095bc439c29fb22deefedf72d29769e1 100644 (file)
--- a/meta
+++ b/meta
@@ -1,7 +1,11 @@
 Version: 1
-Previous: 2c10790f4a0df647d877dd1f58185f2a29db8663
-Head: c8be3cfde6902e490fadd6a51206c1bcba3e3aa2
+Previous: d1ea4e7f401825eb8ff9c4119bca8f803543cabc
+Head: a8becf33bbbb363cb2e0f2b45456bc82b345c453
 Applied:
+  1-4-acm-remove-the-unused-vari: 2a31c855fc95d04370db56de5b35d8271e577f6f
+  2-4-cma-remove-the-unused-vari: 9e758e0655242bb02aea5ec28fe4eeac2ec655f7
+  3-4-rsocket-remove-the-unused-: eee05e6604a60b007249f97613d3bb513c07c20d
+  4-4-declare-server_port-as-an-: a8becf33bbbb363cb2e0f2b45456bc82b345c453
 Unapplied:
   rst-afib: 83c2c70b91d4a93bbdd9bbec501de3a23e77a3bd
   ex-afib: c9db8cd19f07ddfaaa60772b43a6bdb11772d586
diff --git a/patches/1-4-acm-remove-the-unused-vari b/patches/1-4-acm-remove-the-unused-vari
new file mode 100644 (file)
index 0000000..98e2bb3
--- /dev/null
@@ -0,0 +1,41 @@
+Bottom: 4389e5ccd819a6d0803f1527aeca1074994ff4ce
+Top:    9a77d7d6e85ab3e9750f0182dac7261ac8158201
+Author: Bart Van Assche <bvanassche@acm.org>
+Date:   2013-07-28 11:18:36 +0200
+
+[1/4] acm: Remove the unused variable 'pri_path'
+
+The variable 'pri_path' is assigned a value but is never used.
+This triggers the following compiler warning:
+
+src/acm.c:301:26: warning: variable 'pri_path' set but not used [-Wunused-but-set-variable]
+
+Hence remove this variable.
+
+Signed-off-by: Bart Van Assche <bvanassche@acm.org>
+
+
+---
+
+diff --git a/src/acm.c b/src/acm.c
+index 04cddee..49bda48 100644
+--- a/src/acm.c
++++ b/src/acm.c
+@@ -297,7 +297,6 @@ static void ucma_ib_save_resp(struct rdma_addrinfo *rai, struct acm_msg *msg)
+ {
+       struct acm_ep_addr_data *ep_data;
+       struct ibv_path_data *path_data = NULL;
+-      struct ibv_path_record *pri_path = NULL;
+       struct sockaddr_in *sin;
+       struct sockaddr_in6 *sin6;
+       int i, cnt, path_cnt = 0;
+@@ -311,9 +310,6 @@ static void ucma_ib_save_resp(struct rdma_addrinfo *rai, struct acm_msg *msg)
+                       if (!path_data)
+                               path_data = (struct ibv_path_data *) ep_data;
+                       path_cnt++;
+-                      if (ep_data->flags |
+-                          (IBV_PATH_FLAG_PRIMARY | IBV_PATH_FLAG_OUTBOUND))
+-                              pri_path = &path_data[i].path;
+                       break;
+               case ACM_EP_INFO_ADDRESS_IP:
+                       if (!(ep_data->flags & ACM_EP_FLAG_SOURCE) || rai->ai_src_len)
diff --git a/patches/2-4-cma-remove-the-unused-vari b/patches/2-4-cma-remove-the-unused-vari
new file mode 100644 (file)
index 0000000..1b4e5a6
--- /dev/null
@@ -0,0 +1,34 @@
+Bottom: 9a77d7d6e85ab3e9750f0182dac7261ac8158201
+Top:    c6cf65fe1374a256d053979c58505516d89fa6ce
+Author: Bart Van Assche <bvanassche@acm.org>
+Date:   2013-07-28 11:19:15 +0200
+
+[2/4] cma: Remove the unused variable 'id_priv'
+
+The variable 'id_priv' is assigned a value but is never used.
+This triggers the following compiler warning:
+
+src/cma.c:1178:25: warning: variable 'id_priv' set but not used [-Wunused-but-set-variable]
+
+Hence remove this variable.
+
+Signed-off-by: Bart Van Assche <bvanassche@acm.org>
+
+
+---
+
+diff --git a/src/cma.c b/src/cma.c
+index baebecd..374844c 100644
+--- a/src/cma.c
++++ b/src/cma.c
+@@ -1175,11 +1175,9 @@ err:
+ int rdma_create_srq(struct rdma_cm_id *id, struct ibv_pd *pd,
+                   struct ibv_srq_init_attr *attr)
+ {
+-      struct cma_id_private *id_priv;
+       struct ibv_srq *srq;
+       int ret;
+-      id_priv = container_of(id, struct cma_id_private, id);
+       if (!pd)
+               pd = id->pd;
diff --git a/patches/3-4-rsocket-remove-the-unused- b/patches/3-4-rsocket-remove-the-unused-
new file mode 100644 (file)
index 0000000..c440ae4
--- /dev/null
@@ -0,0 +1,38 @@
+Bottom: c6cf65fe1374a256d053979c58505516d89fa6ce
+Top:    a0d620c83a5f202817b4ad05221e95008e34a381
+Author: Bart Van Assche <bvanassche@acm.org>
+Date:   2013-07-28 11:19:48 +0200
+
+[3/4] rsocket: Remove the unused variable 'ret'
+
+The variable 'ret' is assigned a value but that value is never used.
+This triggers the following compiler warning:
+
+src/rsocket.c:3720:9: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
+
+Hence remove this variable.
+
+Signed-off-by: Bart Van Assche <bvanassche@acm.org>
+
+
+---
+
+diff --git a/src/rsocket.c b/src/rsocket.c
+index abdd392..ef24dfb 100644
+--- a/src/rsocket.c
++++ b/src/rsocket.c
+@@ -3717,11 +3717,11 @@ static void rs_svc_process_sock(void)
+ static uint8_t rs_svc_sgid_index(struct ds_dest *dest, union ibv_gid *sgid)
+ {
+       union ibv_gid gid;
+-      int i, ret;
++      int i;
+       for (i = 0; i < 16; i++) {
+-              ret = ibv_query_gid(dest->qp->cm_id->verbs, dest->qp->cm_id->port_num,
+-                                  i, &gid);
++              ibv_query_gid(dest->qp->cm_id->verbs, dest->qp->cm_id->port_num,
++                            i, &gid);
+               if (!memcmp(sgid, &gid, sizeof gid))
+                       return i;
+       }
diff --git a/patches/4-4-declare-server_port-as-an- b/patches/4-4-declare-server_port-as-an-
new file mode 100644 (file)
index 0000000..168ebd0
--- /dev/null
@@ -0,0 +1,45 @@
+Bottom: a0d620c83a5f202817b4ad05221e95008e34a381
+Top:    41e944da9e3a2e6f7aecde72a095aee914508844
+Author: Bart Van Assche <bvanassche@acm.org>
+Date:   2013-07-28 11:20:54 +0200
+
+[4/4] Declare 'server_port' as an unsigned variable
+
+Change the data type of the 'server_port' variable from signed to
+unsigned such that the cast in the fscanf() call can be removed.
+
+Signed-off-by: Bart Van Assche <bvanassche@acm.org>
+
+
+---
+
+diff --git a/src/acm.c b/src/acm.c
+index 49bda48..33379cf 100644
+--- a/src/acm.c
++++ b/src/acm.c
+@@ -35,6 +35,7 @@
+ #endif /* HAVE_CONFIG_H */
+ #include <stdio.h>
++#include <inttypes.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netdb.h>
+@@ -113,7 +114,7 @@ struct acm_msg {
+ static pthread_mutex_t acm_lock = PTHREAD_MUTEX_INITIALIZER;
+ static int sock = -1;
+-static short server_port;
++static uint16_t server_port;
+ struct ib_connect_hdr {
+       uint8_t  cma_version;
+@@ -132,7 +133,7 @@ static int ucma_set_server_port(void)
+       FILE *f;
+       if ((f = fopen("/var/run/ibacm.port", "r" STREAM_CLOEXEC))) {
+-              fscanf(f, "%hu", (unsigned short *) &server_port);
++              fscanf(f, "%" SCNu16, &server_port);
+               fclose(f);
+       }
+       return server_port;