Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1BD80C05027 for ; Thu, 9 Feb 2023 13:31:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230317AbjBINbF (ORCPT ); Thu, 9 Feb 2023 08:31:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229729AbjBINaq (ORCPT ); Thu, 9 Feb 2023 08:30:46 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52CC723C7A; Thu, 9 Feb 2023 05:30:45 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DF6E661ABA; Thu, 9 Feb 2023 13:30:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6404EC4333E; Thu, 9 Feb 2023 13:30:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675949443; bh=NTHXrrpZCAJQDbqGQ5Dk1VncIloUIc9A9BrVorjY3xI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nYyAS3/jMTrOrQkqzxE8B5R+kCJA33WHUACgO3u4maL1KI6eOMC6KdVb7sKrAIe2q KGQcpdr28joNSS83Q1OENfMsXmQa+Qkj/El7u7axKD7xn+m1EfD8GB4cU8lJdL0HH3 YA5Ut7l3qrKwJDAG9Gro8Shh7Ki7Dwh82EieJohc9itIMwm8V4YCT5MGMEX1toj4oT a9amOFPGN6m4cVkBb8CMZnPo7aWHQYlP0gtS0HUKJsz+PmZI1/FvX6ebJ99pAT0nKm b/GOyJ2jehG0MLsv7Xn1q08vi3n0HDR1a6By8/HibtGzFKDwu0+FVQq0u7V0koORm8 irPz+jBwRRFJg== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1pQ71H-0001LO-8K; Thu, 09 Feb 2023 14:31:23 +0100 From: Johan Hovold To: Marc Zyngier , Thomas Gleixner Cc: x86@kernel.org, platform-driver-x86@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Hsin-Yi Wang , Mark-PK Tsai Subject: [PATCH v5 13/19] irqchip/alpine-msi: Use irq_domain_add_hierarchy() Date: Thu, 9 Feb 2023 14:23:17 +0100 Message-Id: <20230209132323.4599-14-johan+linaro@kernel.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230209132323.4599-1-johan+linaro@kernel.org> References: <20230209132323.4599-1-johan+linaro@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the irq_domain_add_hierarchy() helper to create the hierarchical domain, which both serves as documentation and avoids poking at irqdomain internals. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Hsin-Yi Wang Tested-by: Mark-PK Tsai Signed-off-by: Johan Hovold --- drivers/irqchip/irq-alpine-msi.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/irqchip/irq-alpine-msi.c b/drivers/irqchip/irq-alpine-msi.c index 5ddb8e578ac6..604459372fdd 100644 --- a/drivers/irqchip/irq-alpine-msi.c +++ b/drivers/irqchip/irq-alpine-msi.c @@ -204,16 +204,14 @@ static int alpine_msix_init_domains(struct alpine_msix_data *priv, return -ENXIO; } - middle_domain = irq_domain_add_tree(NULL, - &alpine_msix_middle_domain_ops, - priv); + middle_domain = irq_domain_add_hierarchy(gic_domain, 0, 0, NULL, + &alpine_msix_middle_domain_ops, + priv); if (!middle_domain) { pr_err("Failed to create the MSIX middle domain\n"); return -ENOMEM; } - middle_domain->parent = gic_domain; - msi_domain = pci_msi_create_irq_domain(of_node_to_fwnode(node), &alpine_msix_domain_info, middle_domain); -- 2.39.1