Skip to contentSkip to conversation

migration: move port_attr inside CONFIG_LINUX

PATCH In review Alex Bennée 3 participants 3 messages Jul 2, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 migration: move port_attr inside CONFIG_LINUX

Otherwise the FreeBSD compiler complains about an unused variable.

---
 migration/rdma.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
migration/rdma.c +1 -2
index 74cb2aa9f9..3036221ee8 100644
@@ -839,10 +839,9 @@ static void qemu_rdma_dump_gid(const char *who, struct rdma_cm_id *id)
  */
 static int qemu_rdma_broken_ipv6_kernel(struct ibv_context *verbs, Error **errp)
 {
-    struct ibv_port_attr port_attr;
-
     /* This bug only exists in linux, to our knowledge. */
 #ifdef CONFIG_LINUX
+    struct ibv_port_attr port_attr;
 
     /*
      * Verbs are only NULL if management has bound to '[::]'.
Signature · 1 line
2.20.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 25 lines · Alex Bennée

Otherwise the FreeBSD compiler complains about an unused variable.

---
 migration/rdma.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
migration/rdma.c +1 -3
index 74cb2aa9f9..3036221ee8 100644
@@ -839,10 +839,9 @@ static void qemu_rdma_dump_gid(const char *who, struct rdma_cm_id *id)
  */
 static int qemu_rdma_broken_ipv6_kernel(struct ibv_context *verbs, Error **errp)
 {
-    struct ibv_port_attr port_attr;
-
     /* This bug only exists in linux, to our knowledge. */
 #ifdef CONFIG_LINUX
+    struct ibv_port_attr port_attr;
 
     /*
      * Verbs are only NULL if management has bound to '[::]'.
--
Quoted 1 line

2.20.1

thanks
-- PMM

Reviewed-by Tested-by on v1 1/1
#2 lore raw
In reply to Alex Bennée
Quoted 14 lines · Alex Bennée

Otherwise the FreeBSD compiler complains about an unused variable.

---
 migration/rdma.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
migration/rdma.c +0 -0
index 74cb2aa9f9..3036221ee8 100644
@@ -839,10 +839,9 @@ static void qemu_rdma_dump_gid(const char *who, struct rdma_cm_id *id)
  */

migration/rdma.c static void qemu_rdma_dump_gid(const char *who, struct rdma_cm_id *id) · line 847

Quoted 10 lines
migration/rdma.c +1 -2
 static int qemu_rdma_broken_ipv6_kernel(struct ibv_context *verbs, Error **errp)
 {
-    struct ibv_port_attr port_attr;
-
     /* This bug only exists in linux, to our knowledge. */
 #ifdef CONFIG_LINUX
+    struct ibv_port_attr port_attr;
 
     /*
      * Verbs are only NULL if management has bound to '[::]'.