From patchwork Tue Jun 23 08:51:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tiezhu Yang X-Patchwork-Id: 11620081 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DA7F26C1 for ; Tue, 23 Jun 2020 08:54:10 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B57B120723 for ; Tue, 23 Jun 2020 08:54:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Ki7jOoCc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B57B120723 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=5WfZsaIsl9Y92xP+HilPIletrfFGuXlpOReDi1wx5Ug=; b=Ki7jOoCc6TLtmmr7HWrxU5sR1Q Q/5rRIVen8wYal4Jqg6BBAFlQ8RIRcly9EPJh/Sl+/ALvzYhMZAP8FTe/18/UmF+QX9a2HGUtl61f potdaTU4sGbrM8vajiRLMYTSu6DwZs6VAut/lEYb/sEROu+9a+iPM0cO9TekMVoHIFqxDEaYmJqii zamVrsLOOrK8NV2kk+3aIqzaDqKMY7ggE5tYYkgVX9V6YtjvyRqPi54TYJgwmyuQ8kTO1ghBK4pR6 cdIuGNGAf0MUCpZxQwZ9hbWr+zMFHhsQEpZ13KPX7IRqsJx6Eo6LQxtLOMn0UfeyKOwNsbXOts8Nr hQPGmRug==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnefM-0002ij-2F; Tue, 23 Jun 2020 08:52:28 +0000 Received: from mail.loongson.cn ([114.242.206.163] helo=loongson.cn) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnefB-0002bO-C2; Tue, 23 Jun 2020 08:52:18 +0000 Received: from linux.localdomain (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9Dxv2uFwvFecLBIAA--.12S2; Tue, 23 Jun 2020 16:51:19 +0800 (CST) From: Tiezhu Yang To: Thomas Gleixner , Jason Cooper , Marc Zyngier , Rob Herring Subject: [PATCH 0/7] Fix potential resource leaks and do some code cleanups about irqchip Date: Tue, 23 Jun 2020 16:51:09 +0800 Message-Id: <1592902276-3969-1-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 X-CM-TRANSID: AQAAf9Dxv2uFwvFecLBIAA--.12S2 X-Coremail-Antispam: 1UD129KBjvJXoW7AFy5GF48uFy7WrWfGr1Utrb_yoW8CrWDpF 47A39Ivr1fCay3Zr1fAr40yry3A3Z5Kay7K3yxt3sxXr95G34DWF1UAa4kXr97JrWxG3Wj 9F1rWFWUG3WUCF7anT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUvF14x267AKxVW5JVWrJwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK02 1l84ACjcxK6xIIjxv20xvE14v26ryj6F1UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26F4j 6r4UJwA2z4x0Y4vEx4A2jsIE14v26F4UJVW0owA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gc CE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E 2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r4j6F4UMcvjeVCFs4IE7xkEbVWUJV W8JwACjcxG0xvY0x0EwIxGrwACjI8F5VA0II8E6IAqYI8I648v4I1lFIxGxcIEc7CjxVA2 Y2ka0xkIwI1l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4 xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r4a6rW5 MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I 0E14v26r4j6F4UMIIF0xvE42xK8VAvwI8IcIk0rVWrJr0_WFyUJwCI42IY6I8E87Iv67AK xVW8JVWxJwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvj fUeApeUUUUU X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Spam-Note: CRM114 invocation failed X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Baruch Siach , Albert Ou , Tony Lindgren , linux-mips@vger.kernel.org, Michal Simek , Jiaxun Yang , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-omap@vger.kernel.org, Kukjin Kim , Guo Ren , Krzysztof Kozlowski , Paul Walmsley , Huacai Chen , linux-riscv@lists.infradead.org, linux-csky@vger.kernel.org, Xuefeng Li , Palmer Dabbelt , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org When I test the irqchip code of Loongson, I read the related code of other chips in drivers/irqchip and I find some potential resource leaks in the error path, I think it is better to fix them. Additionally, do some code cleanups about Loongson to make it more clean and readable. Tiezhu Yang (7): irqchip: Fix potential resource leaks irqchip/loongson-htpic: Remove redundant kfree operation irqchip/loongson-htvec: Check return value of irq_domain_translate_onecell() irqchip/loongson-pch-pic: Check return value of irq_domain_translate_twocell() irqchip/loongson-pch-msi: Remove unneeded variable irqchip/loongson-htpic: Remove unneeded select of I8259 dt-bindings: interrupt-controller: Fix typos in loongson,liointc.yaml .../interrupt-controller/loongson,liointc.yaml | 4 ++-- drivers/irqchip/Kconfig | 1 - drivers/irqchip/irq-ath79-misc.c | 3 +++ drivers/irqchip/irq-csky-apb-intc.c | 3 +++ drivers/irqchip/irq-csky-mpintc.c | 26 +++++++++++++++++----- drivers/irqchip/irq-davinci-aintc.c | 17 ++++++++++---- drivers/irqchip/irq-davinci-cp-intc.c | 17 +++++++++++--- drivers/irqchip/irq-digicolor.c | 4 ++++ drivers/irqchip/irq-dw-apb-ictl.c | 11 ++++++--- drivers/irqchip/irq-loongson-htpic.c | 6 ++--- drivers/irqchip/irq-loongson-htvec.c | 10 +++++++-- drivers/irqchip/irq-loongson-pch-msi.c | 7 +----- drivers/irqchip/irq-loongson-pch-pic.c | 15 ++++++++----- drivers/irqchip/irq-ls1x.c | 4 +++- drivers/irqchip/irq-mscc-ocelot.c | 6 +++-- drivers/irqchip/irq-nvic.c | 2 ++ drivers/irqchip/irq-omap-intc.c | 4 +++- drivers/irqchip/irq-riscv-intc.c | 1 + drivers/irqchip/irq-s3c24xx.c | 20 ++++++++++++----- drivers/irqchip/irq-xilinx-intc.c | 1 + 20 files changed, 116 insertions(+), 46 deletions(-)