]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
memory: remove memory_region_set_fd
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Fri, 2 Jun 2017 14:12:26 +0000 (18:12 +0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 15 Jun 2017 09:04:05 +0000 (11:04 +0200)
Now unnecessary since ivshmem uses memory_region_init_ram_from_fd.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20170602141229.15326-7-marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
include/exec/memory.h
memory.c

index 51a54c92d5f73db8783cde678af9612a21eef327..37f8e78e71dc60d57dfa0d0908742b33d3158a04 100644 (file)
@@ -824,17 +824,6 @@ static inline bool memory_region_is_rom(MemoryRegion *mr)
  */
 int memory_region_get_fd(MemoryRegion *mr);
 
-/**
- * memory_region_set_fd: Mark a RAM memory region as backed by a
- * file descriptor.
- *
- * This function is typically used after memory_region_init_ram_ptr().
- *
- * @mr: the memory region being queried.
- * @fd: the file descriptor that backs @mr.
- */
-void memory_region_set_fd(MemoryRegion *mr, int fd);
-
 /**
  * memory_region_from_host: Convert a pointer into a RAM memory region
  * and an offset within it.
index b2ace20bac981fd0b89439e4e4420e9dacd4ffe7..e08fa0ae6c8a302a418214d067f6c918f1056337 100644 (file)
--- a/memory.c
+++ b/memory.c
@@ -1851,16 +1851,6 @@ int memory_region_get_fd(MemoryRegion *mr)
     return fd;
 }
 
-void memory_region_set_fd(MemoryRegion *mr, int fd)
-{
-    rcu_read_lock();
-    while (mr->alias) {
-        mr = mr->alias;
-    }
-    mr->ram_block->fd = fd;
-    rcu_read_unlock();
-}
-
 void *memory_region_get_ram_ptr(MemoryRegion *mr)
 {
     void *ptr;