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: 149113 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp1756214lji; Thu, 18 Oct 2018 02:57:23 -0700 (PDT) X-Google-Smtp-Source: ACcGV60u0KvjavAs9BmEZkyy6pVqAqwsALvnFhBJAxp0PkKzKj44FZtCJvbUC9jTmWWOQO5cj3mN X-Received: by 2002:a17:902:b90c:: with SMTP id bf12-v6mr29646965plb.259.1539856643035; Thu, 18 Oct 2018 02:57:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539856643; cv=none; d=google.com; s=arc-20160816; b=H/XRlan7AoEOEI1itFw3//WsBYCTWtak1raIyB9nv4nBd7rui08k/LKlSyshS1PHF/ ZFGNW4BWopokQq3OswYO3kDTwjV6xZhE3k2f2XSywIMqEQ6DzdcKMRkhqcq3B4RtqDvP gl9brjv95zeqeDdObJA787p8vJA48e99cYnVh3Jd6RrOdAErEVdaGJbE9ix42egN+rOE uecaTQEJMdWzqxV7IPY+2ajz1i57je15ls/102SGuyNVQypuDfseDXofhKe+MpmjfOcz EpwRqUg+qzqvP2wdzI3SdTq5q8cGlnjFnECW0B4jLK5/6+q2yiaMKcwrAxmHOf6L/Hqe xKuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=zJetpoNhW01GT4Xt0gk6SKTpHAA/tdY/kH9zyQ9f4Ok=; b=MfyT2OHXFwJizcae9RP0vrPZ0q0pOBIjUdTuf4aqwJH0xoHWUqyKt3rRxKGb2U+Dj7 4QkG4tyNVFJjofmh93TabspPlUgFERe8+oGFcqYD0Gzw+inOZupglJXYOvZVYDipYAFb 52dzux8nHiVp9NH7TelB7RnSLn1QAbwqsD2Vqz6EL1yIjzhZozr/bxecei2q367Xcbj4 dshhc8ZUVg+iCi3sIT8qlxA9GHXZxxRJUqzSnDFq4Xe7nc+FGfpNbFH0OW6ivAU5l/1M LqYu+APhreRFDh5oVkhFwo7q9va66c8TosoWpvYS7zS5LB3mzWKMvRd4ap4E7EzA4pyt f8WQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=aTgk1rfP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h3-v6si19975249pls.27.2018.10.18.02.57.22; Thu, 18 Oct 2018 02:57:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=aTgk1rfP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728026AbeJRR5f (ORCPT + 32 others); Thu, 18 Oct 2018 13:57:35 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:53116 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727845AbeJRR5d (ORCPT ); Thu, 18 Oct 2018 13:57:33 -0400 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 Cc: Marek Szyprowski , Will Deacon , Catalin Marinas , Marc Zyngier , Thomas Gleixner , Daniel Lezcano , Krzysztof Kozlowski , Chanwoo Choi , Bartlomiej Zolnierkiewicz , Inki Dae , Mark Rutland 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/ec5qMe+zrMWk+xNYLM6f38BusenxNVaLy7vmsFnMOL+PyWLtkbvsFn/v/GOzWHr9IpPF 5k1TmS1efjzB4sDnsWbeGkaPTas62TzuXNvD5vHu3Dl2j81L6j36tqxi9Pi8SS6APYrLJiU1 J7MstUjfLoErY9cq24LJfBV7GhvYGhgfcncxcnJICJhINK84xg5iCwmsYJRoWiLbxcgFZH9m lJjy9y4jTNGKZ9uZIYqWMUr8+JYAUdTAJPF3wwk2kASbgKFE19suMFtEIFui8/EDRpAiZoGT zBL/bm4CWyEs4Cjx5PZbFhCbRUBV4tnZFrA4r4CNxLGZb5ggtslLrN5wAGwbp4CtxJn571hA BkkIHGGTuPehhQWiyEVi+s3NzBC2sMSr41vYIWwZic6Og0wQDc2MEu0zZrFDOD2MElvn7GCD qLKWOHz8IiuIzSzAJzFp23SgSRxAcV6JjjYhiBIPicUf1zBD/DmBUeLR2uOsExglFzAyrGIU Ty0tzk1PLTbKSy3XK07MLS7NS9dLzs/dxAiM69P/jn/ZwbjrT9IhRgEORiUe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FxUnAgBdwqAyRQIAAA== X-CMS-MailID: 20181018095716eucas1p192004241424d1cf581f715558b2e67a4 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181018095716eucas1p192004241424d1cf581f715558b2e67a4 References: <20181018095708.1527-1-m.szyprowski@samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.17.1 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);