Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp1198188lqb; Thu, 30 May 2024 03:22:38 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW50Elr4JtFF3bqKn7GN4ZM0qdZwLyK4W3cwCTLAYUuzqrXbZhdDDWnfzeBZuIdrEwUAnUyDf8ea3g5aK61UP9p7nsgkNdbmvuin2PP6A== X-Google-Smtp-Source: AGHT+IHuPhU2Pqlc+poJGtxgNIvTk1tYnT6RsogjO6LxJdMT3QM21L9C7/sVudu6+7U8Eih5dDO7 X-Received: by 2002:a54:4793:0:b0:3d1:e01c:74b8 with SMTP id 5614622812f47-3d1e01c7cdbmr180629b6e.1.1717064558000; Thu, 30 May 2024 03:22:38 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43fb17baf52si146811421cf.27.2024.05.30.03.22.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 03:22:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195135-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-195135-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195135-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id EF93A1C241BB for ; Thu, 30 May 2024 09:05:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 214C46F314; Thu, 30 May 2024 09:04:40 +0000 (UTC) Received: from fgw21-7.mail.saunalahti.fi (fgw21-7.mail.saunalahti.fi [62.142.5.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2234E6F313 for ; Thu, 30 May 2024 09:04:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.82 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717059879; cv=none; b=ZkZ8PPQVrP2zBDdKsXV2LdAvmdsgg37fMaqTCZXIkc4wG+7VRYtdWirchBiRVuVy+VrEsadXflYa0hOPNbe30C8OkbSH65s3FfQ04h5JTuGQgQmvYVgO4Lc92DSluxsIIdA5BBUcCEZJZNfk/tz0M6k4i9/tQJeQGzgmk4Eze4k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717059879; c=relaxed/simple; bh=hRYXJybvTCdX1i87a/CbDN1b+MJo2gYTetWMREEWjI4=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MNTK9jyu/F0AmmfwyeTa2uRINiZnBRiYn3XZKwDCA83BHYIwI54jP4SntvvXAO9qN+A/zMzVuxA0gBGFv5tgYLYgoNV5aAjAAEViTA63S5erZpUv0YUJ/Mqlp0BKY3eTgqVvqs1NrcmlJFQ1H8uJ9idgp68U5A5vNBXrmPRX/sI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com; spf=fail smtp.mailfrom=gmail.com; arc=none smtp.client-ip=62.142.5.82 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=gmail.com Received: from localhost (88-113-26-230.elisa-laajakaista.fi [88.113.26.230]) by fgw21.mail.saunalahti.fi (Halon) with ESMTP id a254b3f7-1e63-11ef-aaf9-005056bdd08f; Thu, 30 May 2024 12:04:35 +0300 (EEST) From: Andy Shevchenko Date: Thu, 30 May 2024 12:04:34 +0300 To: "Peng Fan (OSS)" Cc: Linus Walleij , Thierry Reding , Jonathan Hunter , Dvorkin Dmitry , Wells Lu , Maxime Coquelin , Alexandre Torgue , Emil Renner Berthing , Jianlong Huang , Hal Feng , Orson Zhai , Baolin Wang , Chunyan Zhang , Viresh Kumar , Shiraz Hashim , soc@kernel.org, Krzysztof Kozlowski , Sylwester Nawrocki , Alim Akhtar , Geert Uytterhoeven , Patrice Chotard , Heiko Stuebner , Damien Le Moal , Ludovic Desroches , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Dong Aisheng , Fabio Estevam , Shawn Guo , Jacky Bai , Pengutronix Kernel Team , Chester Lin , Matthias Brugger , Ghennadi Procopciuc , Sean Wang , Matthias Brugger , AngeloGioacchino Del Regno , Sascha Hauer , Andrew Jeffery , Joel Stanley , Dan Carpenter , Tony Lindgren , Stephen Warren , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, linux-samsung-soc@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-riscv@lists.infradead.org, linux-mediatek@lists.infradead.org, imx@lists.linux.dev, linux-aspeed@lists.ozlabs.org, openbmc@lists.ozlabs.org, Peng Fan Subject: Re: [PATCH v2 08/20] pinctrl: st: Use scope based of_node_put() cleanups Message-ID: References: <20240504-pinctrl-cleanup-v2-0-26c5f2dc1181@nxp.com> <20240504-pinctrl-cleanup-v2-8-26c5f2dc1181@nxp.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240504-pinctrl-cleanup-v2-8-26c5f2dc1181@nxp.com> Sat, May 04, 2024 at 09:20:06PM +0800, Peng Fan (OSS) kirjoitti: > From: Peng Fan > > Use scope based of_node_put() cleanup to simplify code. .. > struct property *pp; > struct device *dev = info->dev; > struct st_pinconf *conf; > - struct device_node *pins; > + struct device_node *pins __free(device_node) = NULL; It's better to move it upper to follow reversed xmas tree order (okay, to some extent in this case). > phandle bank; > unsigned int offset; > - int i = 0, npins = 0, nr_props, ret = 0; > + int i = 0, npins = 0, nr_props; -- With Best Regards, Andy Shevchenko