From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6B09C433F5 for ; Wed, 20 Apr 2022 14:26:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379672AbiDTO3T (ORCPT ); Wed, 20 Apr 2022 10:29:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379655AbiDTO3N (ORCPT ); Wed, 20 Apr 2022 10:29:13 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9B163443DC for ; Wed, 20 Apr 2022 07:26:27 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 274F023A; Wed, 20 Apr 2022 07:26:27 -0700 (PDT) Received: from donnerap.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DD3DC3F5A1; Wed, 20 Apr 2022 07:26:25 -0700 (PDT) Date: Wed, 20 Apr 2022 15:26:17 +0100 From: Andre Przywara To: cgel.zte@gmail.com Cc: linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Lv Ruyi , Zeal Robot , Rob Herring , Arnd Bergmann , Olof Johansson Subject: Re: [PATCH] ARM: highbank: Fix missing of_node_put in highbank_init() Message-ID: <20220420152617.7b3c1d70@donnerap.cambridge.arm.com> In-Reply-To: <20220408094817.2494756-1-lv.ruyi@zte.com.cn> References: <20220408094817.2494756-1-lv.ruyi@zte.com.cn> Organization: ARM X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; aarch64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 8 Apr 2022 09:48:17 +0000 cgel.zte@gmail.com wrote: Hi, > From: Lv Ruyi > > of_find_compatible_node() returns node pointer with refcount incremented, > use of_node_put() on it to decrease refcount when done. Thanks for the patch, looks alright to me. There is actually another occurrence in the same file, will send a patch ASAP. > Reported-by: Zeal Robot > Signed-off-by: Lv Ruyi Fixes: 220e6cf7b793d702596506a8c4bf1f4fd4040df1 ("ARM: add Highbank core platform support") Reviewed-by: Andre Przywara Arnd, Olof, can you please take this through the soc tree as a fix, whenever you find time? Thanks! Andre > --- > arch/arm/mach-highbank/highbank.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c > index db607955a7e4..fe82c3d16ffd 100644 > --- a/arch/arm/mach-highbank/highbank.c > +++ b/arch/arm/mach-highbank/highbank.c > @@ -141,6 +141,7 @@ static void __init highbank_init(void) > /* Map system registers */ > np = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs"); > sregs_base = of_iomap(np, 0); > + of_node_put(np); > WARN_ON(!sregs_base); > > pm_power_off = highbank_power_off; From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 80040C433F5 for ; Wed, 20 Apr 2022 14:27:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fYRNbIU2njMlkcOqYRm6uuKiH8/YfdGcypy/aYjPoAg=; b=XtuxJYTlhlOvjQ UYSqtfjT3aQ6eh1Xy37K1/E9HjlHTfUCN3WDcTQHlYO1XxZ0eACZdA9jdM2h/uETy7aLIl/5/WghI BVijmr5H3rGymC6T0OlaRIa9I3xuOmshsAcKNKiyCMuIxw/pVvLhoLAVDyhF799bjSS7f9eX9KF3q aDn7ekJUsRK90KqWVsHalI48l+OHkxwZAxVbPvF48wuWDCY1OyRDWzfmrF71KLmMJ5Jqo0jkbereW t3e73zrOhrJRiotel6Mu+TL/RLu6Q1ewVFRlv4cyxaJuhv64xChP1wqGKuG8shNwM9qs0ULKZ5TgA hmtHNVZYZr0LLBxlv0ZA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhBHt-009Od1-E9; Wed, 20 Apr 2022 14:26:33 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhBHq-009ObK-EX for linux-arm-kernel@lists.infradead.org; Wed, 20 Apr 2022 14:26:31 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 274F023A; Wed, 20 Apr 2022 07:26:27 -0700 (PDT) Received: from donnerap.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DD3DC3F5A1; Wed, 20 Apr 2022 07:26:25 -0700 (PDT) Date: Wed, 20 Apr 2022 15:26:17 +0100 From: Andre Przywara To: cgel.zte@gmail.com Cc: linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Lv Ruyi , Zeal Robot , Rob Herring , Arnd Bergmann , Olof Johansson Subject: Re: [PATCH] ARM: highbank: Fix missing of_node_put in highbank_init() Message-ID: <20220420152617.7b3c1d70@donnerap.cambridge.arm.com> In-Reply-To: <20220408094817.2494756-1-lv.ruyi@zte.com.cn> References: <20220408094817.2494756-1-lv.ruyi@zte.com.cn> Organization: ARM X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; aarch64-unknown-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220420_072630_581724_2FCC48B6 X-CRM114-Status: GOOD ( 16.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 8 Apr 2022 09:48:17 +0000 cgel.zte@gmail.com wrote: Hi, > From: Lv Ruyi > > of_find_compatible_node() returns node pointer with refcount incremented, > use of_node_put() on it to decrease refcount when done. Thanks for the patch, looks alright to me. There is actually another occurrence in the same file, will send a patch ASAP. > Reported-by: Zeal Robot > Signed-off-by: Lv Ruyi Fixes: 220e6cf7b793d702596506a8c4bf1f4fd4040df1 ("ARM: add Highbank core platform support") Reviewed-by: Andre Przywara Arnd, Olof, can you please take this through the soc tree as a fix, whenever you find time? Thanks! Andre > --- > arch/arm/mach-highbank/highbank.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c > index db607955a7e4..fe82c3d16ffd 100644 > --- a/arch/arm/mach-highbank/highbank.c > +++ b/arch/arm/mach-highbank/highbank.c > @@ -141,6 +141,7 @@ static void __init highbank_init(void) > /* Map system registers */ > np = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs"); > sregs_base = of_iomap(np, 0); > + of_node_put(np); > WARN_ON(!sregs_base); > > pm_power_off = highbank_power_off; _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel