Skip to contentSkip to conversation

bitmap: a typo of the example in comment

PATCH Applied Chao Fan 2 participants 3 messages Dec 29, 2016 – Jan 24, 2017

lore
Share & tools
lore

Chao Fan

author
#0 lore raw

PATCH 1/1 bitmap: a typo of the example in comment

* DirtyMemoryBlocks *blocks =
* atomic_rcu_read(&ram_list.dirty_memory[DIRTY_MEMORY_MIGRATION]);

blocks is a pointer, so here should be "->" instead of "."

---
 include/exec/ram_addr.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/exec/ram_addr.h +1 -1
index 54d7108..a60a693 100644
@@ -59,7 +59,7 @@ static inline void *ramblock_ptr(RAMBlock *block, ram_addr_t offset)
  *       atomic_rcu_read(&ram_list.dirty_memory[DIRTY_MEMORY_MIGRATION]);
  *
  *   ram_addr_t idx = (addr >> TARGET_PAGE_BITS) / DIRTY_MEMORY_BLOCK_SIZE;
- *   unsigned long *block = blocks.blocks[idx];
+ *   unsigned long *block = blocks->blocks[idx];
  *   ...access block bitmap...
  *
  *   rcu_read_unlock();
Signature · 1 line
2.9.3
#1 lore raw
Quoted 4 lines · Chao Fan

* DirtyMemoryBlocks *blocks =
* atomic_rcu_read(&ram_list.dirty_memory[DIRTY_MEMORY_MIGRATION]);

blocks is a pointer, so here should be "->" instead of "."

Applied to -trivial, thank you!

/mjt

#2 lore raw
Quoted 7 lines · Michael Tokarev
Quoted 4 lines · Chao Fan

* DirtyMemoryBlocks *blocks =
* atomic_rcu_read(&ram_list.dirty_memory[DIRTY_MEMORY_MIGRATION]);

blocks is a pointer, so here should be "->" instead of "."

Applied to -trivial, thank you!

After rework of this code by pbonzini it's not needed anymore.

Thanks!

/mjt