From patchwork Thu Jan 12 18:57:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roland Dreier X-Patchwork-Id: 135671 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 851C6B7840 for ; Fri, 13 Jan 2012 05:58:15 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754701Ab2ALS6F (ORCPT ); Thu, 12 Jan 2012 13:58:05 -0500 Received: from na3sys010aog112.obsmtp.com ([74.125.245.92]:39705 "HELO na3sys010aog112.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754560Ab2ALS6E (ORCPT ); Thu, 12 Jan 2012 13:58:04 -0500 Received: from mail-tul01m020-f182.google.com ([209.85.214.182]) (using TLSv1) by na3sys010aob112.postini.com ([74.125.244.12]) with SMTP ID DSNKTw8tOi7B4X7zfqDsEGPSLUgI3hej8toV@postini.com; Thu, 12 Jan 2012 10:58:03 PST Received: by mail-tul01m020-f182.google.com with SMTP id ta17so1304126obb.41 for ; Thu, 12 Jan 2012 10:58:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google; h=sender:from:to:cc:subject:date:message-id:x-mailer; bh=etRF3AXvWpQSn2c7liD1MsZuHocBydtdENBCKUeIDDk=; b=NjskWq3w2aP3Vx2EMHYRPaUxw1vpvTX3LYQlYsI3X5rWr3Od6YFEPHU/CZ+hk676nC zhHQ5/8Mpc8lK6PjsxtTnGUv9RTPTAHBp4Z2vWMKw0IDv6RWW7y8894acr2qFCtIEfbP nDGzfGpnWqiCQcHhRikgd0CSaHUQtCN2UWNGM= Received: by 10.50.34.233 with SMTP id c9mr5518426igj.19.1326394682161; Thu, 12 Jan 2012 10:58:02 -0800 (PST) Received: from roland-t410s.purestorage.com ([216.200.155.2]) by mx.google.com with ESMTPS id uc6sm10086480igb.4.2012.01.12.10.57.59 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 12 Jan 2012 10:58:01 -0800 (PST) From: Roland Dreier To: "David S. Miller" , Venkat Venkatsubra Cc: Jonathan Lallinger , Steve Wise , rds-devel@oss.oracle.com, netdev@vger.kernel.org, linux-rdma@vger.kernel.org Subject: [PATCH] RDS: Remove some unused iWARP code Date: Thu, 12 Jan 2012 10:57:56 -0800 Message-Id: <1326394676-28337-1-git-send-email-roland@kernel.org> X-Mailer: git-send-email 1.7.8.3 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Roland Dreier rds_iw_flush_goal() just returns a count, but it is only called in one place and its return value is ignored there. So delete all the dead code. Signed-off-by: Roland Dreier --- net/rds/iw_rdma.c | 15 +-------------- 1 files changed, 1 insertions(+), 14 deletions(-) diff --git a/net/rds/iw_rdma.c b/net/rds/iw_rdma.c index 4e1de17..a817705 100644 --- a/net/rds/iw_rdma.c +++ b/net/rds/iw_rdma.c @@ -477,17 +477,6 @@ void rds_iw_sync_mr(void *trans_private, int direction) } } -static inline unsigned int rds_iw_flush_goal(struct rds_iw_mr_pool *pool, int free_all) -{ - unsigned int item_count; - - item_count = atomic_read(&pool->item_count); - if (free_all) - return item_count; - - return 0; -} - /* * Flush our pool of MRs. * At a minimum, all currently unused MRs are unmapped. @@ -500,7 +489,7 @@ static int rds_iw_flush_mr_pool(struct rds_iw_mr_pool *pool, int free_all) LIST_HEAD(unmap_list); LIST_HEAD(kill_list); unsigned long flags; - unsigned int nfreed = 0, ncleaned = 0, unpinned = 0, free_goal; + unsigned int nfreed = 0, ncleaned = 0, unpinned = 0; int ret = 0; rds_iw_stats_inc(s_iw_rdma_mr_pool_flush); @@ -514,8 +503,6 @@ static int rds_iw_flush_mr_pool(struct rds_iw_mr_pool *pool, int free_all) list_splice_init(&pool->clean_list, &kill_list); spin_unlock_irqrestore(&pool->list_lock, flags); - free_goal = rds_iw_flush_goal(pool, free_all); - /* Batched invalidate of dirty MRs. * For FMR based MRs, the mappings on the unmap list are * actually members of an ibmr (ibmr->mapping). They either