From patchwork Thu Oct 20 07:33:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huacai Chen X-Patchwork-Id: 6009 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp117941wrs; Thu, 20 Oct 2022 00:41:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6iIi3n6q8Z2G/hpIALHrXpSs1cccWaOQtdFFawq5vJS2ykeYbl6JZlLwdPelkgiVxTs0af X-Received: by 2002:a17:902:ea10:b0:185:41c2:a71e with SMTP id s16-20020a170902ea1000b0018541c2a71emr12759351plg.21.1666251707611; Thu, 20 Oct 2022 00:41:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666251707; cv=none; d=google.com; s=arc-20160816; b=HkWFbR/EPO08ZD+efRllQdEhdPF6BJ+usJu5TbkzwvJWsd0fxSb7STSChG7cYUhF/w g95FfboGXyTvRVFDh+/1KrGVRQmL14Kril09YsOydkVgTmowH8ZbowXD2I/qAbx2ZPZQ YWC97hLsk9TqBxaRvTZD6/8h6dYlUoZd7HBc0DjK6S4j7gGLTcGjRsudBL+l2f9z6JBX EDDI6ZBZhrpCbNwQLrfe2dYc0NYaqoEO1xrD3k/4MNbeXu19yEIinynL4eBt9ANskDf/ +FpEYXOEo9rmV3sKo3GwjIcXMy7bJh06mMEYkKXIMA0L7/gMENLfi6SES1LwSDpDLzB7 z/Cg== 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 :message-id:date:subject:cc:to:from; bh=T9XhDJSMWzHLG2qm1omvDyBmlksJJy1IZsrjLzFWRUs=; b=P8u/USMHmqOGmWtBf7bxXe2tjxlsLDSMwu12L9pnc5YrCCYbiCGiovrU8IUM5H8f8P 7i3CLz6rzJSgdR+WbqWwkuT2Oe4qfVE7i1I+kdW89yzkPGJFr8xKAPscgs84Nco50Awu Of+egY62JXoLCI2ONIQdNyST9DlCvEf5pOTnKBv08TbIkLzHJZwB5s77e7APwEGOKPxJ hjH4jwp90I87RW6fDoPByQjGRBsBOhfOy+PBiSPjC1JayE6nxmPvHUigWBSpzz1k3xAZ kNNHbbNoz3y0Ctd3JLnUPAbkZsheHbPwVy/KrTIzC10RNzAByqW44GrcvhCxLKIxIK1x CLuA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 2-20020a630a02000000b0046b2f9bf473si19365308pgk.574.2022.10.20.00.41.34; Thu, 20 Oct 2022 00:41:47 -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 S229454AbiJTHfs (ORCPT + 99 others); Thu, 20 Oct 2022 03:35:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230248AbiJTHfj (ORCPT ); Thu, 20 Oct 2022 03:35:39 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF728148F65 for ; Thu, 20 Oct 2022 00:35:35 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id 7B693B80B45 for ; Thu, 20 Oct 2022 07:35:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1DE48C433C1; Thu, 20 Oct 2022 07:35:30 +0000 (UTC) From: Huacai Chen To: Thomas Gleixner , Marc Zyngier Cc: loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, Xuefeng Li , Huacai Chen , Jiaxun Yang , Huacai Chen Subject: [PATCH] irqchip/loongarch: Adjust acpi_cascade_irqdomain_init() and sub-routines Date: Thu, 20 Oct 2022 15:33:46 +0800 Message-Id: <20221020073346.536494-1-chenhuacai@loongson.cn> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747191550835710529?= X-GMAIL-MSGID: =?utf-8?q?1747191550835710529?= 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 --- 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); } static int __init cpuintc_acpi_init(union acpi_subtable_headers *header, diff --git a/drivers/irqchip/irq-loongson-eiointc.c b/drivers/irqchip/irq-loongson-eiointc.c index 16e9af8d8b1e..efead0bfb1ca 100644 --- a/drivers/irqchip/irq-loongson-eiointc.c +++ b/drivers/irqchip/irq-loongson-eiointc.c @@ -301,9 +301,8 @@ static struct irq_domain *acpi_get_vec_parent(int node, struct acpi_vector_group return NULL; } -static int __init -pch_pic_parse_madt(union acpi_subtable_headers *header, - const unsigned long end) +static int __init pch_pic_parse_madt(union acpi_subtable_headers *header, + const unsigned long end) { struct acpi_madt_bio_pic *pchpic_entry = (struct acpi_madt_bio_pic *)header; unsigned int node = (pchpic_entry->address >> 44) & 0xf; @@ -315,9 +314,8 @@ pch_pic_parse_madt(union acpi_subtable_headers *header, return -EINVAL; } -static int __init -pch_msi_parse_madt(union acpi_subtable_headers *header, - const unsigned long end) +static int __init pch_msi_parse_madt(union acpi_subtable_headers *header, + const unsigned long end) { struct acpi_madt_msi_pic *pchmsi_entry = (struct acpi_madt_msi_pic *)header; struct irq_domain *parent = acpi_get_vec_parent(eiointc_priv[nr_pics - 1]->node, msi_group); @@ -328,13 +326,10 @@ pch_msi_parse_madt(union acpi_subtable_headers *header, return -EINVAL; } -static int __init acpi_cascade_irqdomain_init(void) +static void __init acpi_cascade_irqdomain_init(void) { - acpi_table_parse_madt(ACPI_MADT_TYPE_BIO_PIC, - pch_pic_parse_madt, 0); - acpi_table_parse_madt(ACPI_MADT_TYPE_MSI_PIC, - pch_msi_parse_madt, 1); - return 0; + acpi_table_parse_madt(ACPI_MADT_TYPE_BIO_PIC, pch_pic_parse_madt, 0); + acpi_table_parse_madt(ACPI_MADT_TYPE_MSI_PIC, pch_msi_parse_madt, 1); } int __init eiointc_acpi_init(struct irq_domain *parent, diff --git a/drivers/irqchip/irq-loongson-pch-pic.c b/drivers/irqchip/irq-loongson-pch-pic.c index c01b9c257005..d2cf54a87bee 100644 --- a/drivers/irqchip/irq-loongson-pch-pic.c +++ b/drivers/irqchip/irq-loongson-pch-pic.c @@ -325,20 +325,17 @@ int find_pch_pic(u32 gsi) return -1; } -static int __init -pch_lpc_parse_madt(union acpi_subtable_headers *header, - const unsigned long end) +static int __init pch_lpc_parse_madt(union acpi_subtable_headers *header, + const unsigned long end) { struct acpi_madt_lpc_pic *pchlpc_entry = (struct acpi_madt_lpc_pic *)header; return pch_lpc_acpi_init(pch_pic_priv[0]->pic_domain, pchlpc_entry); } -static int __init acpi_cascade_irqdomain_init(void) +static void __init acpi_cascade_irqdomain_init(void) { - acpi_table_parse_madt(ACPI_MADT_TYPE_LPC_PIC, - pch_lpc_parse_madt, 0); - return 0; + acpi_table_parse_madt(ACPI_MADT_TYPE_LPC_PIC, pch_lpc_parse_madt, 0); } int __init pch_pic_acpi_init(struct irq_domain *parent,