[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 15/20] exec: Let address_space_unmap() use a boolean 'is_write
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v3 15/20] exec: Let address_space_unmap() use a boolean 'is_write' argument |
Date: |
Thu, 20 Feb 2020 14:05:43 +0100 |
The 'is_write' argument is either 0 or 1.
Convert it to a boolean type.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
include/exec/memory.h | 2 +-
exec.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/exec/memory.h b/include/exec/memory.h
index afee185eae..1614d9a02c 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -2329,7 +2329,7 @@ void *address_space_map(AddressSpace *as, hwaddr addr,
* @is_write: indicates the transfer direction
*/
void address_space_unmap(AddressSpace *as, void *buffer, hwaddr len,
- int is_write, hwaddr access_len);
+ bool is_write, hwaddr access_len);
/* Internal functions, part of the implementation of address_space_read. */
diff --git a/exec.c b/exec.c
index 01437be691..16974d4f4b 100644
--- a/exec.c
+++ b/exec.c
@@ -3598,11 +3598,11 @@ void *address_space_map(AddressSpace *as,
}
/* Unmaps a memory region previously mapped by address_space_map().
- * Will also mark the memory as dirty if is_write == 1. access_len gives
+ * Will also mark the memory as dirty if is_write is true. access_len gives
* the amount of memory that was actually read or written by the caller.
*/
void address_space_unmap(AddressSpace *as, void *buffer, hwaddr len,
- int is_write, hwaddr access_len)
+ bool is_write, hwaddr access_len)
{
if (buffer != bounce.buffer) {
MemoryRegion *mr;
--
2.21.1
- [PATCH v3 05/20] exec: Let flatview API take void pointer arguments, (continued)
- [PATCH v3 05/20] exec: Let flatview API take void pointer arguments, Philippe Mathieu-Daudé, 2020/02/20
- [PATCH v3 06/20] exec: Let the address_space API use void pointer arguments, Philippe Mathieu-Daudé, 2020/02/20
- [PATCH v3 07/20] hw/net: Avoid casting non-const pointer, use address_space_write(), Philippe Mathieu-Daudé, 2020/02/20
- [PATCH v3 08/20] Remove unnecessary cast when using the address_space API, Philippe Mathieu-Daudé, 2020/02/20
- [PATCH v3 09/20] exec: Let the cpu_[physical]_memory API use void pointer arguments, Philippe Mathieu-Daudé, 2020/02/20
- [PATCH v3 11/20] hw/ide/internal: Remove unused DMARestartFunc typedef, Philippe Mathieu-Daudé, 2020/02/20
- [PATCH v3 12/20] hw/ide: Let the DMAIntFunc prototype use a boolean 'is_write' argument, Philippe Mathieu-Daudé, 2020/02/20
- [PATCH v3 13/20] hw/virtio: Let virtqueue_map_iovec() use a boolean 'is_write' argument, Philippe Mathieu-Daudé, 2020/02/20
- [PATCH v3 14/20] hw/virtio: Let vhost_memory_map() use a boolean 'is_write' argument, Philippe Mathieu-Daudé, 2020/02/20
- [PATCH v3 15/20] exec: Let address_space_unmap() use a boolean 'is_write' argument,
Philippe Mathieu-Daudé <=
- [PATCH v3 16/20] Let address_space_rw() calls pass a boolean 'is_write' argument, Philippe Mathieu-Daudé, 2020/02/20
- [PATCH v3 18/20] exec: Let cpu_[physical]_memory API use a boolean 'is_write' argument, Philippe Mathieu-Daudé, 2020/02/20
- [PATCH v3 17/20] Avoid address_space_rw() with a constant is_write argument, Philippe Mathieu-Daudé, 2020/02/20
- [PATCH v3 10/20] Remove unnecessary cast when using the cpu_[physical]_memory API, Philippe Mathieu-Daudé, 2020/02/20
- [PATCH v3 19/20] Let cpu_[physical]_memory() calls pass a boolean 'is_write' argument, Philippe Mathieu-Daudé, 2020/02/20