Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp562802rwl; Fri, 7 Apr 2023 01:35:40 -0700 (PDT) X-Google-Smtp-Source: AKy350bOIefIFklDRvZFoB5eyM2PnYrR3dsCpP91E83bPSGgAV8qzKcLRHAdOFUqf4aUguxt2t1a X-Received: by 2002:a17:90b:3812:b0:234:dc4:2006 with SMTP id mq18-20020a17090b381200b002340dc42006mr1839861pjb.4.1680856540390; Fri, 07 Apr 2023 01:35:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680856540; cv=none; d=google.com; s=arc-20160816; b=bbfXDxDrIyv+jEtSr1atl1XqIShOpt+HyMjRyC868Lp/4pH4DKLFDG3CgP6FtLecYN 0xCuTr79z4gV3FImw2jqeqPl1IhEf8stSmJ83qqa2+HC9j8EwUPyZ4dDrv5s86SDb8nw c9Qc9JP+qpE0mTu1GP6jR/Rm4iIUJ3b+lszMn8RLh5CEf3XBNsLuW2z3MECa2pQ5Z43Z oCIRH2vsCPdZaGy60Eu+SXKxMNBJ54F0wZf+7tlF+V44VfN46p2/arLLtFLbO4IbOARq G6jGfSt/Io/56fh2fGDTPZYIubcCeIorrkAFYLMV4c6trb8faCSIxruwPxMHT9KzVJ2j U9pg== 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=qFgNTs8wFSZgsvPOjcHni6DTfDUmPZcsuBaVVN0PPtg=; b=d/13Nb5SVTQJ33B/kwagNjRnmY0IcjYJp6lO9RdG7SzyliR1mt+d6fizgV5v7828Ih zEqzwciKQGgdIlxCN8Th4H+wl7bwkEO20gwa1FtGGUDQHzsYhjwkK6pB+NSKtAzYhmm6 /LD0AXZvc9lYJX3lj7QU/wFDR/BMBy7jdsR/TuVPjdLXuDq8iwt1Ttg/+evj4T0ikswZ qmOoShRDPlWlOqbVojk8An8+YpPvBXkHPPXWMpaBgGZuPnF1KtJH0n2yIfN9o+D4vn8e nYZy3QbSi/FL/h2mXYYRYOiUgWdPrOQrqnn2wSTiF8P/LlExv7Qd1k7zT8ltSIujxJ48 Cg4Q== 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 d10-20020a17090ab30a00b00230a8355ff1si5663917pjr.181.2023.04.07.01.35.25; Fri, 07 Apr 2023 01:35:40 -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 S239769AbjDGIfR (ORCPT + 99 others); Fri, 7 Apr 2023 04:35:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239255AbjDGIfO (ORCPT ); Fri, 7 Apr 2023 04:35:14 -0400 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 412EBA5E1; Fri, 7 Apr 2023 01:35:09 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.153]) by gateway (Coremail) with SMTP id _____8AxUU+81S9kqscXAA--.25363S3; Fri, 07 Apr 2023 16:35:08 +0800 (CST) Received: from loongson-pc.loongson.cn (unknown [10.20.42.153]) by localhost.localdomain (Coremail) with SMTP id AQAAf8AxGL2t1S9kKRwYAA--.21995S3; Fri, 07 Apr 2023 16:35:06 +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 V3 1/5] irqchip/loongson-eiointc: Fix returned value on parsing MADT Date: Fri, 7 Apr 2023 16:34:49 +0800 Message-Id: <20230407083453.6305-2-lvjianmin@loongson.cn> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230407083453.6305-1-lvjianmin@loongson.cn> References: <20230407083453.6305-1-lvjianmin@loongson.cn> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8AxGL2t1S9kKRwYAA--.21995S3 X-CM-SenderInfo: 5oymxthqpl0qxorr0wxvrqhubq/ X-Coremail-Antispam: 1Uk129KBjvJXoW7trWkZF45Kw48uF4rtFWkJFb_yoW8Ww4kpa y7ArZ8tr4Yy3yxCr4kt3s8X345A39xuayxtFWrGayFvr4qkrWUXF4fA3W29rn2yFWUG3Wj vF4Fqa15uw45A3DanT9S1TB71UUUUjDqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU bfAYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s 1l1IIY67AEw4v_JF0_JFyl8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVW5JVW7JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwA2z4 x0Y4vEx4A2jsIE14v26F4UJVW0owA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Cr1j6rxdM2kK e7AKxVWUAVWUtwAS0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07AIYIkI8VC2zVCFFI 0UMc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUtVWrXwAv7VC2z280 aVAFwI0_Gr0_Cr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JMxkF7I0En4 kS14v26r126r1DMxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMxCIbckI 1I0E14v26r126r1DMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_Jr Wlx4CE17CEb7AF67AKxVWUtVW8ZwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r4j 6ryUMIIF0xvE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI42IY6xAIw20EY4v20xvaj40_Jr 0_JF4lIxAIcVC2z280aVAFwI0_Gr0_Cr1lIxAIcVC2z280aVCY1x0267AKxVW8JVW8JrUv cSsGvfC2KfnxnUUI43ZEXa7IU8Gii3UUUUU== 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. Cc: stable@vger.kernel.org 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