From patchwork Fri Feb 15 12:52:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 158515 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp669047jaa; Fri, 15 Feb 2019 04:52:42 -0800 (PST) X-Google-Smtp-Source: AHgI3IYS2LCcg0DSv6MrExwB3RJSDe1JJsNyw1vQ802xa+x5PdiM7CMetduZM5oHtFplsdANut9y X-Received: by 2002:a62:e017:: with SMTP id f23mr914300pfh.152.1550235162602; Fri, 15 Feb 2019 04:52:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550235162; cv=none; d=google.com; s=arc-20160816; b=PtoM+93ndlR35srZnB0gEfy9v5pbkV0ALpm0GcmR7DMhZwt28CvaPpocrdM4oxZy0j dh0WhTD4X85GZLdF6ZMfJ8NGU8hxOVJcLlIUE3cNS5/KPmH3RcjnWGtY6Pxwi+Eu8GCF 89pb5Go9EWJyTYQ5amu8gdjUaXSoou30b4iBA6C/1ibQOnU4SQjGO8NoqKZteAtlr6Px k3H2Vt/TCTn9xoo/L8B6bjmXJJmzY5z+J0PzKE/B5U/zrvplgbkv8zZC/BDytMw7xr03 Go5CPjH40t8U+15GeL+MVYYtrMsapG+9+eJochlCUcDtYOC8QcHStVZonkuKYT5reQUz 649w== 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=josub82eo0Y6bRCHA0Urz0sinO+6DIdTpqB2UH01pNQwQ/zkt72optjc3w253kSgFK PWdVw4+okdaH1ZaFDeWUT58XD0Cw+eF6AMsTSDfrjWbIggXJcEpgpOkCA8vC6YEfzEQK yJmNleKWpXckjnOu6FLaWPmWLhKFFAPw6uFIxSG2A6C4d4v99wDcGLIUC7jOLZgOcvYa xhrGSy++QuIp0lrmTA3XolI70xYMpMi/i2nft48Xbv44/Qd/pIzfV8e6xfUzaVFWIEh8 yZtSEuW+LelZuyYgSYe0lUZ0D4XEaBA3Y441MAgs1qXZ9mJQhFhbsW5b7RQqlEW2gBGr 9PpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=joe1NdsN; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-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 i16si5357287pfi.192.2019.02.15.04.52.42; Fri, 15 Feb 2019 04:52:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-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=joe1NdsN; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-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 S2394727AbfBOMwm (ORCPT + 3 others); Fri, 15 Feb 2019 07:52:42 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:48459 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387887AbfBOMwl (ORCPT ); Fri, 15 Feb 2019 07:52:41 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190215125240euoutp02701be4b2fce5411ccec11c06c50e9465~DiqotMKkL0872408724euoutp02c; Fri, 15 Feb 2019 12:52:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190215125240euoutp02701be4b2fce5411ccec11c06c50e9465~DiqotMKkL0872408724euoutp02c DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550235160; bh=zJetpoNhW01GT4Xt0gk6SKTpHAA/tdY/kH9zyQ9f4Ok=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=joe1NdsNzFePlq2+c75p3x1d365Id9YcxVSljweKfbeAUF+idVgjiCj70lIGnuxfN PKO9B8Ge9grY9EW5B2FOw0CuZH9Ds8Aod0bssXHXbo9YltTjpOoVgstnNBQv3tsRPr ihjjk0ZBnHI0IP2pNntB1+5mDeFfSayXFBHWSMwk= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190215125239eucas1p2acb240ec49a4f2e1116d642ec0efa336~DiqoV1EST0666006660eucas1p2q; Fri, 15 Feb 2019 12:52:39 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id A5.35.04441.716B66C5; Fri, 15 Feb 2019 12:52:39 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190215125238eucas1p28bd5cebc6d61da7b25e4cca396b6e35e~DiqngZpNi2424824248eucas1p2d; Fri, 15 Feb 2019 12:52:38 +0000 (GMT) X-AuditID: cbfec7f2-5c9ff70000001159-5b-5c66b617fc66 Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id CE.10.04284.616B66C5; Fri, 15 Feb 2019 12:52:38 +0000 (GMT) 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 <0PMY00LS8X3MCB70@eusync4.samsung.com>; Fri, 15 Feb 2019 12:52:38 +0000 (GMT) From: Marek Szyprowski To: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Marek Szyprowski , Thomas Gleixner , Daniel Lezcano , Krzysztof Kozlowski , Chanwoo Choi , Bartlomiej Zolnierkiewicz Subject: [PATCH 1/5] clocksource: exynos_mct: Remove dead code Date: Fri, 15 Feb 2019 13:52:25 +0100 Message-id: <20190215125229.30180-2-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 In-reply-to: <20190215125229.30180-1-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGIsWRmVeSWpSXmKPExsWy7djP87ri29JiDBbfVrTYOGM9q8X1L89Z LeZ9lrU4f34Du8Wmx9dYLWac38dksfbIXXaLzZumMjtweGxa1cnmcefaHjaPd+fOsXtsXlLv 0bdlFaPH501yAWxRXDYpqTmZZalF+nYJXBm7VtkWTOar2NPYwNbA+JC7i5GTQ0LARGLPk9lM XYxcHEICKxgl7rd/ZYNwPjNK/L89jwWmasX9DewQiWWMEi/3bGGEcBqYJPbPfcYEUsUmYCjR 9baLDcQWEfCWmHzmL1gHs0AXk8TthQfYQRLCAnYSn9avARvLIqAq0X3wB1gzr4CtxOH575kg 1slLrN5wgBnE5gSqX7OmhxlkkITABDaJlW0HgTZwADkuEmu3ukLUy0h0dhxkgqhpZpRonzGL HcLpYZTYOmcHG0SVtcTh4xdZQWxmAT6JSdumM0MM4pXoaBOCKPGQOPrsMDPEaxMZJSYtfsg8 gVFiASPDKkbx1NLi3PTUYsO81HK94sTc4tK8dL3k/NxNjMDYO/3v+KcdjF8vJR1iFOBgVOLh XZGRGiPEmlhWXJl7iFGCg1lJhJdzTVqMEG9KYmVValF+fFFpTmrxIUZpDhYlcd5qhgfRQgLp iSWp2ampBalFMFkmDk6pBkbtRUs8PoTpFtWxlDRG3bssItDk7i6wp4K/5OyTvoC5/p1t6ZxL ggO3VCx9IW0yyV+u1Xd5xlMbBtWkHVPfX2KetsH42JKpd9kij5rV1//tWn0qqGjqiWD7N/t5 7x3WZ7PQ83NQ7RDUlImvkb51L/LeFYZzyZGc3l/WCdsvM7OsYLJLvZPSrcRSnJFoqMVcVJwI AMbKBCO5AgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupnluLIzCtJLcpLzFFi42I5/e/4NV2xbWkxBjMfWVpsnLGe1eL6l+es FvM+y1qcP7+B3WLT42usFjPO72OyWHvkLrvF5k1TmR04PDat6mTzuHNtD5vHu3Pn2D02L6n3 6NuyitHj8ya5ALYoLpuU1JzMstQifbsEroxdq2wLJvNV7GlsYGtgfMjdxcjJISFgIrHi/gb2 LkYuDiGBJYwSM089YYFwmpgkNv69wgpSxSZgKNH1tosNxBYR8JaYfOYvWAezQA+TRPvV3+wg CWEBO4lP69ewgNgsAqoS3Qd/MIHYvAK2Eofnv2eCWCcvsXrDAWYQmxOofs2aHjBbCKjm8qoH jBMYeRYwMqxiFEktLc5Nzy021CtOzC0uzUvXS87P3cQIDKZtx35u3sF4aWPwIUYBDkYlHt4V GakxQqyJZcWVuYcYJTiYlUR4OdekxQjxpiRWVqUW5ccXleakFh9ilOZgURLnPW9QGSUkkJ5Y kpqdmlqQWgSTZeLglGpg5N0v2fP1+JTbrBcvXuOrDHlmsnbazs9/aldpyu0/Oe2d62aGFpOD 4q3Hgtp+s7yNb3wTYt7Su4+na/F9+9N3jFZ5fFmxQMZHN2o528Z9OerKe79nZKip+kgLHLC/ bz6hSelTgmNeo6/Wmur0K++nrZL033NC9HefilbEX0mjz4b/z+V6hc76rMRSnJFoqMVcVJwI ACgRew8iAgAA X-CMS-MailID: 20190215125238eucas1p28bd5cebc6d61da7b25e4cca396b6e35e CMS-TYPE: 201P X-CMS-RootMailID: 20190215125238eucas1p28bd5cebc6d61da7b25e4cca396b6e35e References: <20190215125229.30180-1-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@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);