Re: [PATCH 23/52] migration/rdma: Clean up qemu_rdma_wait_comp_channel()'s error value

2023-09-25 Thread Markus Armbruster
"Zhijian Li (Fujitsu)" writes: > On 18/09/2023 22:41, Markus Armbruster wrote: >> qemu_rdma_wait_comp_channel() returns 0 on success, and either -1 or >> rdma->error_state on failure. Callers actually expect a negative >> error value. > > I don't see the only one callers expect a negative

Re: [PATCH 23/52] migration/rdma: Clean up qemu_rdma_wait_comp_channel()'s error value

2023-09-24 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > qemu_rdma_wait_comp_channel() returns 0 on success, and either -1 or > rdma->error_state on failure. Callers actually expect a negative > error value. I don't see the only one callers expect a negative error code. migration/rdma.c:1654:

[PATCH 23/52] migration/rdma: Clean up qemu_rdma_wait_comp_channel()'s error value

2023-09-18 Thread Markus Armbruster
qemu_rdma_wait_comp_channel() returns 0 on success, and either -1 or rdma->error_state on failure. Callers actually expect a negative error value. I believe rdma->error_state can't be positive, but let's make things more obvious by simply returning -1 on any failure. Signed-off-by: Markus