[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 14/52] migration/rdma: Use bool for two RDMAContext flags
From: |
Zhijian Li (Fujitsu) |
Subject: |
Re: [PATCH 14/52] migration/rdma: Use bool for two RDMAContext flags |
Date: |
Fri, 22 Sep 2023 07:54:37 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 |
On 18/09/2023 22:41, Markus Armbruster wrote:
> @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: 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 97715dbd78..c02a1c83b2 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.
- Re: [PATCH 11/52] migration/rdma: Drop rdma_add_block() error handling, (continued)
[PATCH 34/52] migration/rdma: Convert qemu_rdma_exchange_recv() to Error, Markus Armbruster, 2023/09/18
[PATCH 30/52] migration/rdma: Delete inappropriate error_report() in macro ERROR(), Markus Armbruster, 2023/09/18
[PATCH 14/52] migration/rdma: Use bool for two RDMAContext flags, Markus Armbruster, 2023/09/18
[PATCH 09/52] migration/rdma: Put @errp parameter last, Markus Armbruster, 2023/09/18
[PATCH 03/52] migration/rdma: Clean up rdma_delete_block()'s return type, Markus Armbruster, 2023/09/18
[PATCH 40/52] migration/rdma: Convert qemu_rdma_write() to Error, Markus Armbruster, 2023/09/18
[PATCH 28/52] migration/rdma: Check negative error values the same way everywhere, Markus Armbruster, 2023/09/18