From: Marc Zyngier <maz@kernel.org>
To: Jianmin Lv <lvjianmin@loongson.cn>
Cc: Thomas Gleixner <tglx@linutronix.de>,
linux-kernel@vger.kernel.org, loongarch@lists.linux.dev,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Jiaxun Yang <jiaxun.yang@flygoat.com>,
Huacai Chen <chenhuacai@loongson.cn>,
loongson-kernel@lists.loongnix.cn
Subject: Re: [PATCH V1 1/5] irqchip/loongson-eiointc: Fix returned value on parsing MADT
Date: Fri, 24 Mar 2023 15:36:43 +0000 [thread overview]
Message-ID: <87h6uagnzo.wl-maz@kernel.org> (raw)
In-Reply-To: <20230324060854.29375-2-lvjianmin@loongson.cn>
On Fri, 24 Mar 2023 06:08:50 +0000,
Jianmin Lv <lvjianmin@loongson.cn> wrote:
>
> 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.
>
> Change-Id: I4d278534999ec3e5c8db6d40155ba2665d9de86f
> Signed-off-by: Jianmin Lv <lvjianmin@loongson.cn>
> ---
> 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;
Why can't you detect this particular case instead of blindly
suppressing the error?
M.
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2023-03-24 15:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-24 6:08 [PATCH V1 0/5] Fix some issues of irq controllers for dual-bridges scenario Jianmin Lv
2023-03-24 6:08 ` [PATCH V1 1/5] irqchip/loongson-eiointc: Fix returned value on parsing MADT Jianmin Lv
2023-03-24 15:36 ` Marc Zyngier [this message]
2023-03-27 3:58 ` Jianmin Lv
2023-03-24 6:08 ` [PATCH V1 2/5] irqchip/loongson-eiointc: Fix incorrect use of acpi_get_vec_parent Jianmin Lv
2023-03-24 15:34 ` Marc Zyngier
2023-03-27 4:00 ` Jianmin Lv
2023-03-24 6:08 ` [PATCH V1 3/5] irqchip/loongson-pch-pic: Fix pch_pic_acpi_init calling Jianmin Lv
2023-03-24 6:08 ` [PATCH V1 4/5] irqchip/loongson-eiointc: Fix registration of syscore_ops Jianmin Lv
2023-03-24 6:08 ` [PATCH V1 5/5] irqchip/loongson-pch-pic: " Jianmin Lv
2023-03-24 6:32 ` [PATCH V1 0/5] Fix some issues of irq controllers for dual-bridges scenario Huacai Chen
2023-03-24 7:08 ` Jianmin Lv
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h6uagnzo.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=chenhuacai@loongson.cn \
--cc=jiaxun.yang@flygoat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=loongson-kernel@lists.loongnix.cn \
--cc=lorenzo.pieralisi@arm.com \
--cc=lvjianmin@loongson.cn \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox