diff mbox

[2/2] migration: Make 32bit linux compile with RDMA

Message ID 1447174381-7171-3-git-send-email-quintela@redhat.com
State New
Headers show

Commit Message

Juan Quintela Nov. 10, 2015, 4:53 p.m. UTC
Rest of the file already use that trick. 64bit offsets make no sense in
32bit archs, but that is ram_addr_t for you.

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 migration/rdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Dr. David Alan Gilbert Nov. 10, 2015, 4:56 p.m. UTC | #1
* Juan Quintela (quintela@redhat.com) wrote:
> Rest of the file already use that trick. 64bit offsets make no sense in
> 32bit archs, but that is ram_addr_t for you.
> 
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  migration/rdma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/migration/rdma.c b/migration/rdma.c
> index 553fbd7..dcabb91 100644
> --- a/migration/rdma.c
> +++ b/migration/rdma.c
> @@ -577,7 +577,7 @@ static int rdma_add_block(RDMAContext *rdma, const char *block_name,
>      block->is_ram_block = local->init ? false : true;
> 
>      if (rdma->blockmap) {
> -        g_hash_table_insert(rdma->blockmap, (void *) block_offset, block);
> +        g_hash_table_insert(rdma->blockmap, (void *)(uintptr_t)block_offset, block);

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

Dave

>      }
> 
>      trace_rdma_add_block(block_name, local->nb_blocks,
> -- 
> 2.5.0
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
diff mbox

Patch

diff --git a/migration/rdma.c b/migration/rdma.c
index 553fbd7..dcabb91 100644
--- a/migration/rdma.c
+++ b/migration/rdma.c
@@ -577,7 +577,7 @@  static int rdma_add_block(RDMAContext *rdma, const char *block_name,
     block->is_ram_block = local->init ? false : true;

     if (rdma->blockmap) {
-        g_hash_table_insert(rdma->blockmap, (void *) block_offset, block);
+        g_hash_table_insert(rdma->blockmap, (void *)(uintptr_t)block_offset, block);
     }

     trace_rdma_add_block(block_name, local->nb_blocks,