From patchwork Thu Oct 31 13:26:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Cohen X-Patchwork-Id: 3120491 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 BBFC09F3E2 for ; Thu, 31 Oct 2013 13:26:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 95AD820453 for ; Thu, 31 Oct 2013 13:26:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6C4B820460 for ; Thu, 31 Oct 2013 13:26:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754101Ab3JaN0y (ORCPT ); Thu, 31 Oct 2013 09:26:54 -0400 Received: from mail-ea0-f176.google.com ([209.85.215.176]:45183 "EHLO mail-ea0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753203Ab3JaN0y (ORCPT ); Thu, 31 Oct 2013 09:26:54 -0400 Received: by mail-ea0-f176.google.com with SMTP id q16so1379431ead.21 for ; Thu, 31 Oct 2013 06:26:53 -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=x3QTPFhlqjovDcmT08Uzy/XQtokThmfKVNjSDMbZOVI=; b=SCMNuWG1PpuA1PCGX6ZJ1M63Bw+k3CxUmW2dSc8p6QkppbuXhBAXsJIoqsaaH8QOYV vH+ysyp0TZU9O8HIR7T6H8twO/vT3qQcVsbElWfXRGHww2X86CgJdLMajFmqHK+5tuhw kdnf+rr4HS/PY3lYnpPsUYF2sMN4NrgyFtXDe6lawUN+VcmpjBSntTF06Q9eYJhfn5kM LbHtHC27wCiYRF/SmNgyGO3VwtrjjJrgZYA9Mp/ITJl0Y6hY2IR2Ulopbcx7FqxfsE7s YIG/TW/0uRldnyovh7JahonYVTBwHCMjz/DtX3f8nZScM+418Y76KAmCPNs3InWzD/ba 0nxg== X-Gm-Message-State: ALoCoQmcNjO3di3a91xmvZyYfHCkPcDKVJHDNS46A7zJJWn6jfln3yfHqnl8h3GSCx29JVqEZEdx X-Received: by 10.15.101.3 with SMTP id bo3mr3194006eeb.77.1383226013308; Thu, 31 Oct 2013 06:26:53 -0700 (PDT) Received: from localhost (out.voltaire.com. [193.47.165.251]) by mx.google.com with ESMTPSA id x47sm8515798eea.16.2013.10.31.06.26.52 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 31 Oct 2013 06:26:52 -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/6] IB/mlx5: Remove dead code Date: Thu, 31 Oct 2013 15:26:31 +0200 Message-Id: <1383225996-14828-2-git-send-email-eli@mellanox.com> X-Mailer: git-send-email 1.8.4.1 In-Reply-To: <1383225996-14828-1-git-send-email-eli@mellanox.com> References: <1383225996-14828-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.4 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 The value of the local variable index is never used in reg_mr_callback(). Signed-off-by: Eli Cohen --- drivers/infiniband/hw/mlx5/mr.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c index 2c4626f..2fa54d1 100644 --- a/drivers/infiniband/hw/mlx5/mr.c +++ b/drivers/infiniband/hw/mlx5/mr.c @@ -73,13 +73,8 @@ static void reg_mr_callback(int status, void *context) struct mlx5_cache_ent *ent = &cache->ent[c]; u8 key; unsigned long delta = jiffies - mr->start; - unsigned long index; unsigned long flags; - index = find_last_bit(&delta, 8 * sizeof(delta)); - if (index == 64) - index = 0; - spin_lock_irqsave(&ent->lock, flags); ent->pending--; spin_unlock_irqrestore(&ent->lock, flags);