Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1965625rwd; Mon, 15 May 2023 05:42:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7xF2iZXTJJezc+ASdAC4Vm7a0GIRz++UAZOlDNHAgALN4QDQ+f5QFfk75uMxWJ5SFpehf0 X-Received: by 2002:a05:6a20:d2cb:b0:106:774c:8bc1 with SMTP id ir11-20020a056a20d2cb00b00106774c8bc1mr1425116pzb.48.1684154564840; Mon, 15 May 2023 05:42:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684154564; cv=none; d=google.com; s=arc-20160816; b=HYmkdQr2w6qBij5D7MJxAIOJV7P3w0G0pJd+HIvceQrdIIp/1Ajsy0J5/5XiJ63dGv zxbMWbf4VMRp7ZxUS2lX6PB0UpwJ4jtn8Kyc0rJwR1Qdqjv/i8hkRWj0ICFWZQ+u1qxy lo0tUDfM272as8hre8H+qOO2aDXdfqBUoOKDpkZEkOq/rcTsy8CXYf0+IvYr7zTqBqNx o5o4/nGThUZUwYgwR6kppK5P0QDCLn8USAQluf+LDw3xNsbb+rNn59hfaI4BOJeY/cAR u9rdcXNBC3iN2Oqtrh+pO7kkYCkp0HGp3BYiB3+ss4IXyXAOHFKGXBHjR7emOk4SxmUE 4JHw== 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:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=lNhI1ZPSFA78EiHhoKCi6o+6dUPHPN+Wd/pt1o5Dr4s=; b=oiIZ/op1+4ALQAJazxWgZaKTmZUB0PeScHuwhcD7ls2HVBEwCH6yDpRO6CROYoPrGi 9Y8oYWNYOV2H5vuzfjSbrbpF4lTIxr9LfNyZ2CIHZi+QbENvhZIidYIryA/DQztTEwfx moVBsqNo0RGwNj3SQ0gBqfTw5ubSCEuFSL6oIXkLFZUGA4lETFAg6zLvUk12gvYVgct2 6NriuT1ner2AHsNYxlar6sjHSQ+7/BgwXh5ucsVV9xvnNffIvTjmpXYrAFwNPyojGwGC RtVFlsOKjl+poHTGhtz7LembYjAkpcIXiTqpSJcgp5hBMSdq2B2WVW3dEUJ09MfN7r7h IWmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xff.cz header.s=mail header.b=NmbH2EXd; 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=xff.cz Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bv8-20020a632e08000000b0052883ac6949si16044407pgb.13.2023.05.15.05.42.29; Mon, 15 May 2023 05:42:44 -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=@xff.cz header.s=mail header.b=NmbH2EXd; 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=xff.cz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241926AbjEOMjp (ORCPT + 99 others); Mon, 15 May 2023 08:39:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241917AbjEOMhc (ORCPT ); Mon, 15 May 2023 08:37:32 -0400 Received: from vps.xff.cz (vps.xff.cz [195.181.215.36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43A471FC1; Mon, 15 May 2023 05:33:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xff.cz; s=mail; t=1684154031; bh=0yXiPXLG1mE9Cp0QFJsDToPAJuYXk6I4juqB/x64HMM=; h=Date:From:To:Cc:Subject:X-My-GPG-KeyId:References:From; b=NmbH2EXdkDST+t545oWgvXbyEH2Wd6r/DrYWrzyAsN23XGFDWHKA7pxlCAsCS6+IV Zw+JPcfhIAFVp67PipJyizpQpACFp9LNF4bnbYreZrVNqlz02nBiCkBYFv+73twX9R qh9CbPY8WSaaQofjqHpNE6BAzwhfwJoJElQbnlD4= Date: Mon, 15 May 2023 14:33:51 +0200 From: =?utf-8?Q?Ond=C5=99ej?= Jirman To: Maxime Ripard Cc: Christophe JAILLET , Vasily Khoruzhick , Yangtao Li , "Rafael J. Wysocki" , Daniel Lezcano , 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: Mail-Followup-To: =?utf-8?Q?Ond=C5=99ej?= Jirman , Maxime Ripard , Christophe JAILLET , Vasily Khoruzhick , Yangtao Li , "Rafael J. Wysocki" , Daniel Lezcano , 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 X-My-GPG-KeyId: EBFBDDE11FB918D44D1F56C1F9F0A873BE9777ED References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 Hi Maxime, On Mon, May 15, 2023 at 01:54:41PM +0200, Maxime Ripard wrote: > Hi, > > On Sun, May 14, 2023 at 08:46:05PM +0200, Christophe JAILLET wrote: > > Should an error occur after calling sun8i_ths_resource_init() in the probe > > function, some resources need to be released, as already done in the > > .remove() function. > > > > Switch to the devm_clk_get_enabled() helper and add a new devm_action to > > turn sun8i_ths_resource_init() into a fully managed function. > > > > 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: > > > > 3.3.6.4. Gating and reset > > > > Make sure that the reset signal has been released before the release of > > module clock gating; > > > > This fixes the issue and removes some LoC at the same time. > > 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 The order was correct before this patch. I don't think an incorrect order should be intorduced, even if temporarily between two patches. regards, o. > Maxime