From nobody Mon Apr 29 01:25:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=oracle.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1547065374130348.2973821404149; Wed, 9 Jan 2019 12:22:54 -0800 (PST) Received: from localhost ([127.0.0.1]:37329 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ghKNI-000315-OR for importer@patchew.org; Wed, 09 Jan 2019 15:22:52 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52368) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ghKML-0002gv-HU for qemu-devel@nongnu.org; Wed, 09 Jan 2019 15:21:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ghKMK-0006Cc-Nw for qemu-devel@nongnu.org; Wed, 09 Jan 2019 15:21:53 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:46012) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ghKMK-0006BE-Fz for qemu-devel@nongnu.org; Wed, 09 Jan 2019 15:21:52 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id x09KE1tm024627; Wed, 9 Jan 2019 20:21:50 GMT Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2120.oracle.com with ESMTP id 2ptn7r3e3e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 09 Jan 2019 20:21:50 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x09KLnOQ012432 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 9 Jan 2019 20:21:49 GMT Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x09KLnH4027824; Wed, 9 Jan 2019 20:21:49 GMT Received: from localhost.localdomain (/77.138.186.148) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 09 Jan 2019 12:21:49 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id; s=corp-2018-07-02; bh=p39tCn9+Wr5+g4DfPn7w8P6trEIERjKfht0xUCEh2d8=; b=yJgbKryv+CuRsBas+eNYnGdzsxlgoeemT4uGC0FSmAtIxwk3dSK69QkbWCOlQWxcy5rA F1IHmtWFUPn+lymskdsNZHUPxnFyNhBMxa9JPnk8+wuN5creWQCVM5sSCEOpYcVjtq7/ Mfw/jZyHLEfnb2n5BXgGLaUHmGvDYy1oxB5qH05twcNQv0Sqhdqcy5c46PpjEYVwRZD/ SkPFhrDfNXVwmkUg9NDFqevgnytQ77ttNPB/VtMQxqeStseipP+F9VK7m8HySx5HV8us g4flKrEIov98Se1lxW2PyZzdg6y/8GmLcimhKIJp6xYVUzcWzp+gEDinN80JPhWl0slx UA== From: Yuval Shaia To: yuval.shaia@oracle.com, marcel.apfelbaum@gmail.com, qemu-devel@nongnu.org Date: Wed, 9 Jan 2019 22:21:40 +0200 Message-Id: <20190109202140.4051-1-yuval.shaia@oracle.com> X-Mailer: git-send-email 2.17.2 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9131 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=832 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1901090165 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 156.151.31.85 Subject: [Qemu-devel] [PATCH] hw/pvrdma: Make function pvrdma_qp_send/recv return void. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The functions handles errors internaly, callers have nothing to do with the return value. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/rdma/vmw/pvrdma_qp_ops.c | 14 ++++++-------- hw/rdma/vmw/pvrdma_qp_ops.h | 4 ++-- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/hw/rdma/vmw/pvrdma_qp_ops.c b/hw/rdma/vmw/pvrdma_qp_ops.c index 0565eba981..ce5a60e184 100644 --- a/hw/rdma/vmw/pvrdma_qp_ops.c +++ b/hw/rdma/vmw/pvrdma_qp_ops.c @@ -143,7 +143,7 @@ int pvrdma_qp_ops_init(void) return 0; } =20 -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) =20 qp =3D rdma_rm_get_qp(&dev->rdma_dev_res, qp_handle); if (unlikely(!qp)) { - return -EINVAL; + pr_dbg("Invalid qpn\n"); + return; } =20 ring =3D (PvrdmaRing *)qp->opaque; @@ -212,11 +213,9 @@ int pvrdma_qp_send(PVRDMADev *dev, uint32_t qp_handle) =20 wqe =3D pvrdma_ring_next_elem_read(ring); } - - return 0; } =20 -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) =20 qp =3D rdma_rm_get_qp(&dev->rdma_dev_res, qp_handle); if (unlikely(!qp)) { - return -EINVAL; + pr_dbg("Invalid qpn\n"); + return; } =20 ring =3D &((PvrdmaRing *)qp->opaque)[1]; @@ -262,8 +262,6 @@ int pvrdma_qp_recv(PVRDMADev *dev, uint32_t qp_handle) =20 wqe =3D pvrdma_ring_next_elem_read(ring); } - - return 0; } =20 void pvrdma_cq_poll(RdmaDeviceResources *dev_res, uint32_t cq_handle) diff --git a/hw/rdma/vmw/pvrdma_qp_ops.h b/hw/rdma/vmw/pvrdma_qp_ops.h index ac46bf7fdf..31cb48ba29 100644 --- a/hw/rdma/vmw/pvrdma_qp_ops.h +++ b/hw/rdma/vmw/pvrdma_qp_ops.h @@ -20,8 +20,8 @@ =20 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); =20 #endif --=20 2.17.2