From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (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 6FF2B2915 for ; Tue, 13 Jun 2023 09:16:28 +0000 (UTC) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 65FA45C0065; Tue, 13 Jun 2023 05:16:27 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 13 Jun 2023 05:16:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1686647787; x=1686734187; bh=Y0 ahhceEFkOrWNGEf1B3K7FfOu/yMcR4EVDU/x3+V7k=; b=C3viU2lPrFX3VNsni/ C2386cky6BCk6PBJnPRmcJsBvTLSjP+Frph7g5k6GGnkAT4OIcUh95OZF7dLiHj5 6NSSan11/rbWnTkSgltLeDUvjgunaVPxQSqua0+QDYIWu77l6V6mmQwHpoINomzI MqiAAv0XBM4+xgIIZ6p4RQ/WPFvcJqhjKJKZ5xQAm5X2pM+OHHpRhb/uF3nXo8Uu 54cAEiZyYHpTEcelLPBoA1SY48ApeY6SPEd5XAS2TujB3wDgpcKdEwy5Dhhaekqo ClTSppVB/KXNO51l+M4dmFH4Pk1BXuWJqo4rVz7UAfAbJbMeEevT1G/Yp3/gyZgC CboA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1686647787; x=1686734187; bh=Y0ahhceEFkOrW NGEf1B3K7FfOu/yMcR4EVDU/x3+V7k=; b=UqmoT6GiuKVSbOEE7Fb6HWmUwMj59 Uy3enIU8e/nM/3tJTQRvwBd7S7PXMHntoNZ6ckIsvN8WBBeQyDBR+ml/zmbGT8av FpvG//5BMcXMvAfCCHWQB2/qaH2FLslkhBBpAnBhj140D9uD0lxwP3Wxsc8q6OEi IIX2j+3Ci61YHFPlEQwQD9LAapGHkZuCGYeJgslbmEkfl5rIdajqNo/tW+wpaHMH dIpoNY8XDvvl/oCwzXOrnozODPfWGxcAQiMmYcSng7tbMAwnpcDtswNxtX3CCW6r qCr3pi0cRW5L61+PSvP3qHZkiDODjYOCa2NgJcF1eGQK4KR9VFeMHMIFQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgedujedguddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesghdtsfertddtjeenucfhrhhomhepofgrgihi mhgvucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrg htthgvrhhnpeeludefgeduheevleejiefgheetvdffheejvdejvefhudeuveehueevvdev veeuieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 13 Jun 2023 05:16:26 -0400 (EDT) Date: Tue, 13 Jun 2023 11:16:24 +0200 From: Maxime Ripard To: Daniel Lezcano Cc: =?utf-8?Q?Ond=C5=99ej?= Jirman , Christophe JAILLET , Vasily Khoruzhick , Yangtao Li , "Rafael J. Wysocki" , Amit Kucheria , Zhang Rui , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Philipp Zabel , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev Subject: Re: [PATCH v2] thermal/drivers/sun8i: Fix some error handling paths in sun8i_ths_probe() Message-ID: <4j74jv53tdf4n6txibl6xjh63dzzjr3ku3uoxhv3rzodthqbqy@25eho3f7wh6y> References: Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="cjtzgc4xxdlkdkqv" Content-Disposition: inline In-Reply-To: --cjtzgc4xxdlkdkqv Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 13, 2023 at 10:49:24AM +0200, Daniel Lezcano wrote: > On 15/05/2023 14:33, Ond=C5=99ej Jirman wrote: > > Hi Maxime, > >=20 > > On Mon, May 15, 2023 at 01:54:41PM +0200, Maxime Ripard wrote: > > > Hi, > > >=20 > > > On Sun, May 14, 2023 at 08:46:05PM +0200, Christophe JAILLET wrote: > > > > Should an error occur after calling sun8i_ths_resource_init() in th= e probe > > > > function, some resources need to be released, as already done in the > > > > .remove() function. > > > >=20 > > > > Switch to the devm_clk_get_enabled() helper and add a new devm_acti= on to > > > > turn sun8i_ths_resource_init() into a fully managed function. > > > >=20 > > > > Move the place where reset_control_deassert() is called so that the > > > > recommended order of reset release/clock enable steps is kept. > > > > A64 manual states that: > > > >=20 > > > > 3.3.6.4. Gating and reset > > > >=20 > > > > Make sure that the reset signal has been released before the relea= se of > > > > module clock gating; > > > >=20 > > > > This fixes the issue and removes some LoC at the same time. > > >=20 > > > It should really be three different patches: > > > - One to fix the resource release, that can be backported to stable > > > releases > > > - One to switch to devm_clk_get_enabled > > > - and one to change the order of clock enable vs reset deassertion > >=20 > > The order was correct before this patch. I don't think an incorrect ord= er > > should be intorduced, even if temporarily between two patches. >=20 > Maxime ? I agree with Ond=C5=99ej Maxime --cjtzgc4xxdlkdkqv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCZIgz6AAKCRDj7w1vZxhR xbFeAP9nZaUHBaCk2zpQ9spk1lWcNPRC8lzIl2Swc+pADkJzfwEAoEPaz8Vy5Osm Q+TSMfTLQNJhVNyS2FSE4zt1fM4g9wc= =Fa6+ -----END PGP SIGNATURE----- --cjtzgc4xxdlkdkqv--