From patchwork Sun Dec 7 21:49:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 5453081 Return-Path: X-Original-To: patchwork-linux-arm@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 B50E09F30B for ; Sun, 7 Dec 2014 21:50:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BC9A520145 for ; Sun, 7 Dec 2014 21:50:24 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C640120115 for ; Sun, 7 Dec 2014 21:50:23 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Xxjfl-0004iX-F4; Sun, 07 Dec 2014 21:47:21 +0000 Received: from mail-wi0-f178.google.com ([209.85.212.178]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Xxjfi-0004ek-2H for linux-arm-kernel@lists.infradead.org; Sun, 07 Dec 2014 21:47:19 +0000 Received: by mail-wi0-f178.google.com with SMTP id em10so3134915wid.11 for ; Sun, 07 Dec 2014 13:46:54 -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=CGoCUY7uPhTBGAGEMF6rHprJGBiyn1TlQNanFQXvTIs=; b=HBJR/RUCU4GqWBSPAN7Tv65YBLPL1HSVJoZdZ00FKCLaMp2MfxALAb7imlUp3oxXM7 4Mkl6pmA0pwh5oGoq2TQyJD9MpQMeRcGq68yLiAfG2T6bFRYuBik7pwn4wXEhiyiV2xv wHl8LJNCPyx26T3udruUaEzLk0CkgL8RVWhLPnp0f+v1tG23iY4bT/2Tb6gZnVzBD6vE El4RhemO7wuNtwwqOUx9AZmWowvq9a3PAO/pMp7ovtwT0EohP7f3J0zcNLn+8g5czjCT GDV5MC39SOkFlgBdDqxIP/oFnXVh/nI4yNfNQaGq0SAYnusGszigZJjjCc7Jo/1Fi00E NlRQ== X-Gm-Message-State: ALoCoQmxn68qzv45kwg0u0GeZfEZ+ib7JquplOQh+qCPh48C/NpHhixFGdji+9Wvs558JYNF5/pj X-Received: by 10.194.175.202 with SMTP id cc10mr41295846wjc.27.1417988814252; Sun, 07 Dec 2014 13:46:54 -0800 (PST) Received: from localhost.localdomain (h-246-111.a218.priv.bahnhof.se. [85.24.246.111]) by mx.google.com with ESMTPSA id p15sm36755758wjr.18.2014.12.07.13.46.53 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 07 Dec 2014 13:46:53 -0800 (PST) From: Rickard Strandqvist To: Tony Lindgren , Russell King Subject: [PATCH] arch: arm: mach-omap2: clkt2xxx_apll.c: Remove some unused functions Date: Sun, 7 Dec 2014 22:49:34 +0100 Message-Id: <1417988974-17688-1-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Mailer: git-send-email 1.7.10.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141207_134718_264389_090F64D1 X-CRM114-Status: GOOD ( 11.12 ) X-Spam-Score: -0.7 (/) Cc: linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Rickard Strandqvist X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Removes some functions that are not used anywhere: omap2_clk_apll54_disable() omap2_clk_apll96_disable() omap2_clk_apll54_enable() omap2_clk_apll96_enable() omap2xxx_get_apll_clkin() omap2_clk_apll96_recalc() omap2_clk_apll54_recalc() This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist --- arch/arm/mach-omap2/clkt2xxx_apll.c | 52 ----------------------------------- arch/arm/mach-omap2/clock2xxx.h | 9 ------ 2 files changed, 61 deletions(-) diff --git a/arch/arm/mach-omap2/clkt2xxx_apll.c b/arch/arm/mach-omap2/clkt2xxx_apll.c index c78e893..65880e7 100644 --- a/arch/arm/mach-omap2/clkt2xxx_apll.c +++ b/arch/arm/mach-omap2/clkt2xxx_apll.c @@ -57,16 +57,6 @@ static bool omap2xxx_clk_apll_locked(struct clk_hw *hw) return ((r & apll_mask) == apll_mask) ? true : false; } -int omap2_clk_apll96_enable(struct clk_hw *hw) -{ - return omap2xxx_cm_apll96_enable(); -} - -int omap2_clk_apll54_enable(struct clk_hw *hw) -{ - return omap2xxx_cm_apll54_enable(); -} - static void _apll96_allow_idle(struct clk_hw_omap *clk) { omap2xxx_cm_set_apll96_auto_low_power_stop(); @@ -87,28 +77,6 @@ static void _apll54_deny_idle(struct clk_hw_omap *clk) omap2xxx_cm_set_apll54_disable_autoidle(); } -void omap2_clk_apll96_disable(struct clk_hw *hw) -{ - omap2xxx_cm_apll96_disable(); -} - -void omap2_clk_apll54_disable(struct clk_hw *hw) -{ - omap2xxx_cm_apll54_disable(); -} - -unsigned long omap2_clk_apll54_recalc(struct clk_hw *hw, - unsigned long parent_rate) -{ - return (omap2xxx_clk_apll_locked(hw)) ? 54000000 : 0; -} - -unsigned long omap2_clk_apll96_recalc(struct clk_hw *hw, - unsigned long parent_rate) -{ - return (omap2xxx_clk_apll_locked(hw)) ? 96000000 : 0; -} - /* Public data */ const struct clk_hw_omap_ops clkhwops_apll54 = { .allow_idle = _apll54_allow_idle, @@ -120,23 +88,3 @@ const struct clk_hw_omap_ops clkhwops_apll96 = { .deny_idle = _apll96_deny_idle, }; -/* Public functions */ - -u32 omap2xxx_get_apll_clkin(void) -{ - u32 aplls, srate = 0; - - aplls = omap2xxx_cm_get_pll_config(); - aplls &= OMAP24XX_APLLS_CLKIN_MASK; - aplls >>= OMAP24XX_APLLS_CLKIN_SHIFT; - - if (aplls == APLLS_CLKIN_19_2MHZ) - srate = 19200000; - else if (aplls == APLLS_CLKIN_13MHZ) - srate = 13000000; - else if (aplls == APLLS_CLKIN_12MHZ) - srate = 12000000; - - return srate; -} - diff --git a/arch/arm/mach-omap2/clock2xxx.h b/arch/arm/mach-omap2/clock2xxx.h index a090225..364a4cc 100644 --- a/arch/arm/mach-omap2/clock2xxx.h +++ b/arch/arm/mach-omap2/clock2xxx.h @@ -22,12 +22,7 @@ unsigned long omap2xxx_sys_clk_recalc(struct clk_hw *clk, unsigned long omap2_osc_clk_recalc(struct clk_hw *clk, unsigned long parent_rate); void omap2xxx_clkt_dpllcore_init(struct clk_hw *hw); -unsigned long omap2_clk_apll54_recalc(struct clk_hw *hw, - unsigned long parent_rate); -unsigned long omap2_clk_apll96_recalc(struct clk_hw *hw, - unsigned long parent_rate); unsigned long omap2xxx_clk_get_core_rate(void); -u32 omap2xxx_get_apll_clkin(void); u32 omap2xxx_get_sysclkdiv(void); void omap2xxx_clk_prepare_for_reboot(void); void omap2xxx_clkt_vps_check_bootloader_rates(void); @@ -48,9 +43,5 @@ int omap2430_clk_init(void); extern struct clk_hw *dclk_hw; int omap2_enable_osc_ck(struct clk_hw *hw); void omap2_disable_osc_ck(struct clk_hw *hw); -int omap2_clk_apll96_enable(struct clk_hw *hw); -int omap2_clk_apll54_enable(struct clk_hw *hw); -void omap2_clk_apll96_disable(struct clk_hw *hw); -void omap2_clk_apll54_disable(struct clk_hw *hw); #endif