mirror of
https://github.com/xemu-project/xemu.git
synced 2025-01-31 09:02:37 +00:00
hw/pvrdma: Make function pvrdma_qp_send/recv return void.
The functions handles errors internaly, callers have nothing to do with the return value. Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com> Message-Id: <20190109202140.4051-1-yuval.shaia@oracle.com> Reviewed-by: Marcel Apfelbaum<marcel.apfelbaum@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
This commit is contained in:
parent
26fd869556
commit
5bb8b73987
@ -143,7 +143,7 @@ int pvrdma_qp_ops_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pvrdma_qp_send(PVRDMADev *dev, uint32_t qp_handle)
|
||||
void pvrdma_qp_send(PVRDMADev *dev, uint32_t qp_handle)
|
||||
{
|
||||
RdmaRmQP *qp;
|
||||
PvrdmaSqWqe *wqe;
|
||||
@ -155,7 +155,8 @@ int pvrdma_qp_send(PVRDMADev *dev, uint32_t qp_handle)
|
||||
|
||||
qp = rdma_rm_get_qp(&dev->rdma_dev_res, qp_handle);
|
||||
if (unlikely(!qp)) {
|
||||
return -EINVAL;
|
||||
pr_dbg("Invalid qpn\n");
|
||||
return;
|
||||
}
|
||||
|
||||
ring = (PvrdmaRing *)qp->opaque;
|
||||
@ -212,11 +213,9 @@ int pvrdma_qp_send(PVRDMADev *dev, uint32_t qp_handle)
|
||||
|
||||
wqe = pvrdma_ring_next_elem_read(ring);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pvrdma_qp_recv(PVRDMADev *dev, uint32_t qp_handle)
|
||||
void pvrdma_qp_recv(PVRDMADev *dev, uint32_t qp_handle)
|
||||
{
|
||||
RdmaRmQP *qp;
|
||||
PvrdmaRqWqe *wqe;
|
||||
@ -226,7 +225,8 @@ int pvrdma_qp_recv(PVRDMADev *dev, uint32_t qp_handle)
|
||||
|
||||
qp = rdma_rm_get_qp(&dev->rdma_dev_res, qp_handle);
|
||||
if (unlikely(!qp)) {
|
||||
return -EINVAL;
|
||||
pr_dbg("Invalid qpn\n");
|
||||
return;
|
||||
}
|
||||
|
||||
ring = &((PvrdmaRing *)qp->opaque)[1];
|
||||
@ -262,8 +262,6 @@ int pvrdma_qp_recv(PVRDMADev *dev, uint32_t qp_handle)
|
||||
|
||||
wqe = pvrdma_ring_next_elem_read(ring);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void pvrdma_cq_poll(RdmaDeviceResources *dev_res, uint32_t cq_handle)
|
||||
|
@ -20,8 +20,8 @@
|
||||
|
||||
int pvrdma_qp_ops_init(void);
|
||||
void pvrdma_qp_ops_fini(void);
|
||||
int pvrdma_qp_send(PVRDMADev *dev, uint32_t qp_handle);
|
||||
int pvrdma_qp_recv(PVRDMADev *dev, uint32_t qp_handle);
|
||||
void pvrdma_qp_send(PVRDMADev *dev, uint32_t qp_handle);
|
||||
void pvrdma_qp_recv(PVRDMADev *dev, uint32_t qp_handle);
|
||||
void pvrdma_cq_poll(RdmaDeviceResources *dev_res, uint32_t cq_handle);
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user