Philippe Mathieu-Daudé <phi...@redhat.com> wrote: > The ramblock_recv_bitmap_offset() function is only used once > in migration/ram.c, move it there. > > Signed-off-by: Philippe Mathieu-Daudé <phi...@redhat.com>
Reviewed-by: Juan Quintela <quint...@redhat.com> But, if you are in the mood: > } > > +static inline unsigned long int ramblock_recv_bitmap_offset(void *host_addr, > + RAMBlock *rb) > +{ > + uint64_t host_addr_offset = > + (uint64_t)(uintptr_t)(host_addr - (void *)rb->host); > + return host_addr_offset >> TARGET_PAGE_BITS; ^^^^^^^^^^^^^^^^ That should be qemu_target_page_bits(). We are trying (not there yet) that migration code is target independent, this TARGET constant are one of the problems (not the only one, thought). And yes, I know that this file has both the function and the constant, sniff. Later, Juan.