From patchwork Wed Sep 15 16:32:39 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 183082 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8FGXrrm011339 for ; Wed, 15 Sep 2010 16:33:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752681Ab0IOQdw (ORCPT ); Wed, 15 Sep 2010 12:33:52 -0400 Received: from mail-pz0-f46.google.com ([209.85.210.46]:43264 "EHLO mail-pz0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752456Ab0IOQdv (ORCPT ); Wed, 15 Sep 2010 12:33:51 -0400 Received: by pzk34 with SMTP id 34so111162pzk.19 for ; Wed, 15 Sep 2010 09:33:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=soMhdlP2bMl8LMuPGN5L9PZIPw6YAfSl0Oa+/uDlLJo=; b=IIFLag1YUANubDPYnMbtsIzr22w8s0I3ZZzpl41N915qPhqeRcKUDl5TM8BmqTEC8V GSEZ1ikcSqAx8Bp3b90pv0A4MloKJ1BRqRyl/1u3PzoVt/71sginczEKL5+p0JAcck8T Q1Lxe4AQIpQugPot/joRoXf2YViVApeHvLiDQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=jVv1s/g4Pwy7A8JhL4038w+8KGbaSh106uw03PDNCZSu7oElVZPrOj1Fl2UonVKo/i LKM2vNzy3HU/tkIkPQJ88IXGFlEcord4s2VZURELeX7ZwYlMt7T0wgjGZNYHUwSXAuyt /I/ntwn8AaCrR9jRKCMR2A8fdwxOyP3VXS/t8= Received: by 10.142.210.2 with SMTP id i2mr1617742wfg.172.1284568431247; Wed, 15 Sep 2010 09:33:51 -0700 (PDT) Received: from bicker ([41.205.146.22]) by mx.google.com with ESMTPS id t18sm1863970wfc.11.2010.09.15.09.33.35 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 15 Sep 2010 09:33:49 -0700 (PDT) Date: Wed, 15 Sep 2010 18:32:39 +0200 From: Dan Carpenter To: Faisal Latif Cc: Chien Tung , Roland Dreier , Or Gerlitz , linux-rdma@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] infiniband: nes_cm: remove unneeded variable Message-ID: <20100915160726.GA5854@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Wed, 15 Sep 2010 16:33:53 +0000 (UTC) diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c index 61e0efd..5c8d34c 100644 --- a/drivers/infiniband/hw/nes/nes_cm.c +++ b/drivers/infiniband/hw/nes/nes_cm.c @@ -1424,7 +1424,6 @@ static void handle_rst_pkt(struct nes_cm_node *cm_node, struct sk_buff *skb, { int reset = 0; /* whether to send reset in case of err.. */ - int passive_state; atomic_inc(&cm_resets_recvd); nes_debug(NES_DBG_CM, "Received Reset, cm_node = %p, state = %u." " refcnt=%d\n", cm_node, cm_node->state, @@ -1439,7 +1438,7 @@ static void handle_rst_pkt(struct nes_cm_node *cm_node, struct sk_buff *skb, active_open_err(cm_node, skb, reset); break; case NES_CM_STATE_MPAREQ_RCVD: - passive_state = atomic_add_return(1, &cm_node->passive_state); + atomic_inc(&cm_node->passive_state); dev_kfree_skb_any(skb); break; case NES_CM_STATE_ESTABLISHED: