Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp934341rwl; Fri, 31 Mar 2023 04:41:04 -0700 (PDT) X-Google-Smtp-Source: AKy350ZsZu9IIwQZ9hW+5uwO5199UjTCsdllIVglEmcUgn49OhbFSSaY5Rqfq2S6Ae7RBPUv1HsC X-Received: by 2002:a17:90a:eb12:b0:23b:4bce:97de with SMTP id j18-20020a17090aeb1200b0023b4bce97demr5135495pjz.4.1680262864174; Fri, 31 Mar 2023 04:41:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680262864; cv=none; d=google.com; s=arc-20160816; b=bGuFqs4wV5X7+DeA3YHL6HFemaPu0m4v9C8It+EAN/SX9CFhOFOG+fiP3K4QzYKXv+ WsvO3YFrYgUdRlS2IK+4qPf+oT8rAdM38h9JCUvf+4tE3HzSAgVsOO5m+42Hm8eXc5P4 2o0C1m8ozJZePn+2sozcJb+jjjNsWPq7UUcLiqdDvFp7maBmr27DWYadUszbgnBwBV5f o2EHAsVaP5YCtdrIOhpMSU8oc8djRW7wOWyMlF8NEfU5sXLcny0fjOf9wEWFpI10XNkG L1IKQ1hvvYW8wBWPc9Cfxa9YB96yc+V0sUyMnRya68N9ksOOIjMyw0YnmoiYii89OjHF aByw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=pl//GWMEqKKziotV1+vGSG+ouIA0dfstyGcUNRMDCX4=; b=SmocwxfgvIwyGbtXWysAwvj/JnrYJGjjpc0c3BGm/gzrE6roxiYVcJp9qE3l70FF4y iYC8cGQRStvMLV4RrQ0Xz7sOVY1Ub+bizInLBv2tiev8ibbxHSvnBRYOVIjMqRw4SsoJ t+SvzC5wJvVK5wFX54ns8hP4dx63NFiBl7L18tDHetBCB7oHe8gGv2i7/A68U8payBH8 Pyh2ajKh2VecMfzUm8Fi+8FyH+M/KzGXFOoymPYqDWQTtfdvk9DD4HT59LWJfjDK5HA4 O726dFPg8YKcDEWKrgkTYrJjewX/Ie/qmsTX/iXUt1USlj/S8W3go+X48rn+UDTtx5/e keYg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 193-20020a6304ca000000b004fbffa7d04dsi2265242pge.863.2023.03.31.04.40.52; Fri, 31 Mar 2023 04:41:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231959AbjCaLjL (ORCPT + 99 others); Fri, 31 Mar 2023 07:39:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231666AbjCaLjE (ORCPT ); Fri, 31 Mar 2023 07:39:04 -0400 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E32FC191FB; Fri, 31 Mar 2023 04:39:01 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.153]) by gateway (Coremail) with SMTP id _____8BxIk5UxiZkKe0UAA--.32039S3; Fri, 31 Mar 2023 19:39:00 +0800 (CST) Received: from loongson-pc.loongson.cn (unknown [10.20.42.153]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Bx57xUxiZkmwASAA--.12675S3; Fri, 31 Mar 2023 19:39:00 +0800 (CST) From: Jianmin Lv To: Thomas Gleixner , Marc Zyngier Cc: linux-kernel@vger.kernel.org, loongarch@lists.linux.dev, Lorenzo Pieralisi , Jiaxun Yang , Huacai Chen , loongson-kernel@lists.loongnix.cn, stable@vger.kernel.org Subject: [PATCH V2 1/5] irqchip/loongson-eiointc: Fix returned value on parsing MADT Date: Fri, 31 Mar 2023 19:38:56 +0800 Message-Id: <20230331113900.9105-2-lvjianmin@loongson.cn> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230331113900.9105-1-lvjianmin@loongson.cn> References: <20230331113900.9105-1-lvjianmin@loongson.cn> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8Bx57xUxiZkmwASAA--.12675S3 X-CM-SenderInfo: 5oymxthqpl0qxorr0wxvrqhubq/ X-Coremail-Antispam: 1Uk129KBjvJXoW7trWkZF45Kw48uF4rtFWkJFb_yoW8WFW7pa y7ArZ8tr4Yy3yxCr4kt3s8X345A39xuayxtFWrG3yFvr4qkrWDXF4fA3Wj9rn2yFWUG3Wj vF4Fqa15uw45A3DanT9S1TB71UUUUjDqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU bS8YFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s 1l1IIY67AEw4v_JF0_JFyl8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVW8JVW5JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwA2z4 x0Y4vEx4A2jsIE14v26r4UJVWxJr1l84ACjcxK6I8E87Iv6xkF7I0E14v26F4UJVW0owAa w2AFwI0_JF0_Jw1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqjxCEc2xF0cIa020Ex4CE44 I27wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_Jw0_WrylYx0Ex4A2 jsIE14v26r4j6F4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwIxGrwCY1x0262 kKe7AKxVWUAVWUtwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwCFI7km 07C267AKxVWUAVWUtwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r 1rMI8E67AF67kF1VAFwI0_Jw0_GFylIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVW8 JVW5JwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Gr0_Cr1lIxAIcVCF04k26cxKx2IYs7xG6r 1j6r1xMIIF0xvEx4A2jsIE14v26r4j6F4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1U YxBIdaVFxhVjvjDU0xZFpf9x07jr6p9UUUUU= X-Spam-Status: No, score=-0.0 required=5.0 tests=SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In pch_pic_parse_madt(), a NULL parent pointer will be returned from acpi_get_vec_parent() for second pch-pic domain related to second bridge while calling eiointc_acpi_init() at first time, where the parent of it has not been initialized yet, and will be initialized during second time calling eiointc_acpi_init(). So, it's reasonable to return zero so that failure of acpi_table_parse_madt() will be avoided, or else acpi_cascade_irqdomain_init() will return and initialization of followed pch_msi domain will be skipped. Although it does not matter when pch_msi_parse_madt() returns -EINVAL if no invalid parent is found, it's also reasonable to return zero for that. Signed-off-by: Jianmin Lv --- drivers/irqchip/irq-loongson-eiointc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-loongson-eiointc.c b/drivers/irqchip/irq-loongson-eiointc.c index d15fd38c1756..62a632d73991 100644 --- a/drivers/irqchip/irq-loongson-eiointc.c +++ b/drivers/irqchip/irq-loongson-eiointc.c @@ -343,7 +343,7 @@ static int __init pch_pic_parse_madt(union acpi_subtable_headers *header, if (parent) return pch_pic_acpi_init(parent, pchpic_entry); - return -EINVAL; + return 0; } static int __init pch_msi_parse_madt(union acpi_subtable_headers *header, @@ -355,7 +355,7 @@ static int __init pch_msi_parse_madt(union acpi_subtable_headers *header, if (parent) return pch_msi_acpi_init(parent, pchmsi_entry); - return -EINVAL; + return 0; } static int __init acpi_cascade_irqdomain_init(void) -- 2.31.1