From: Marek Szyprowski <m.szyprowski@samsung.com> To: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Marek Szyprowski <m.szyprowski@samsung.com>, Will Deacon <will.deacon@arm.com>, Catalin Marinas <catalin.marinas@arm.com>, Marc Zyngier <marc.zyngier@arm.com>, Thomas Gleixner <tglx@linutronix.de>, Daniel Lezcano <daniel.lezcano@linaro.org>, Krzysztof Kozlowski <krzk@kernel.org>, Chanwoo Choi <cw00.choi@samsung.com>, Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>, Inki Dae <inki.dae@samsung.com>, Mark Rutland <mark.rutland@arm.com> Subject: [PATCH v4 1/6] clocksource: exynos_mct: Remove dead code Date: Thu, 18 Oct 2018 11:57:03 +0200 [thread overview] Message-ID: <20181018095708.1527-2-m.szyprowski@samsung.com> (raw) In-Reply-To: <20181018095708.1527-1-m.szyprowski@samsung.com> 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 <m.szyprowski@samsung.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com> --- 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); -- 2.17.1
WARNING: multiple messages have this Message-ID (diff)
From: m.szyprowski@samsung.com (Marek Szyprowski) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 1/6] clocksource: exynos_mct: Remove dead code Date: Thu, 18 Oct 2018 11:57:03 +0200 [thread overview] Message-ID: <20181018095708.1527-2-m.szyprowski@samsung.com> (raw) In-Reply-To: <20181018095708.1527-1-m.szyprowski@samsung.com> 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 <m.szyprowski@samsung.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com> --- 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); -- 2.17.1
next prev parent reply other threads:[~2018-10-18 9:57 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <CGME20181018095714eucas1p2019a898487b589ff402b70fae42cabaa@eucas1p2.samsung.com> 2018-10-18 9:57 ` [PATCH v4 0/6] Proper arch timer support for Exynos5433-based TM2(e) boards Marek Szyprowski 2018-10-18 9:57 ` Marek Szyprowski [not found] ` <CGME20181018095716eucas1p192004241424d1cf581f715558b2e67a4@eucas1p1.samsung.com> 2018-10-18 9:57 ` Marek Szyprowski [this message] 2018-10-18 9:57 ` [PATCH v4 1/6] clocksource: exynos_mct: Remove dead code Marek Szyprowski [not found] ` <CGME20181018095716eucas1p103fb0d1a19c6122e885b15526c176967@eucas1p1.samsung.com> 2018-10-18 9:57 ` [PATCH v4 2/6] clocksource: exynos_mct: Fix error path in timer resources initialization Marek Szyprowski 2018-10-18 9:57 ` Marek Szyprowski [not found] ` <CGME20181018095717eucas1p2c89f6e71642e6db62676e1af5514529f@eucas1p2.samsung.com> 2018-10-18 9:57 ` [PATCH v4 3/6] clocksource: exynos_mct: Refactor resources allocation Marek Szyprowski 2018-10-18 9:57 ` Marek Szyprowski 2018-10-19 7:43 ` Krzysztof Kozlowski 2018-10-19 7:43 ` Krzysztof Kozlowski [not found] ` <CGME20181018095717eucas1p20a7d2d2b1b18ae60a4893a8e3d8c19f9@eucas1p2.samsung.com> 2018-10-18 9:57 ` [PATCH v4 4/6] clocksource: exynos_mct: Add arch_timer cooperation mode for ARM64 Marek Szyprowski 2018-10-18 9:57 ` Marek Szyprowski 2018-10-19 7:44 ` Krzysztof Kozlowski 2018-10-19 7:44 ` Krzysztof Kozlowski [not found] ` <CGME20181018095718eucas1p17799dfba088b0ea412687dd5f1dad78f@eucas1p1.samsung.com> 2018-10-18 9:57 ` [PATCH v4 5/6] arm64: dts: exynos: Move arch-timer node to right place Marek Szyprowski 2018-10-18 9:57 ` Marek Szyprowski [not found] ` <CGME20181018095719eucas1p27732208abef3397d28640c4e519d5bca@eucas1p2.samsung.com> 2018-10-18 9:57 ` [PATCH v4 6/6] arm64: platform: Add enable Exynos Multi-Core Timer driver Marek Szyprowski 2018-10-18 9:57 ` Marek Szyprowski
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20181018095708.1527-2-m.szyprowski@samsung.com \ --to=m.szyprowski@samsung.com \ --cc=b.zolnierkie@samsung.com \ --cc=catalin.marinas@arm.com \ --cc=cw00.choi@samsung.com \ --cc=daniel.lezcano@linaro.org \ --cc=inki.dae@samsung.com \ --cc=krzk@kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-samsung-soc@vger.kernel.org \ --cc=marc.zyngier@arm.com \ --cc=mark.rutland@arm.com \ --cc=tglx@linutronix.de \ --cc=will.deacon@arm.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.