From patchwork Sat Feb 23 13:06:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 159115 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp33340jad; Sat, 23 Feb 2019 05:08:14 -0800 (PST) X-Google-Smtp-Source: AHgI3Ib3HFWCHSimLf1S3J5V2EvsXPTnWQcQ3qSH2HnY/mB/adlMbDfwhmrIQXAm/LkBjmWft5ik X-Received: by 2002:a62:1c45:: with SMTP id c66mr9448944pfc.90.1550927294032; Sat, 23 Feb 2019 05:08:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550927294; cv=none; d=google.com; s=arc-20160816; b=Plg5Xh+GXWae+oABtruE77BNiZghBY8PHfH+PEoznCPzQqctuCrB1JKvTLX15VGMmw L/F16muA8jVJtCFsWqTBy6QQ5D7wu3NqX57NJaSi0JCOMoEj1Fvyu39+TZS2eZSczOqg GFC9+j9lYXBwJuICjk+DnqmFjXURYXJagRhSpoA06grsjG5etPOih7sIpkznZ4DTBGnD zyws7n9cNePdhWD57omQE71K/ZRqBKkXDYrfA4Y+4UsAivImWj9sa7GosEJabykFVjp+ 6FKhtIXpXMYGpVa3DjOEclSr97fYSsOoqrtTyePBv+6foAraz7/80NAYuw8jry4+ex8z 2Jcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=X/dC9KlJ2HFYdYmnw3hP+wmPZpOjWjCgiVR8KWlL9Mw=; b=VilgzQT/G7G6XhgC0ft7xBJMs9ewknrrLmFOLsmFjE7ZqlyqNoE6Pi5trwZ+EmokvX PteQWMWSNmtNqoILz49Kh3rumWpN4m/yLY5Q8FGzfJcWK3VuLCP9E7WsI4srCA9gwfVP fe/qjtdkmQOww5cYAP612jzYpX0QFvy3U3Ej/rZNwCQ2izjF/BHZA24bCJhexhlv8xnp gbGfF2V+mIiDEhgp8UPnheO2BGtDWD7KQMBgumNQw9OH581BnRK/Xvg8H90qLMk1IP1c NtFZz0+iPGH79ExmONE6xhPCzI7NPjERDX4F1URtElluoo1PTRAiYDfFv1Cw7OzpFGs5 T1EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mn8OH9P9; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cm10si3952995plb.295.2019.02.23.05.08.13; Sat, 23 Feb 2019 05:08:14 -0800 (PST) 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=@linaro.org header.s=google header.b=mn8OH9P9; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727941AbfBWNIM (ORCPT + 32 others); Sat, 23 Feb 2019 08:08:12 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:45642 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727903AbfBWNII (ORCPT ); Sat, 23 Feb 2019 08:08:08 -0500 Received: by mail-wr1-f67.google.com with SMTP id w17so5159136wrn.12 for ; Sat, 23 Feb 2019 05:08:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=X/dC9KlJ2HFYdYmnw3hP+wmPZpOjWjCgiVR8KWlL9Mw=; b=mn8OH9P9jFUIYYwT9kiZtDMLsfnnQog8op/FqCeDhCxl6cce6Vdd7Wdw0vWCXytVew hQeeJLFOnoeZCo8i2xzI+sz5g1qnpuMF+XI/9+zCUPrmBLZtbCwkPLkHSVUq8rFdeGIK cl3vcKrLW0+SABVcEQV2OQXJvISPjid22tkKM8zpoemfCNLcg3OUzjwvKgDH0SM+4yhh vmqo+WCEMY9XWvavr4uBlUrV86W0LyHBRRN2RRHpT0HrgyBnE9rRaPGbsF20BIf7e35z 0EI9Cpc6sz27ZX98jLWYmEF2uFvI1l2JdY1ljjyAVPGKcU3BKI+PmuCmndRPYDbxn7Qm RYmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=X/dC9KlJ2HFYdYmnw3hP+wmPZpOjWjCgiVR8KWlL9Mw=; b=Vnc4eU1aKYezpGeuryPAJHZEgOLI3kIj0I+H3Axhewjg3V2VIzMiPhASML15zhREIM EgUPWrTNINNFxoVeYnaNj6G9TqRqwWS5MaWIxNaALaOStA3XKKyXSnZIqd7YO5VwZv0u 3fX/A+PQK9I+763Nb1uMdpQk3uO3nX82C3lT6myVyqB2JbqJC3gYzOJSvIyTqJYVi1Ki oe41JhRc+ICfu8JCfvo7m+QvhM99rd1p8lFdcuTd0AYH+gjGZfhzirSwJRx5DiT5il9I yYjvMByQGYFsZmhkGdwgoDS3GW3+fiYOTFH4idTBshrRjWTkuJdNISKQt11LXgc9CGJI gG6Q== X-Gm-Message-State: AHQUAuatKWJL/QffejZHl/zUYiOC9K3DKVvdqxJaKHPFStuyHc5xLHI8 zz+oy1XrHZSHZ6d5gjQ3Il6cFQ== X-Received: by 2002:adf:f845:: with SMTP id d5mr6886036wrq.113.1550927286421; Sat, 23 Feb 2019 05:08:06 -0800 (PST) Received: from clegane.local (189.126.130.77.rev.sfr.net. [77.130.126.189]) by smtp.gmail.com with ESMTPSA id i12sm7830746wrq.21.2019.02.23.05.08.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 23 Feb 2019 05:08:05 -0800 (PST) From: Daniel Lezcano To: tglx@linutronix.de Cc: linux-kernel@vger.kernel.org, Marek Szyprowski , Kukjin Kim , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org (moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES), linux-samsung-soc@vger.kernel.org (moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES) Subject: [PATCH 08/18] clocksource/drivers/exynos_mct: Remove dead code Date: Sat, 23 Feb 2019 14:06:56 +0100 Message-Id: <20190223130707.16704-8-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190223130707.16704-1-daniel.lezcano@linaro.org> References: <20190223130707.16704-1-daniel.lezcano@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marek Szyprowski 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 Signed-off-by: Daniel Lezcano --- 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 d55c30f6981d..647ea9fc752f 100644 --- a/drivers/clocksource/exynos_mct.c +++ b/drivers/clocksource/exynos_mct.c @@ -508,13 +508,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); @@ -582,11 +581,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);