Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp941208rwd; Tue, 13 Jun 2023 02:30:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4x1M/k8S63jwBRFZk31ky6Uq2RSc2y/Rwa3kit4qhqdUeKhaWv9oFf1FzPMXYEU8S3PkB2 X-Received: by 2002:a05:6358:ce14:b0:12b:dbed:e021 with SMTP id gt20-20020a056358ce1400b0012bdbede021mr3507377rwb.31.1686648603160; Tue, 13 Jun 2023 02:30:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686648603; cv=none; d=google.com; s=arc-20160816; b=O9IyQtuksmLuCGPcz16ibuB/NXJ+DznWAWnw9ecmsKTuBqLwVma+SFponNBbr0/Xax 9R+caAcjuMOiWCR4HSjgWoRt/26J+livhgo+uuKsw93k/54OwaNm1MeAbjNAPvdVpFnz nI0uwfjKyY0a6FYg+obO5PbSDVJZJRw4aGKvuQkLjRu316DCRrt8HZeI6pcDO2Dt/Mla SJubF0cTs3ZUMG66lTxzYlnlIUcVp73skwneZcKII1YfMgOIFXcKKbGWbqBNcDEUtbQo CplO75rQKJZZ9gJBL4KrGwdsuDPCJu9vRkq/nd5x4ojwskYr0oWl+sD8T16rTjv7XK7e Luow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:feedback-id :dkim-signature:dkim-signature; bh=Y0ahhceEFkOrWNGEf1B3K7FfOu/yMcR4EVDU/x3+V7k=; b=o42+T4Hkf/CoNSdwPV9eMw79/EglA9j2FmSh2eHoZ4fjQA5ZLkeWOZKXb+NWPaeO9I dXtPw9wKnTM/Pjr9gmov0ZIV0t0R6rnbr6BE0XtXAF1dlvcqvCgg8m6E84Hbmnj3CZEP O1mZGcvtvQh5/GCpq+I+WaeW7DLd3724utXN/d3+Ozd9sryS2aFsioRd7wVg8ISzmbGQ mW/kxb4UYTWiKG7D/sjBFz4m7OHBHQxQ8PZwasFDrjdz8rkagDvu+0bl8kLT7p5qRxaZ F0HhA633JFqQ0TqYlF75ZMx9Gv5nkaTa1xPCQWKTe/a4sP6mvygRBs/LrVi7Utbi7aL/ U1dA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm2 header.b=C3viU2lP; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=UqmoT6Gi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u197-20020a6379ce000000b00535bf852410si4362147pgc.313.2023.06.13.02.29.51; Tue, 13 Jun 2023 02:30:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm2 header.b=C3viU2lP; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=UqmoT6Gi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241859AbjFMJQd (ORCPT + 99 others); Tue, 13 Jun 2023 05:16:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241845AbjFMJQ3 (ORCPT ); Tue, 13 Jun 2023 05:16:29 -0400 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 008E91B3; Tue, 13 Jun 2023 02:16:27 -0700 (PDT) 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: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="cjtzgc4xxdlkdkqv" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --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--