From patchwork Wed Jul 18 16:25:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10532891 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8723E600D0 for ; Wed, 18 Jul 2018 16:25:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A8622999A for ; Wed, 18 Jul 2018 16:25:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6EAB3299AE; Wed, 18 Jul 2018 16:25:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1D3F6299A3 for ; Wed, 18 Jul 2018 16:25:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731422AbeGRREQ (ORCPT ); Wed, 18 Jul 2018 13:04:16 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:62578 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731128AbeGRREQ (ORCPT ); Wed, 18 Jul 2018 13:04:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1531931136; x=1563467136; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=gFiG0lV3HQE9upCoH4U7yPU8mS07Njn/4S/A3IvBkhU=; b=lJiJFviyVIdfi4Q7MGxameVJB1iqZjxhGtcN3j+8uNazmk7+WnNs/VDn 4fRA4ggsfu+DDADn8XvIsuRLd+WK6iSDy/A434eRp3eAqYnQTEn6n7tze MiQfSqb/LbkTnQRhkk1OVsoGbm1KtRsIUriNXKau3fHY1YF4Qx0EyrAS8 HTL4rttsjqoQCCBt0FSc2OCCmExQcBNSmh5wKxj4wGxV1pn6dRQwnrKWI Et4GSs00NFfnz/bxQmDnRGwon1ow+xxYhSoC1flnLKh1E4A4FXGCweeD9 L22mpRBBnl8px/BKE2BSIIYSXbZYNkObI0OaaYy7whUNtYb4THfLxE9WA w==; X-IronPort-AV: E=Sophos;i="5.51,371,1526313600"; d="scan'208";a="85087580" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 19 Jul 2018 00:25:36 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 18 Jul 2018 09:14:07 -0700 Received: from thinkpad-bart.sdcorp.global.sandisk.com ([10.111.67.248]) by uls-op-cesaip02.wdc.com with ESMTP; 18 Jul 2018 09:25:36 -0700 From: Bart Van Assche To: Jason Gunthorpe Cc: Doug Ledford , linux-rdma@vger.kernel.org, Bart Van Assche , Santosh Shilimkar Subject: [PATCH v5 15/20] net/rds: Remove two WARN_ON() statements Date: Wed, 18 Jul 2018 09:25:27 -0700 Message-Id: <20180718162532.14633-16-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180718162532.14633-1-bart.vanassche@wdc.com> References: <20180718162532.14633-1-bart.vanassche@wdc.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Remove two WARN_ON() statements that verify something that is guaranteed by the RDMA API, namely that the failed_wr pointer is not touched if an ib_post_send() call succeeds and that it points at the failed wr if an ib_post_send() call fails. Signed-off-by: Bart Van Assche Cc: Santosh Shilimkar Acked-by: Santosh Shilimkar --- net/rds/ib_frmr.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/rds/ib_frmr.c b/net/rds/ib_frmr.c index 48332a6ed738..0209cd81546c 100644 --- a/net/rds/ib_frmr.c +++ b/net/rds/ib_frmr.c @@ -137,7 +137,6 @@ static int rds_ib_post_reg_frmr(struct rds_ib_mr *ibmr) failed_wr = ®_wr.wr; ret = ib_post_send(ibmr->ic->i_cm_id->qp, ®_wr.wr, &failed_wr); - WARN_ON(failed_wr != ®_wr.wr); if (unlikely(ret)) { /* Failure here can be because of -ENOMEM as well */ frmr->fr_state = FRMR_IS_STALE; @@ -257,7 +256,6 @@ static int rds_ib_post_inv(struct rds_ib_mr *ibmr) failed_wr = s_wr; ret = ib_post_send(i_cm_id->qp, s_wr, &failed_wr); - WARN_ON(failed_wr != s_wr); if (unlikely(ret)) { frmr->fr_state = FRMR_IS_STALE; frmr->fr_inv = false;