[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 15/53] migration/rdma: Use bool for two RDMAContext flags
From: |
Markus Armbruster |
Subject: |
[PATCH v2 15/53] migration/rdma: Use bool for two RDMAContext flags |
Date: |
Thu, 28 Sep 2023 15:19:41 +0200 |
@error_reported and @received_error are flags. The latter is even
assigned bool true. Change them from int to bool.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Li Zhijian <lizhijian@fujitsu.com>
---
migration/rdma.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/migration/rdma.c b/migration/rdma.c
index 73dd34d8f3..28097ce604 100644
--- a/migration/rdma.c
+++ b/migration/rdma.c
@@ -91,7 +91,7 @@ static uint32_t known_capabilities = RDMA_CAPABILITY_PIN_ALL;
if (!rdma->error_reported) { \
error_report("RDMA is in an error state waiting migration" \
" to abort!"); \
- rdma->error_reported = 1; \
+ rdma->error_reported = true; \
} \
return rdma->error_state; \
} \
@@ -365,8 +365,8 @@ typedef struct RDMAContext {
* and remember the error state.
*/
int error_state;
- int error_reported;
- int received_error;
+ bool error_reported;
+ bool received_error;
/*
* Description of ram blocks used throughout the code.
--
2.41.0
- [PATCH v2 08/53] migration/rdma: Give qio_channel_rdma_source_funcs internal linkage, (continued)
- [PATCH v2 08/53] migration/rdma: Give qio_channel_rdma_source_funcs internal linkage, Markus Armbruster, 2023/09/28
- [PATCH v2 12/53] migration/rdma: Drop rdma_add_block() error handling, Markus Armbruster, 2023/09/28
- [PATCH v2 01/53] migration/rdma: Clean up qemu_rdma_poll()'s return type, Markus Armbruster, 2023/09/28
- [PATCH v2 04/53] migration/rdma: Drop fragile wr_id formatting, Markus Armbruster, 2023/09/28
- [PATCH v2 18/53] migration/rdma: Fix io_writev(), io_readv() methods to obey contract, Markus Armbruster, 2023/09/28
- [PATCH v2 09/53] migration/rdma: Fix qemu_rdma_accept() to return failure on errors, Markus Armbruster, 2023/09/28
- [PATCH v2 07/53] migration/rdma: Clean up two more harmless signed vs. unsigned issues, Markus Armbruster, 2023/09/28
- [PATCH v2 26/53] migration/rdma: Dumb down remaining int error values to -1, Markus Armbruster, 2023/09/28
- [PATCH v2 02/53] migration/rdma: Clean up qemu_rdma_data_init()'s return type, Markus Armbruster, 2023/09/28
- [PATCH v2 28/53] migration/rdma: Drop superfluous assignments to @ret, Markus Armbruster, 2023/09/28
- [PATCH v2 15/53] migration/rdma: Use bool for two RDMAContext flags,
Markus Armbruster <=
- [PATCH v2 36/53] migration/rdma: Convert qemu_rdma_exchange_send() to Error, Markus Armbruster, 2023/09/28
- [PATCH v2 38/53] migration/rdma: Convert qemu_rdma_reg_whole_ram_blocks() to Error, Markus Armbruster, 2023/09/28
- [PATCH v2 05/53] migration/rdma: Consistently use uint64_t for work request IDs, Markus Armbruster, 2023/09/28
- [PATCH v2 03/53] migration/rdma: Clean up rdma_delete_block()'s return type, Markus Armbruster, 2023/09/28
- [PATCH v2 19/53] migration/rdma: Replace dangerous macro CHECK_ERROR_STATE(), Markus Armbruster, 2023/09/28
- [PATCH v2 32/53] migration/rdma: Retire macro ERROR(), Markus Armbruster, 2023/09/28
- [PATCH v2 46/53] migration/rdma: Silence qemu_rdma_connect(), Markus Armbruster, 2023/09/28
- [PATCH v2 31/53] migration/rdma: Delete inappropriate error_report() in macro ERROR(), Markus Armbruster, 2023/09/28
- [PATCH v2 43/53] migration/rdma: Convert qemu_rdma_post_recv_control() to Error, Markus Armbruster, 2023/09/28
- [PATCH v2 17/53] migration/rdma: Ditch useless numeric error codes in error messages, Markus Armbruster, 2023/09/28