From patchwork Sun Jun 5 20:45:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 9156323 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 0D2A460467 for ; Sun, 5 Jun 2016 20:46:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F29182793B for ; Sun, 5 Jun 2016 20:46:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E690C2821D; Sun, 5 Jun 2016 20:46:01 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 84D162793B for ; Sun, 5 Jun 2016 20:46:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751825AbcFEUqA (ORCPT ); Sun, 5 Jun 2016 16:46:00 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:36657 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751211AbcFEUp7 (ORCPT ); Sun, 5 Jun 2016 16:45:59 -0400 Received: by mail-wm0-f68.google.com with SMTP id m124so10861249wme.3; Sun, 05 Jun 2016 13:45:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=Rr/OABN+yb6s4h7bnVLQalcaHMpimDLyU8NyMnhU0WQ=; b=JI786xuwzVWXFxDf/W4VtGZ6LUtV8UU8/AmagaC3JBNCdARTxky/fxTyoJrQY7jROn Oyh1l8tc+jAhvlgUrYXAFt7M9uPg8vFIpkdoAQxH47+s3JuBEAI6Y6dzD4rWNiMutIhQ uae0XFrHRxeg5wgr3BZCRMBQzJTbIvhXDMhYligpbZVs8JzfLQ2OxOB5tUhLHZL/QUrk uhcjdqxGcL5gsHY0ksukgJQrlPNz9q4EzbBkvR1zmybWaBnBZiNzhGMuDp9V3u+x+Bfp DBwKs02KHWHnBT0js8HopRaiYHMJiIzqTvl19yufZH02W5dHYS2Jx5la2GctFwHGeIrP Q3OA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Rr/OABN+yb6s4h7bnVLQalcaHMpimDLyU8NyMnhU0WQ=; b=FfcZ7FfjrYlOKUcdlLgsBflJl8VxF3U+OV3kwSLHHIc0HjlWYK2ujSN+0E6fqJ3ZmD cVR4pATDksJ8KdyL6tnl5bHA3AcaPbRNc5u7o2oJFvYI25MdD4u5hKr8WrFOSKqttYYp WTdHmB6UKk2fJdppl3v6Sd1hnhIjaYOyKdzcVAQde20A/0UTROK3c2qpi3Ml5odJ3T0J 7iKe/WXGU/ZbpYi3zxGYgeOzrng8hd4LT1RUjAzk0AE8qDHasWd0gGs8GPxyAIOnfouJ LubT8Ot3IeVvpXl2On/xyEofj0bxT/l4GmkEr3306rd9qFdxBLxa04VJIQyFrc5W4oto TLeA== X-Gm-Message-State: ALyK8tJVrMyXzjyRI8Bg2QhqjKiklCx32iONpDND4F+8eAKMzZy/XoG/VIIC0/nD9K8bvQ== X-Received: by 10.194.206.39 with SMTP id ll7mr12117665wjc.179.1465159557953; Sun, 05 Jun 2016 13:45:57 -0700 (PDT) Received: from sudip-laptop.lan (234.98.208.46.dyn.plus.net. [46.208.98.234]) by smtp.gmail.com with ESMTPSA id wb10sm16859144wjc.8.2016.06.05.13.45.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 05 Jun 2016 13:45:57 -0700 (PDT) From: Sudip Mukherjee To: Doug Ledford , Sean Hefty , Hal Rosenstock Cc: linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, Sudip Mukherjee Subject: [PATCH] IB/core: remove dead code Date: Sun, 5 Jun 2016 21:45:52 +0100 Message-Id: <1465159552-11833-1-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.9.1 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 prot_sg_cnt has been assigned with the value of ret which we have already checked to be non-zero so prot_sg_cnt can never be zero at this point of the code and hence the else part can never execute. Signed-off-by: Sudip Mukherjee --- drivers/infiniband/core/rw.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/infiniband/core/rw.c b/drivers/infiniband/core/rw.c index 1eb9b12..644589b 100644 --- a/drivers/infiniband/core/rw.c +++ b/drivers/infiniband/core/rw.c @@ -398,8 +398,6 @@ int rdma_rw_ctx_signature_init(struct rdma_rw_ctx *ctx, struct ib_qp *qp, else prev_wr->next = &ctx->sig->prot.reg_wr.wr; prev_wr = &ctx->sig->prot.reg_wr.wr; - } else { - ctx->sig->prot.mr = NULL; } ctx->sig->sig_mr = ib_mr_pool_get(qp, &qp->sig_mrs);