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 E123BC52D7D for ; Thu, 15 Aug 2024 07:34:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=K/0W+4K7PrRjUu9VD4koOfW7NXqyGwydvnf3SEGRUt4=; b=sUwW7i34GJp7FsXATzBIx4SKuQ LQ9zuDXER/jkWdWcqLIFGKue5xP74cv1FLXgYhq03mBZjL19aa/je0rL8Dl6EDvXfvhrXSlSIdNjr FbpVkTeMs7iB2jt6nWpv9U0MTO2H3kNmLb/FU8gZ4zHGj5biWXvhJK0Zk6zBy7BtwMVA7jYTGevgp Kcr3O3n4Zf9nDFBaUdaiNvLdkW2v8eiTynZUgMhOlSF5heVaKYR9OWvr84H/WbBUG+6KhKHgWoH2/ /DMi7gSzufA4H+a0HXOU0FE6zoX58gzMJDgsKFWYiWRDbRMzVVmJTlnC7LPKLFssJAWrmjMhQ7Rr7 7KTlp7FA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1seUzV-00000009IG0-1tY1; Thu, 15 Aug 2024 07:33:49 +0000 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1seUwt-00000009Hj1-03Ca for linux-arm-kernel@lists.infradead.org; Thu, 15 Aug 2024 07:31:08 +0000 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-710bdddb95cso427756b3a.3 for ; Thu, 15 Aug 2024 00:31:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1723707066; x=1724311866; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=K/0W+4K7PrRjUu9VD4koOfW7NXqyGwydvnf3SEGRUt4=; b=UzluI/sETMMLUjpsEkDh+bVMnen4G95002zq2ZY8rQPWy8u7Q+lBJ/Sh7XUdf0skqj eutgyHTlk+rkjEMS3R2k910iSuS951cVkBf4FqTyQ+EwpM8hn4UIbgS6xJGtMsUwDLs2 ciIWqlEsrRSaa3pXla0MfKO3IaWBd8qJQ7JIY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723707066; x=1724311866; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=K/0W+4K7PrRjUu9VD4koOfW7NXqyGwydvnf3SEGRUt4=; b=MWLWYAAG+X1ZTRW0orQNM3TbpMuXYk+Lrm8gSv+rwS2Ok8k5OeiYX1WTpoJP9a9wCX l+/E21xWXUNUqFbzIPkePVvy6sRLDbUTes8hf2WH/vkb8phMlaUwmMSQ1aK/H4Ebpe87 oxiz4IXl2jFXise0m9yRN9OLTPMZku8IGiaKErmB3z1jlJQKA3e+RgdMOq4zIp3HEXUu 0Q330KQ2STtPKlCS0OQa1DOv0UCvCEJSavoINGjD7rHs2Sxn8LsYG5360nubiEEEL3Kk t/V5/pbpVylyUBPJXtd13Ye2ZmNnNFg3ZnZkGiz4d5gf+hXENH6oQ0ItUIbcGaqDEyrU dWTA== X-Forwarded-Encrypted: i=1; AJvYcCU+BdHarhTYRCsFhHO6HT9bIZtM/J0jg5H4N93ooeWFsc6HbJsY/nzyfP6EkFOcFUk8SzKH28Tgc5EXy2qEpyFhXC1PjIentmUKbj19X3UN0RAkmwY= X-Gm-Message-State: AOJu0Yx4Of92vMUP4ukI2Bj7z+m145CNeSpNSDov6IsHIYoYPlE9gBqq nQy9eonhE08cup2+V7wjJf59bkVfsLsySeAO3P9JZNdAQPr88ZFdM6Cvaq34RA== X-Google-Smtp-Source: AGHT+IGej8YvuGdBMRMsXjNlbIbtoIi0LLSQzAkjZWVd/ikaWZkP42kYpFajA9fEuF1NPTDRfj3RWQ== X-Received: by 2002:a05:6a20:d706:b0:1c6:fc7d:5546 with SMTP id adf61e73a8af0-1c8eaf59d37mr7069297637.37.1723707065853; Thu, 15 Aug 2024 00:31:05 -0700 (PDT) Received: from google.com ([2401:fa00:1:10:745d:58f7:b3cd:901f]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7127af188a4sm559611b3a.164.2024.08.15.00.31.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Aug 2024 00:31:05 -0700 (PDT) Date: Thu, 15 Aug 2024 15:31:00 +0800 From: Chen-Yu Tsai To: Krzysztof Kozlowski Cc: "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Amit Kucheria , Thara Gopinath , Thierry Reding , Jonathan Hunter , Vasily Khoruzhick , Yangtao Li , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev Subject: Re: [PATCH 6/7] thermal: tegra: Simplify with scoped for each OF child loop Message-ID: <20240815073100.GF350960@google.com> References: <20240814-b4-cleanup-h-of-node-put-thermal-v1-0-7a1381e1627e@linaro.org> <20240814-b4-cleanup-h-of-node-put-thermal-v1-6-7a1381e1627e@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240814-b4-cleanup-h-of-node-put-thermal-v1-6-7a1381e1627e@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240815_003107_077893_BF4BFE2D X-CRM114-Status: GOOD ( 18.97 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Aug 14, 2024 at 10:17:52PM +0200, Krzysztof Kozlowski wrote: > Use scoped for_each_child_of_node_scoped() when iterating over device > nodes to make code a bit simpler. > > Signed-off-by: Krzysztof Kozlowski Reviewed-by: Chen-Yu Tsai > --- > drivers/thermal/tegra/soctherm.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/thermal/tegra/soctherm.c b/drivers/thermal/tegra/soctherm.c > index a023c948afbd..ff4eedb553fb 100644 > --- a/drivers/thermal/tegra/soctherm.c > +++ b/drivers/thermal/tegra/soctherm.c > @@ -1651,7 +1651,7 @@ static void soctherm_init_hw_throt_cdev(struct platform_device *pdev) > { > struct device *dev = &pdev->dev; > struct tegra_soctherm *ts = dev_get_drvdata(dev); > - struct device_node *np_stc, *np_stcc; > + struct device_node *np_stc; > const char *name; > int i; > > @@ -1668,7 +1668,7 @@ static void soctherm_init_hw_throt_cdev(struct platform_device *pdev) > return; > } > > - for_each_child_of_node(np_stc, np_stcc) { > + for_each_child_of_node_scoped(np_stc, np_stcc) { > struct soctherm_throt_cfg *stc; > struct thermal_cooling_device *tcd; > int err; > @@ -1683,7 +1683,6 @@ static void soctherm_init_hw_throt_cdev(struct platform_device *pdev) > > if (stc->init) { > dev_err(dev, "throttle-cfg: %s: redefined!\n", name); > - of_node_put(np_stcc); > break; > } > > > -- > 2.43.0 >