aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2023-09-28 15:19:27 +0200
committerJuan Quintela <quintela@redhat.com>2023-10-11 11:17:02 +0200
commitb72eacf3c014ba7cbccee57a791589822e175580 (patch)
tree0852e66bf161594234569a58d49bd2c1ee33a044
parent0e99bb8f54418231baa084f1d8270e7500e48245 (diff)
downloadqemu-b72eacf3c014ba7cbccee57a791589822e175580.zip
qemu-b72eacf3c014ba7cbccee57a791589822e175580.tar.gz
qemu-b72eacf3c014ba7cbccee57a791589822e175580.tar.bz2
migration/rdma: Clean up qemu_rdma_poll()'s return type
qemu_rdma_poll()'s return type is uint64_t, even though it returns 0, -1, or @ret, which is int. Its callers assign the return value to int variables, then check whether it's negative. Unclean. Return int instead. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: Li Zhijian <lizhijian@fujitsu.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Message-ID: <20230928132019.2544702-2-armbru@redhat.com>
-rw-r--r--migration/rdma.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/migration/rdma.c b/migration/rdma.c
index cd5e1af..e72864d 100644
--- a/migration/rdma.c
+++ b/migration/rdma.c
@@ -1469,8 +1469,8 @@ static uint64_t qemu_rdma_make_wrid(uint64_t wr_id, uint64_t index,
* (of any kind) has completed.
* Return the work request ID that completed.
*/
-static uint64_t qemu_rdma_poll(RDMAContext *rdma, struct ibv_cq *cq,
- uint64_t *wr_id_out, uint32_t *byte_len)
+static int qemu_rdma_poll(RDMAContext *rdma, struct ibv_cq *cq,
+ uint64_t *wr_id_out, uint32_t *byte_len)
{
int ret;
struct ibv_wc wc;