From patchwork Sun Jan 11 14:04:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 5606211 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 F40089F357 for ; Sun, 11 Jan 2015 14:07:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 137312063B for ; Sun, 11 Jan 2015 14:07:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 040022062D for ; Sun, 11 Jan 2015 14:07:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751678AbbAKOHe (ORCPT ); Sun, 11 Jan 2015 09:07:34 -0500 Received: from mail-wg0-f53.google.com ([74.125.82.53]:51472 "EHLO mail-wg0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751541AbbAKOHd (ORCPT ); Sun, 11 Jan 2015 09:07:33 -0500 Received: by mail-wg0-f53.google.com with SMTP id x13so15284130wgg.12 for ; Sun, 11 Jan 2015 06:07:32 -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=DXVeSHOdtfOuhRXlP4+yJr66NtQ1FjPiCtr8p5ZyOGY=; b=Y8EvzOU6S6LJjN8N5pCqeD2FBUCfTDajtsF/AO0I+LHO4EDyiC5Z4Wv8D/NOoXrhiI /g60cm9CA6VJaIf2raIg483Vqk53tQSqH0c3VCHSog6jtKxnARCrc4j7t98UJQ2+ZOGy mh6DBqQZwVgk4a49UCzMQCvqktfc1utDWx2CloV+pDfU8f1o4CX27wL4GD1/0qukP02L 6zX/JXcMNp2Ec9LLxZ9JG4ziSVFlEShFPDdM+XKOR6Wa4Ie0cLXGLaidnpISccvc/D6C D5fWulc51jbCjtKs+jfQBBDJhhgG7iCrdGfJ1mskeYdaF8OX97rpgO7PD3HFkmmZb+3P NfAg== X-Gm-Message-State: ALoCoQkuDgXPyg0PnDnDJX0CvG4hBGNEWM3kIuihD9QKqmxlKiu3c2FkDkWifT1MRCxPKgS30XUD X-Received: by 10.181.12.100 with SMTP id ep4mr21605768wid.62.1420984895855; Sun, 11 Jan 2015 06:01:35 -0800 (PST) Received: from localhost.localdomain (h-246-111.a218.priv.bahnhof.se. [85.24.246.111]) by mx.google.com with ESMTPSA id fa13sm6256311wid.17.2015.01.11.06.01.34 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Jan 2015 06:01:35 -0800 (PST) From: Rickard Strandqvist To: Mike Marciniszyn , Roland Dreier Cc: Rickard Strandqvist , Sean Hefty , Hal Rosenstock , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] IB: qib: qib_iba7322: Remove unused function Date: Sun, 11 Jan 2015 15:04:42 +0100 Message-Id: <1420985082-17977-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 qib_read_ureg() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist Acked-by: Mike Marciniszyn --- drivers/infiniband/hw/qib/qib_iba7322.c | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/drivers/infiniband/hw/qib/qib_iba7322.c b/drivers/infiniband/hw/qib/qib_iba7322.c index a7eb325..a57b1a2 100644 --- a/drivers/infiniband/hw/qib/qib_iba7322.c +++ b/drivers/infiniband/hw/qib/qib_iba7322.c @@ -783,28 +783,6 @@ static inline u32 qib_read_ureg32(const struct qib_devdata *dd, } /** - * qib_read_ureg - read virtualized per-context register - * @dd: device - * @regno: register number - * @ctxt: context number - * - * Return the contents of a register that is virtualized to be per context. - * Returns -1 on errors (not distinguishable from valid contents at - * runtime; we may add a separate error variable at some point). - */ -static inline u64 qib_read_ureg(const struct qib_devdata *dd, - enum qib_ureg regno, int ctxt) -{ - - if (!dd->kregbase || !(dd->flags & QIB_PRESENT)) - return 0; - return readq(regno + (u64 __iomem *)( - (dd->ureg_align * ctxt) + (dd->userbase ? - (char __iomem *)dd->userbase : - (char __iomem *)dd->kregbase + dd->uregbase))); -} - -/** * qib_write_ureg - write virtualized per-context register * @dd: device * @regno: register number