From patchwork Mon Jul 28 15:29:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: HIMANGI SARAOGI X-Patchwork-Id: 4635281 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B10379F32F for ; Mon, 28 Jul 2014 15:29:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 004D720136 for ; Mon, 28 Jul 2014 15:29:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2269F2017D for ; Mon, 28 Jul 2014 15:29:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751974AbaG1P3r (ORCPT ); Mon, 28 Jul 2014 11:29:47 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:39872 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751946AbaG1P3q (ORCPT ); Mon, 28 Jul 2014 11:29:46 -0400 Received: by mail-pa0-f45.google.com with SMTP id eu11so10713066pac.32 for ; Mon, 28 Jul 2014 08:29:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=ZfPAGNHzBYvBuvTqlEdfFnwmkfCYXpPTvQ5iA+NVQ+s=; b=mBDqqQEnK7bXy4kVKwyNJcRA6fsVAQBuzZsFpy2srvQ1VpI/YGihXQiq0wVjAvUuuB Sz0eTA8CtW28n/tlb8VaGVp/t7bxJIZG/EJO6Ss97Dri8/27Ir+ubAO83TT36PmNijpG rbO1YYiBwZsyumWKd41uVjqgOm+fNYZYuXjNgrSHa6dtCwN+V5kDVjJJz+/Nx22DqDir FwnAm2jMmwmvbKl8NffNkL4Z4w90DkGH6cP/nVsFmgO00aJEzg92KCYk+flebeH8CVlU 4BACdmikobNs6n/CDCLvOFww8828mrfkcXBCYEMwtba1+Qbso2KQ1PwdExDn/irXGK2g 9/hg== X-Received: by 10.66.251.200 with SMTP id zm8mr16352610pac.97.1406561386345; Mon, 28 Jul 2014 08:29:46 -0700 (PDT) Received: from localhost ([125.17.132.98]) by mx.google.com with ESMTPSA id v1sm18001915pbs.1.2014.07.28.08.29.41 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 28 Jul 2014 08:29:44 -0700 (PDT) Date: Mon, 28 Jul 2014 20:59:38 +0530 From: Himangi Saraogi To: Trond Myklebust , "J. Bruce Fields" , "David S. Miller" , linux-nfs@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: julia.lawall@lip6.fr Subject: [PATCH] svcrdma: delete double assignment Message-ID: <20140728152938.GA3040@himangi-Dell> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Delete successive assignments to the same location. A simplified version of Coccinelle semantic match that finds this problem is as follows: // @@ expression i; @@ *i = ...; i = ...; // Signed-off-by: Himangi Saraogi --- Should the assignment be the maximum of the 2 values? net/sunrpc/xprtrdma/svc_rdma_transport.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c index 06a5d92..8976529 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c @@ -956,7 +956,6 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt) dprintk("svcrdma: failed to create QP, ret=%d\n", ret); goto errout; } - newxprt->sc_max_sge = qp_attr.cap.max_send_sge; newxprt->sc_max_sge = qp_attr.cap.max_recv_sge; newxprt->sc_sq_depth = qp_attr.cap.max_send_wr; newxprt->sc_max_requests = qp_attr.cap.max_recv_wr;