Skip to contentSkip to conversation

exec/memory: Fix memory_region_init_alias() documentation

PATCH-for-5.1? Philippe Mathieu-Daudé 1 participant 1 message Jul 23, 2020

lore
Share & tools
lore
#0 lore raw

The @size argument refers to the size of the aliased section, not the original region.

---
 include/exec/memory.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/exec/memory.h +2 -2
index 307e527835..10a809ee10 100644
@@ -980,8 +980,8 @@ void memory_region_init_ram_device_ptr(MemoryRegion *mr,
  * @name: used for debugging; not visible to the user or ABI
  * @orig: the region to be referenced; @mr will be equivalent to
  *        @orig between @offset and @offset + @size - 1.
- * @offset: start of the section in @orig to be referenced.
- * @size: size of the region.
+ * @offset: start of the section in @orig.
+ * @size: size of the section in @orig.
  */
 void memory_region_init_alias(MemoryRegion *mr,
                               struct Object *owner,
Signature · 1 line
2.21.3