From patchwork Thu Oct 18 09:57:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 10646963 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 55B6A1508 for ; Thu, 18 Oct 2018 10:01:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A134287E0 for ; Thu, 18 Oct 2018 10:01:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2DC6128880; Thu, 18 Oct 2018 10:01:29 +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 B1C85287E0 for ; Thu, 18 Oct 2018 10:01:28 +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=XiIHhB58PnkowkZBAHnbwBqs1u A/O0D6vQzEB9pv/iz4mXWSaWzIR9GpXckD2p5VG9NKShobyezLIEt8X4WgBz0kgkpSh3/tuYeutYI tOXOR/kHk1O/Zu3Be7qnHZ4JejgwX9r44EVT+Nu9KxLwzlN5DWCVBDAFjFmDhqFvBkF7xcXXQTZV0 uj2HY4gjqgHcDKcRlFTaR5y+SKzlIEqabpH6MMH30R1r7OOlvk9oc708L8EpfFvAchLxFM8ZCQhcM dxpqK2aGAyCqdjmVFUj1vmKJ24CGpeWwG4VmHihH1qqQ0fP4th9qpxsajfWL5gJmNbGmOd4M+/g6g XxDeov7Q==; 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 1gD578-0007z6-IU; Thu, 18 Oct 2018 10:01:10 +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 1gD53Z-0005Af-OH for linux-arm-kernel@lists.infradead.org; Thu, 18 Oct 2018 09:57:33 +0000 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20181018095717euoutp0111210dd8069639dc7b4488c71f5a1527~eq3QTbLOQ0107701077euoutp01Z; Thu, 18 Oct 2018 09:57:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20181018095717euoutp0111210dd8069639dc7b4488c71f5a1527~eq3QTbLOQ0107701077euoutp01Z DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1539856637; bh=zJetpoNhW01GT4Xt0gk6SKTpHAA/tdY/kH9zyQ9f4Ok=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=aTgk1rfPeEW8tqfWTdwSg4TZQyK0mLQm3GVknpbI4DBOGG3NTEGMKLpylEnTksvV/ CVhXhn0S/KQgn+iD8KChOBSjDnCd2GxjMJsqmDUT2rw7p7sAlXfQaXUOtN3aEjB0ZI QTeXf7NYERUX/YClBqN1+KjwT+ZVGdSHIM636Wfw= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20181018095717eucas1p2f656677dcc7d03550eb6c8ca5f12f8a5~eq3PyTstY2351323513eucas1p2E; Thu, 18 Oct 2018 09:57:17 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 9D.D1.04294.CF858CB5; Thu, 18 Oct 2018 10:57:16 +0100 (BST) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20181018095716eucas1p192004241424d1cf581f715558b2e67a4~eq3O6tUM92351723517eucas1p1G; Thu, 18 Oct 2018 09:57:16 +0000 (GMT) X-AuditID: cbfec7f4-835ff700000010c6-fb-5bc858fcf29a Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id AB.D2.04284.CF858CB5; Thu, 18 Oct 2018 10:57:16 +0100 (BST) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0PGS00GLZGZA2H50@eusync3.samsung.com>; Thu, 18 Oct 2018 10:57:16 +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 v4 1/6] clocksource: exynos_mct: Remove dead code Date: Thu, 18 Oct 2018 11:57:03 +0200 Message-id: <20181018095708.1527-2-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20181018095708.1527-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrCIsWRmVeSWpSXmKPExsWy7djP87p/Ik5EG/xeYWCxccZ6Vov3y3oY La5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8SS6APYrLJiU1 J7MstUjfLoErY9cq24LJfBV7GhvYGhgfcncxcnJICJhIrHi2nbmLkYtDSGAJo8SWif1sEE4T k0TXzkYWkCo2AUOJrrddbCC2iEC2xPy93ewgRcwCJ5klLj1+B1YkLOAo8eT2WzCbRUBV4tnZ FnYQm1fARuLYzDdMEOvkJVZvOMAMYnMK2EqcmQ/RKwRU0/1nPfsERp4FjAyrGEVSS4tz03OL DfWKE3OLS/PS9ZLzczcxAkNy27Gfm3cwXtoYfIhRgINRiYf3QerxaCHWxLLiytxDjBIczEoi vNVmJ6KFeFMSK6tSi/Lji0pzUosPMUpzsCiJ8543qIwSEkhPLEnNTk0tSC2CyTJxcEo1MKZq PuTX/TtZ9fS+w/scdumf6dGIScmIV647EvDz06voB3KCcRa5Yj8UD7Y+stQRKGEycHr/xOy+ /EznnJCDeq+9NinrTRQ5vjgrvfPftdMzzOcs9Evf+71P9duDx1G376iF7PWSTHr7vLVE6m/+ hMVbDh42l/Dfl8DxJnrJr5cObtNOKVc7hCqxFGckGmoxFxUnAgBdwqAyRQIAAA== X-CMS-MailID: 20181018095716eucas1p192004241424d1cf581f715558b2e67a4 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181018095716eucas1p192004241424d1cf581f715558b2e67a4 References: <20181018095708.1527-1-m.szyprowski@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181018_025729_972515_5121E6B9 X-CRM114-Status: GOOD ( 14.67 ) 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: Mark Rutland , 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);