From patchwork Sun Jan 11 13:09:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 5605991 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DB1219F358 for ; Sun, 11 Jan 2015 13:07:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F018B205F9 for ; Sun, 11 Jan 2015 13:07:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 179CF205F7 for ; Sun, 11 Jan 2015 13:07:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751224AbbAKNGs (ORCPT ); Sun, 11 Jan 2015 08:06:48 -0500 Received: from mail-we0-f176.google.com ([74.125.82.176]:42691 "EHLO mail-we0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750939AbbAKNGs (ORCPT ); Sun, 11 Jan 2015 08:06:48 -0500 Received: by mail-we0-f176.google.com with SMTP id w61so14947047wes.7 for ; Sun, 11 Jan 2015 05:06:46 -0800 (PST) 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; bh=TCMmiEhnC1rAYmPx2bnSuxT7J88xR6BTTT6IDZXA+Qk=; b=SQIefm6tEPhTOn/IInZVZbq75QRZJIf1cEF8xypbHfwy25kKCeSSYL2BybRPBLRTUd vPxFTwi4V29RO7i/LLY2CUhuwEYCSx65yCJ3WAw2uKXF06GTCeDzmp6gwecvUzLh+iBm 3y5SwfpNNN1hBIXigFOE7DK96yueCUC2cQylKr9aWKNfJDYZD+aBgweeVWnB4+1apK1Y 52tB64AoAlZm4xTycSzqKzSlhGApDQgrZ0MFN+UDp3FAa1vUUZDijg0fODmmvC+y369W VIaA8qyY9c8+gGSPnNFfzeeGW4pMksQROqH5wTMba4gcnsgyS2Q0T6ydL/eIEH3sjbXM ohIw== X-Gm-Message-State: ALoCoQlJ4SlpNvhfP7asxY1TmewzRd4H+EKN4yJlr2rn1RawsLZvJ1cAtVLH3X/Zso9U5B/Xz/2Q X-Received: by 10.180.85.33 with SMTP id e1mr21218100wiz.61.1420981606549; Sun, 11 Jan 2015 05:06:46 -0800 (PST) Received: from localhost.localdomain (h-246-111.a218.priv.bahnhof.se. [85.24.246.111]) by mx.google.com with ESMTPSA id hl1sm17502852wjc.18.2015.01.11.05.06.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Jan 2015 05:06:45 -0800 (PST) From: Rickard Strandqvist To: Roland Dreier , Sean Hefty Cc: Rickard Strandqvist , Hal Rosenstock , Or Gerlitz , Matan Barak , Ira Weiny , Wei Yongjun , Moni Shoua , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] infiniband: core: cm: Remove unused function Date: Sun, 11 Jan 2015 14:09:52 +0100 Message-Id: <1420981792-16530-1-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Mailer: git-send-email 1.7.10.4 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 Remove the function cm_is_active_peer() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist --- drivers/infiniband/core/cm.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c index e28a494..106dfee 100644 --- a/drivers/infiniband/core/cm.c +++ b/drivers/infiniband/core/cm.c @@ -1224,14 +1224,6 @@ static int cm_issue_rej(struct cm_port *port, return ret; } -static inline int cm_is_active_peer(__be64 local_ca_guid, __be64 remote_ca_guid, - __be32 local_qpn, __be32 remote_qpn) -{ - return (be64_to_cpu(local_ca_guid) > be64_to_cpu(remote_ca_guid) || - ((local_ca_guid == remote_ca_guid) && - (be32_to_cpu(local_qpn) > be32_to_cpu(remote_qpn)))); -} - static void cm_format_paths_from_req(struct cm_req_msg *req_msg, struct ib_sa_path_rec *primary_path, struct ib_sa_path_rec *alt_path)