From patchwork Wed Oct 17 13:41:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 10645647 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1588A157A for ; Wed, 17 Oct 2018 13:45:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0015E2B076 for ; Wed, 17 Oct 2018 13:45:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E80B32B09D; Wed, 17 Oct 2018 13:45:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8D3EF2B076 for ; Wed, 17 Oct 2018 13:45:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-reply-to:Message-id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=97BxDP5X8T7a4xao4GiakLYgdJi9MS8cw1YbmBg6iEs=; b=KfmvUJJ3u5BieFmZCfv6O62C5b YPnHJp0khefF93T6K1UQi/JSZQZWyzHspJ6+BvugjaNsOXDYdVgj4Z7gg7cZRj82hsQc7AXXfKlIG PfesHk6Mx9F9uGf4b9fauaZUtuIAMIJKbKYvZrDhLX5QJbYmxujinuZNWqo/ZkixNaWeepWHBQwD4 KDBVs1U1F0JH9yFwGMHjMArjViI/+5eHcVSrqrZjtRxl6VBTcAhZMwZ1a2xsOV3JZ7sIBa2DeJAuG qgHLhBVdkPj/Du200mpGqfmsoUlX7THLUwY+Hojzeo+Wm8T99jGhNltq8OUpshsoXJW5VW3OsRA28 TX1TZ72w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gCm8t-000802-R1; Wed, 17 Oct 2018 13:45:43 +0000 Received: from mailout1.w1.samsung.com ([210.118.77.11]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gCm5b-0005Hl-59 for linux-arm-kernel@lists.infradead.org; Wed, 17 Oct 2018 13:42:24 +0000 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20181017134206euoutp01167c8c6b6e96d4baf23f708a1bb54915~eaSQ5C5kt1251312513euoutp01C; Wed, 17 Oct 2018 13:42:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20181017134206euoutp01167c8c6b6e96d4baf23f708a1bb54915~eaSQ5C5kt1251312513euoutp01C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1539783726; bh=zJetpoNhW01GT4Xt0gk6SKTpHAA/tdY/kH9zyQ9f4Ok=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=kv7DMbMYq4g6qZ9MUmdKcg/NrURhwwp8toEcAWkscYtZspY6jpOEeUAhjTGGzB2CH tgVekNF3XGr5BTmFW3PVoyygd87K/kiGYNn1BvkIJgaMIB9Z2wiNnAcXFg46k5c5/k fsByNleCuE3ZNpAUdYWFgg3o5dztGdgoUn17+ABQ= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20181017134206eucas1p16493289394fa81fe801c0001e7b1cf6d~eaSQWvqic1588515885eucas1p1R; Wed, 17 Oct 2018 13:42:06 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 04.AD.04806.D2C37CB5; Wed, 17 Oct 2018 14:42:05 +0100 (BST) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20181017134205eucas1p148faab76ac153e9afbb8a519e6d8d1e2~eaSPnTYDM1901519015eucas1p1I; Wed, 17 Oct 2018 13:42:05 +0000 (GMT) X-AuditID: cbfec7f5-34dff700000012c6-d7-5bc73c2d9acf Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 68.22.04284.D2C37CB5; Wed, 17 Oct 2018 14:42:05 +0100 (BST) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PGQ001A0WQ1IZ80@eusync4.samsung.com>; Wed, 17 Oct 2018 14:42:05 +0100 (BST) From: Marek Szyprowski To: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 1/6] clocksource: exynos_mct: Remove dead code Date: Wed, 17 Oct 2018 15:41:54 +0200 Message-id: <20181017134159.9656-2-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20181017134159.9656-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrDIsWRmVeSWpSXmKPExsWy7djPc7q6NsejDX5vsrbYOGM9q8X7ZT2M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czLLUov0 7RK4Mnatsi2YzFexp7GBrYHxIXcXIyeHhICJxMPunexdjFwcQgJLGCWevVsC5TQxSXR2dbKB VLEJGEp0ve0Cs0UEsiXm7+1mB7GZBZYwS9y87wBiCws4Skx++5QRxGYRUJW4dXAPWD2vgI3E kstXWCG2yUus3nCAuYuRg4NTwFZibX8VSFgIqOTl57lMExh5FjAyrGIUSS0tzk3PLTbUK07M LS7NS9dLzs/dxAgMwm3Hfm7ewXhpY/AhRgEORiUe3h1ix6KFWBPLiitzDzFKcDArifBWKR6P FuJNSaysSi3Kjy8qzUktPsQozcGiJM573qAySkggPbEkNTs1tSC1CCbLxMEp1cC4iDdoqZ2F 4OMt+8KWxYS8dot4In2/vvdGKIdZ3XHTOvv2dXwNMX7pK102b4iTWin89ICXdVKYoY7961Vt h1bHyHGEKmt82/zOpHdx3fMQw8qUFWJGle11f2dqbApb+3T34VDJgq1bPd8IW9tJlWyde+fD sfaEnGvdgXeldObI9XyLuamtkqjEUpyRaKjFXFScCAAwbEFfPgIAAA== X-CMS-MailID: 20181017134205eucas1p148faab76ac153e9afbb8a519e6d8d1e2 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181017134205eucas1p148faab76ac153e9afbb8a519e6d8d1e2 References: <20181017134159.9656-1-m.szyprowski@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181017_064219_372708_C1A70A8E X-CRM114-Status: GOOD ( 14.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bartlomiej Zolnierkiewicz , Marc Zyngier , Catalin Marinas , Daniel Lezcano , Will Deacon , Krzysztof Kozlowski , Inki Dae , Chanwoo Choi , Thomas Gleixner , Marek Szyprowski MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Exynos Multi-Core Timer driver is used only on device-tree based systems, so remove non-dt related code. In case of !CONFIG_OF the code is anyway equal because of_irq_count() has a stub returning 0. Device node pointer is always provided when driver has been probed from device tree. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi --- drivers/clocksource/exynos_mct.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c index 7a244b681876..ef18bbf8d20c 100644 --- a/drivers/clocksource/exynos_mct.c +++ b/drivers/clocksource/exynos_mct.c @@ -507,13 +507,12 @@ static int __init exynos4_timer_resources(struct device_node *np, void __iomem * int err, cpu; struct clk *mct_clk, *tick_clk; - tick_clk = np ? of_clk_get_by_name(np, "fin_pll") : - clk_get(NULL, "fin_pll"); + tick_clk = of_clk_get_by_name(np, "fin_pll"); if (IS_ERR(tick_clk)) panic("%s: unable to determine tick clock rate\n", __func__); clk_rate = clk_get_rate(tick_clk); - mct_clk = np ? of_clk_get_by_name(np, "mct") : clk_get(NULL, "mct"); + mct_clk = of_clk_get_by_name(np, "mct"); if (IS_ERR(mct_clk)) panic("%s: unable to retrieve mct clock instance\n", __func__); clk_prepare_enable(mct_clk); @@ -581,11 +580,7 @@ static int __init mct_init_dt(struct device_node *np, unsigned int int_type) * timer irqs are specified after the four global timer * irqs are specified. */ -#ifdef CONFIG_OF nr_irqs = of_irq_count(np); -#else - nr_irqs = 0; -#endif for (i = MCT_L0_IRQ; i < nr_irqs; i++) mct_irqs[i] = irq_of_parse_and_map(np, i);