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: 855843 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zCNJw4bnwz9ryT for ; Fri, 5 Jan 2018 09:49:20 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3zCNJw3Yh6zDqpN for ; Fri, 5 Jan 2018 09:49:20 +1100 (AEDT) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=209.85.218.66; helo=mail-oi0-f66.google.com; envelope-from=robherring2@gmail.com; receiver=) Received: from mail-oi0-f66.google.com (mail-oi0-f66.google.com [209.85.218.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3zCNDr5wgLzDqxy for ; Fri, 5 Jan 2018 09:45:48 +1100 (AEDT) Received: by mail-oi0-f66.google.com with SMTP id t78so2033980oie.8 for ; Thu, 04 Jan 2018 14:45:48 -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=dWiQyiRnN2US6TjNahGp+Hi6ozOcZ0PEsr9ZjliIiihahL0qkYTccwalNKBFhpQJCK TMC21BLQRYPcnDLtNczbZ3gBaxifW2ywA4oPM0ObAieJfTYyXWw+GX80BKBSGtobB7Nh 5tB5FXCRDQYOYTLAW6BtCPLiOcznSRCFaVst4cZ64UXzI6cyyDJE65kX+IDfeDtZY71M NE8fB+0zpjgrwVOFYxFzNioO+iWgPAs/nD3CCaPr/RzWUaX3QjBJD2nH6cRQwxSZYV46 5pt/InsIF4102lt5NWmbhzKW6ZdFK/FC7vhjjhbXFy5s/3SwsvbFAmxt/8BudsbZrrMS 1PFA== X-Gm-Message-State: AKwxytf+qW0EvPieaPtmR5/0exhj3dsnIWz2a7c/ZMJV0UN7lZtrAASG 5vnEn3FMysNU+cEh8X3B7A== X-Google-Smtp-Source: ACJfBot7mAKNP15AzATz4WnQb1e5w2wpFtuWk7WNfknBa+177eii/mWW82etu36CBfzm4VGETBDdbQ== 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 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 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linuxppc-dev@lists.ozlabs.org, Paul Mackerras , linux-kernel@vger.kernel.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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",