From patchwork Thu Jan 4 22:45:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 123459 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp80485qgn; Thu, 4 Jan 2018 14:45:55 -0800 (PST) X-Google-Smtp-Source: ACJfBot+T7iRaF++hOY+ambGm9XYJrfuoqQiDrmjYss15d/Hd+AtIgbSHX4cHuFE/keITrz0/16s X-Received: by 10.101.81.7 with SMTP id f7mr819589pgq.441.1515105955271; Thu, 04 Jan 2018 14:45:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515105955; cv=none; d=google.com; s=arc-20160816; b=K4aYhzhX//MwGkSp8dU+ALZLVb5kBI9tQ98Uj5rEOCmt2eCosfL0BLT/7ozPJAALvi jRQZqar+BX79kSLEPppz7wzFSiZaI7FYnN+dEvD2VQ1LfWC7oSwYiyukxd25WX1M0b6L 052KCxd1yvis3uFxQBEVkw5iKkZdTQqh28kp332/9iZbj5UgaA+8N6Nu8kpSpEuI2Jun aNNXR0DHOdPdCYzXxXPFPiKlR/gbDZCi2E6gKh5ve3jvnn6s8FfeNBmcTnmB1nbbGCNq bxo2jdFF2zsVjpumiWiY8KJsCBCnM+ZpveoJXUqMG7phyIWB1kLQf+ngmFisedNT8YdF 1EnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=mCb+cruHQK7jCJHaI5ZVHCVST2hP3Wbk3vPrw+rA9E4=; b=zeHBgitvKYGNz6I5YrOZVGJ0f5AUh41EEkcvxBZDpPqlCN+3stS71SoG9RXMa4piVu eaHAp10ktXQ3dndnrt/V5QRrGU5S9rSIK8HfClqvjCzdUjvtJDCgDZCni7uqi5Drlc05 9K5NAmYH0Cx58VC1Di29/ocv7zhTeiBmZYGVRbFqASMyzeayIVdlq4fLvZM52DniKPYG u7qKH00bCBDx2muhtkuf/HmTYkBCgb01zSLDoOxZxOQTcEhaY+gB0LIikdX6y6sqMf39 TsO1pWZBQqXKGiwUVsHiGpYQ4kxzhgJ4a6WMNN6XxmW5/NjFfYMBEL+KUCLFiHTxLHFR YW0A== ARC-Authentication-Results: i=1; mx.google.com; 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 d19si2932840plr.654.2018.01.04.14.45.55; Thu, 04 Jan 2018 14:45:55 -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; 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 S1753663AbeADWpu (ORCPT + 10 others); Thu, 4 Jan 2018 17:45:50 -0500 Received: from mail-oi0-f65.google.com ([209.85.218.65]:46181 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753616AbeADWpr (ORCPT ); Thu, 4 Jan 2018 17:45:47 -0500 Received: by mail-oi0-f65.google.com with SMTP id t81so2028960oih.13 for ; Thu, 04 Jan 2018 14:45:46 -0800 (PST) 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; bh=mCb+cruHQK7jCJHaI5ZVHCVST2hP3Wbk3vPrw+rA9E4=; b=USkSVamPSAheKErh9Tcc8Es6UgLPX1kVqoo3J7zZ4Wt597qm+yeYyNfjf25Tk1folH EKE5QBG9zCp3D21YtmpfPF/FMqKVRvbN6qvDAH9BnUbi8TyYUFHUGN1FrMe2wudnNDYW 93Rh5mbbJTYoYnAwdEsTN/DII7v3vrd8L9H30nxFM3afZsr6NjRoGHseovV2kjih4k0/ izAf9O4hg9hQy4I0OQSBLS25IzaMAPlNT/G1pibacWCbaAu1aBJjA3n7TQR77NdSM2XD NnffZZ49/kLn9rsqhx/9Ia3GDY0KwDdrkq/gV79iUPR7YGaQ9Pdy34gSHvzEcaoEbp1H R3YA== X-Gm-Message-State: AKwxytfXH2iZu6Xb1k96+33AD0Wcp/Rmzk1KVnv6ysjAyAhZKf3raVlt +i3FuM7+mRLHwQLSXSmqLg== X-Received: by 10.202.171.16 with SMTP id u16mr672719oie.272.1515105946476; Thu, 04 Jan 2018 14:45:46 -0800 (PST) Received: from xps15.usacommunications.tv (216-188-254-6.dyn.grandenetworks.net. [216.188.254.6]) by smtp.googlemail.com with ESMTPSA id s63sm1704516oie.41.2018.01.04.14.45.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Jan 2018 14:45:45 -0800 (PST) From: Rob Herring To: Michael Ellerman Cc: linux-kernel@vger.kernel.org, Benjamin Herrenschmidt , Paul Mackerras , linuxppc-dev@lists.ozlabs.org Subject: [PATCH] powerpc: pseries: use irq_of_parse_and_map helper Date: Thu, 4 Jan 2018 16:45:42 -0600 Message-Id: <20180104224542.15333-4-robh@kernel.org> X-Mailer: git-send-email 2.14.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Instead of calling both of_irq_parse_one and irq_create_of_mapping, call of_irq_parse_and_map instead which does the same thing. This gets us closer to making the former 2 functions static. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Rob Herring --- arch/powerpc/platforms/pseries/event_sources.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) -- 2.14.1 diff --git a/arch/powerpc/platforms/pseries/event_sources.c b/arch/powerpc/platforms/pseries/event_sources.c index 6eeb0d4bab61..b0d8c146fe7b 100644 --- a/arch/powerpc/platforms/pseries/event_sources.c +++ b/arch/powerpc/platforms/pseries/event_sources.c @@ -16,7 +16,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include +#include +#include #include "pseries.h" @@ -25,15 +26,11 @@ void request_event_sources_irqs(struct device_node *np, const char *name) { int i, index, count = 0; - struct of_phandle_args oirq; unsigned int virqs[16]; /* First try to do a proper OF tree parsing */ - for (index = 0; of_irq_parse_one(np, index, &oirq) == 0; - index++) { - if (count > 15) - break; - virqs[count] = irq_create_of_mapping(&oirq); + for (index = 0; count < 16; index++) { + virqs[count] = irq_of_parse_and_map(np, index); if (!virqs[count]) { pr_err("event-sources: Unable to allocate " "interrupt number for %pOF\n",