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: 149066 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp674103lji; Wed, 17 Oct 2018 06:42:21 -0700 (PDT) X-Google-Smtp-Source: ACcGV611nsoHfe6P+LJUBQ/1IyBot9MxNnLRP6BjeOXTz7Z7J/FeXd9n9qJuOTMKQhS0LQ8eWM2l X-Received: by 2002:a17:902:8342:: with SMTP id z2-v6mr25650413pln.147.1539783740907; Wed, 17 Oct 2018 06:42:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539783740; cv=none; d=google.com; s=arc-20160816; b=lCSgdhsK8K3MxNU2Z2AbSrxHJjwsbejgxVtg6PvpE5eR9qgmmn/ETshNrQNeHDZzFW Uabk2qnWRQIAO9NlZF9b51YlwtKI80T9Ck6goS4DvgdFj+4PZ0MsuUHrAufGCbl3ZvJt 36qQgXM6uLCtq7dqfbyvshe8fdVdbISwXDMhnnNc3ynoUpBc3erZlMG9Rr+CIbT5xSJ5 vK2hX50cZA2XjWPbLqsLyr9tTo6WmXyZ7yiZ6WlLLeIdWNgD1zE0lW1qGFcytMnQauDn SH3Ra22DoONDbM434ggOEFrq+fevDJUjAhC916RbOFVeOlYpP5yQVH8xKjyoGB4eZQzF EAXA== 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=c1ZCNps9GhOFZcHGKJq3xj1VHRvNnQ0mC7KvULeoVWX8K8AYmiRmrXTQctf0AZYoMW 8rU8pHq06kmPP5B4lU6f6FZ+noP6SpF8OqlxGBjUiy1ja09RCxVlevN7kfSSatMxbjMw U23zKu5+EpQefg4ilCnNM/Lg1rKYi21zbUqDRUUaAv/W/ytrPluNnJZS7QZTq4SiXEQp Vyf5NiPchYL5T0DM+KiMYyMYB/PHGeocQluSekkXQI5aSWxUFiKDq3Q4yC+k0i3msnXB 79alrLhGl4GwjvvVci3AjAmOoZJtUcO7rLXVJsixBXmLZmYfqVbotd2rqwS/8TQE9Hr3 pDpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=kv7DMbMY; 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 q1-v6si7296708plb.292.2018.10.17.06.42.15; Wed, 17 Oct 2018 06:42:20 -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=kv7DMbMY; 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 S1727481AbeJQVhy (ORCPT + 32 others); Wed, 17 Oct 2018 17:37:54 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:57622 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727028AbeJQVhx (ORCPT ); Wed, 17 Oct 2018 17:37:53 -0400 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 Cc: Marek Szyprowski , Will Deacon , Catalin Marinas , Marc Zyngier , Thomas Gleixner , Daniel Lezcano , Krzysztof Kozlowski , Chanwoo Choi , Bartlomiej Zolnierkiewicz , Inki Dae 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 Fte/PGe1mPdZ1mLS/QksFufPb2C32PT4GqvF5V1z2CxmnN/HZLH2yF12i793/rFZbN40ldni 5ccTLA68HmvmrWH02LSqk83jzrU9bB7vzp1j99i8pN6jb8sqRo/Pm+QC2KO4bFJSczLLUov0 7RK4Mnatsi2YzFexp7GBrYHxIXcXIweHhICJxMc/nF2MXBxCAisYJdbfn8MM4XxmlPjwczuQ wwlW9LB7JztEYhmjxKumFYwQTgOTxL2FS1lBqtgEDCW63naxgdgiAtkSnY8fMILYzAKLmCUO HBMGsYUFHCUmv30KFmcRUJW4dXAPWD2vgI3EkstXWCG2yUus3nCAGeQ8TgFbibX9VSC7JAT2 sEns/PSdFeJsF4nvG7QgyoUlXh3fwg5hy0h0dhxkgqhvZpRonzGLHcLpYZTYOmcHG0SVtcTh 4xdZIY7jk5i0bTozxFBeiY42IYgSD4l/j/6A3SkkMIFR4vlh7QmMkgsYGVYxiqeWFuempxYb 56WW6xUn5haX5qXrJefnbmIExvHpf8e/7mDc9yfpEKMAB6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FfPgIAAA== X-CMS-MailID: 20181017134205eucas1p148faab76ac153e9afbb8a519e6d8d1e2 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181017134205eucas1p148faab76ac153e9afbb8a519e6d8d1e2 References: <20181017134159.9656-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);