thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone
9ae3a8
From 46ab899a1dd2c704e18b5542aa2297d6e342e803 Mon Sep 17 00:00:00 2001
9ae3a8
Message-Id: <46ab899a1dd2c704e18b5542aa2297d6e342e803.1387382496.git.minovotn@redhat.com>
9ae3a8
In-Reply-To: <c5386144fbf09f628148101bc674e2421cdd16e3.1387382496.git.minovotn@redhat.com>
9ae3a8
References: <c5386144fbf09f628148101bc674e2421cdd16e3.1387382496.git.minovotn@redhat.com>
9ae3a8
From: Nigel Croxon <ncroxon@redhat.com>
9ae3a8
Date: Thu, 14 Nov 2013 22:53:13 +0100
9ae3a8
Subject: [PATCH 37/46] rdma: constify ram_chunk_{index, start, end}
9ae3a8
9ae3a8
RH-Author: Nigel Croxon <ncroxon@redhat.com>
9ae3a8
Message-id: <1384469598-13137-38-git-send-email-ncroxon@redhat.com>
9ae3a8
Patchwork-id: 55721
9ae3a8
O-Subject: [RHEL7.0 PATCH 37/42] rdma: constify ram_chunk_{index, start, end}
9ae3a8
Bugzilla: 1011720
9ae3a8
RH-Acked-by: Orit Wasserman <owasserm@redhat.com>
9ae3a8
RH-Acked-by: Amit Shah <amit.shah@redhat.com>
9ae3a8
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
9ae3a8
9ae3a8
Bugzilla: 1011720
9ae3a8
https://bugzilla.redhat.com/show_bug.cgi?id=1011720
9ae3a8
9ae3a8
>From commit ID:
9ae3a8
commit dd286ed700c6ca2768ac3452bc5b79af1709296a
9ae3a8
Author: Isaku Yamahata <yamahata@private.email.ne.jp>
9ae3a8
Date:   Wed Sep 4 11:32:19 2013 +0900
9ae3a8
9ae3a8
    rdma: constify ram_chunk_{index, start, end}
9ae3a8
9ae3a8
    Signed-off-by: Isaku Yamahata <yamahata@private.email.ne.jp>
9ae3a8
    Signed-off-by: Juan Quintela <quintela@redhat.com>
9ae3a8
---
9ae3a8
 migration-rdma.c |    8 +++++---
9ae3a8
 1 files changed, 5 insertions(+), 3 deletions(-)
9ae3a8
9ae3a8
Signed-off-by: Michal Novotny <minovotn@redhat.com>
9ae3a8
---
9ae3a8
 migration-rdma.c | 8 +++++---
9ae3a8
 1 file changed, 5 insertions(+), 3 deletions(-)
9ae3a8
9ae3a8
diff --git a/migration-rdma.c b/migration-rdma.c
9ae3a8
index be3d984..f79be20 100644
9ae3a8
--- a/migration-rdma.c
9ae3a8
+++ b/migration-rdma.c
9ae3a8
@@ -511,19 +511,21 @@ static int qemu_rdma_exchange_send(RDMAContext *rdma, RDMAControlHeader *head,
9ae3a8
                                    int *resp_idx,
9ae3a8
                                    int (*callback)(RDMAContext *rdma));
9ae3a8
 
9ae3a8
-static inline uint64_t ram_chunk_index(uint8_t *start, uint8_t *host)
9ae3a8
+static inline uint64_t ram_chunk_index(const uint8_t *start,
9ae3a8
+                                       const uint8_t *host)
9ae3a8
 {
9ae3a8
     return ((uintptr_t) host - (uintptr_t) start) >> RDMA_REG_CHUNK_SHIFT;
9ae3a8
 }
9ae3a8
 
9ae3a8
-static inline uint8_t *ram_chunk_start(RDMALocalBlock *rdma_ram_block,
9ae3a8
+static inline uint8_t *ram_chunk_start(const RDMALocalBlock *rdma_ram_block,
9ae3a8
                                        uint64_t i)
9ae3a8
 {
9ae3a8
     return (uint8_t *) (((uintptr_t) rdma_ram_block->local_host_addr)
9ae3a8
                                     + (i << RDMA_REG_CHUNK_SHIFT));
9ae3a8
 }
9ae3a8
 
9ae3a8
-static inline uint8_t *ram_chunk_end(RDMALocalBlock *rdma_ram_block, uint64_t i)
9ae3a8
+static inline uint8_t *ram_chunk_end(const RDMALocalBlock *rdma_ram_block,
9ae3a8
+                                     uint64_t i)
9ae3a8
 {
9ae3a8
     uint8_t *result = ram_chunk_start(rdma_ram_block, i) +
9ae3a8
                                          (1UL << RDMA_REG_CHUNK_SHIFT);
9ae3a8
-- 
9ae3a8
1.7.11.7
9ae3a8