From patchwork Thu Oct 24 09:01:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Cohen X-Patchwork-Id: 3091141 Return-Path: X-Original-To: patchwork-linux-rdma@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 C06D99F2B7 for ; Thu, 24 Oct 2013 09:02:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 350B0204AF for ; Thu, 24 Oct 2013 09:02:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2B41D204A7 for ; Thu, 24 Oct 2013 09:02:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753980Ab3JXJCd (ORCPT ); Thu, 24 Oct 2013 05:02:33 -0400 Received: from mail-ea0-f177.google.com ([209.85.215.177]:62409 "EHLO mail-ea0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752036Ab3JXJCd (ORCPT ); Thu, 24 Oct 2013 05:02:33 -0400 Received: by mail-ea0-f177.google.com with SMTP id f15so1025042eak.22 for ; Thu, 24 Oct 2013 02:02:31 -0700 (PDT) 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:in-reply-to :references; bh=wni3bi7E88vaGUgBL6Z8iT64MVqFLx9PNY8ou04s478=; b=lyaDY0noLsrhgwKETpMX/xME3memdMsRs7W8QiN/3pzTHE2gRx3hfUBbNsael+TwJe qRoCmfsXL6I7LyhGS0JAr7Ywseec15iPq1JHw7lUg7uiMErrnU317j/OhbVumzOEYCQh MHpRj32q6zmrXHsftzxv4b4xhhI7G6d2mcPacdRg7+tgnxMNkMIutXQDfLykgdmn6w5q Y9O9axlNkZ2SGNzJOjoYZqwFTT9c0fosC4eL0nAFDWS9hkZ3hk2Ss1V+pEsLwC0hxLt+ qJewfPb1XOj0dxW45+WAangGFd9o+EvbisC3Wf3EDEyVW9fZ+6umk0QRNjGADgdwx9Fc Xaeg== X-Gm-Message-State: ALoCoQmQQCIA/jLEK8KMdDKuIOlCtTTMdGVDc7emv0Fs8WMZoaUq5nV4DcIrkQiaAtTA3t6Dxl0z X-Received: by 10.14.32.65 with SMTP id n41mr483079eea.129.1382605351797; Thu, 24 Oct 2013 02:02:31 -0700 (PDT) Received: from localhost (out.voltaire.com. [193.47.165.251]) by mx.google.com with ESMTPSA id d7sm1710474eem.8.2013.10.24.02.02.30 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 24 Oct 2013 02:02:31 -0700 (PDT) From: Eli Cohen To: roland@kernel.org Cc: linux-rdma@vger.kernel.org, amirv@mellanox.com, ogerlitz@mellanox.com, yevgenyp@mellanox.com, Eli Cohen Subject: [PATCH for-next 1/4] IB/mlx5: Remove dead code in mr.c Date: Thu, 24 Oct 2013 12:01:00 +0300 Message-Id: <1382605263-6822-2-git-send-email-eli@mellanox.com> X-Mailer: git-send-email 1.8.4.1 In-Reply-To: <1382605263-6822-1-git-send-email-eli@mellanox.com> References: <1382605263-6822-1-git-send-email-eli@mellanox.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 In mlx5_mr_cache_init() the size variable is not used so remove it to avoid compiler warnings when running with make W=1. Signed-off-by: Eli Cohen --- drivers/infiniband/hw/mlx5/mr.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c index d7f2022..2c4626f 100644 --- a/drivers/infiniband/hw/mlx5/mr.c +++ b/drivers/infiniband/hw/mlx5/mr.c @@ -40,7 +40,6 @@ #include "mlx5_ib.h" enum { - DEF_CACHE_SIZE = 10, MAX_PENDING_REG_MR = 8, }; @@ -550,7 +549,6 @@ int mlx5_mr_cache_init(struct mlx5_ib_dev *dev) struct mlx5_mr_cache *cache = &dev->cache; struct mlx5_cache_ent *ent; int limit; - int size; int err; int i; @@ -571,13 +569,11 @@ int mlx5_mr_cache_init(struct mlx5_ib_dev *dev) ent->order = i + 2; ent->dev = dev; - if (dev->mdev.profile->mask & MLX5_PROF_MASK_MR_CACHE) { - size = dev->mdev.profile->mr_cache[i].size; + if (dev->mdev.profile->mask & MLX5_PROF_MASK_MR_CACHE) limit = dev->mdev.profile->mr_cache[i].limit; - } else { - size = DEF_CACHE_SIZE; + else limit = 0; - } + INIT_WORK(&ent->work, cache_work_func); INIT_DELAYED_WORK(&ent->dwork, delayed_cache_work_func); ent->limit = limit;