From: Marc Zyngier <maz@kernel.org>
To: Huacai Chen <chenhuacai@loongson.cn>
Cc: Thomas Gleixner <tglx@linutronix.de>,
loongarch@lists.linux.dev, linux-kernel@vger.kernel.org,
Xuefeng Li <lixuefeng@loongson.cn>,
Huacai Chen <chenhuacai@gmail.com>,
Jiaxun Yang <jiaxun.yang@flygoat.com>
Subject: Re: [PATCH] irqchip/loongarch: Adjust acpi_cascade_irqdomain_init() and sub-routines
Date: Thu, 20 Oct 2022 12:21:15 +0100 [thread overview]
Message-ID: <864jvyg2qc.wl-maz@kernel.org> (raw)
In-Reply-To: <20221020073346.536494-1-chenhuacai@loongson.cn>
On Thu, 20 Oct 2022 08:33:46 +0100,
Huacai Chen <chenhuacai@loongson.cn> wrote:
>
> 1, Adjust prototype of acpi_cascade_irqdomain_init() because we don't
> need its return value.
> 2, Combine unnecessary short lines to one long line.
>
> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
> ---
> drivers/irqchip/irq-loongarch-cpu.c | 19 +++++++------------
> drivers/irqchip/irq-loongson-eiointc.c | 19 +++++++------------
> drivers/irqchip/irq-loongson-pch-pic.c | 11 ++++-------
> 3 files changed, 18 insertions(+), 31 deletions(-)
>
> diff --git a/drivers/irqchip/irq-loongarch-cpu.c b/drivers/irqchip/irq-loongarch-cpu.c
> index 741612ba6a52..093609c8eaa7 100644
> --- a/drivers/irqchip/irq-loongarch-cpu.c
> +++ b/drivers/irqchip/irq-loongarch-cpu.c
> @@ -92,31 +92,26 @@ static const struct irq_domain_ops loongarch_cpu_intc_irq_domain_ops = {
> .xlate = irq_domain_xlate_onecell,
> };
>
> -static int __init
> -liointc_parse_madt(union acpi_subtable_headers *header,
> - const unsigned long end)
> +static int __init liointc_parse_madt(union acpi_subtable_headers *header,
> + const unsigned long end)
> {
> struct acpi_madt_lio_pic *liointc_entry = (struct acpi_madt_lio_pic *)header;
>
> return liointc_acpi_init(irq_domain, liointc_entry);
> }
>
> -static int __init
> -eiointc_parse_madt(union acpi_subtable_headers *header,
> - const unsigned long end)
> +static int __init eiointc_parse_madt(union acpi_subtable_headers *header,
> + const unsigned long end)
> {
> struct acpi_madt_eio_pic *eiointc_entry = (struct acpi_madt_eio_pic *)header;
>
> return eiointc_acpi_init(irq_domain, eiointc_entry);
> }
>
> -static int __init acpi_cascade_irqdomain_init(void)
> +static void __init acpi_cascade_irqdomain_init(void)
> {
> - acpi_table_parse_madt(ACPI_MADT_TYPE_LIO_PIC,
> - liointc_parse_madt, 0);
> - acpi_table_parse_madt(ACPI_MADT_TYPE_EIO_PIC,
> - eiointc_parse_madt, 0);
> - return 0;
> + acpi_table_parse_madt(ACPI_MADT_TYPE_LIO_PIC, liointc_parse_madt, 0);
> + acpi_table_parse_madt(ACPI_MADT_TYPE_EIO_PIC, eiointc_parse_madt, 0);
This definitely looks like it is moving in the wrong direction. The
parsing can return an error, and you're not handling it anywhere.
Given how often firmware tables are broken, this seems pretty bad.
M.
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2022-10-20 11:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-20 7:33 [PATCH] irqchip/loongarch: Adjust acpi_cascade_irqdomain_init() and sub-routines Huacai Chen
2022-10-20 11:21 ` Marc Zyngier [this message]
2022-10-20 11:49 ` Huacai Chen
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=864jvyg2qc.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=chenhuacai@gmail.com \
--cc=chenhuacai@loongson.cn \
--cc=jiaxun.yang@flygoat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lixuefeng@loongson.cn \
--cc=loongarch@lists.linux.dev \
--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