Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp5123946rwb; Mon, 8 Aug 2022 12:36:15 -0700 (PDT) X-Google-Smtp-Source: AA6agR7KU8CClElk9XztY+CgqTwjDOUb4Gyauefb3V0AULoYJqLopGDfOWm+6pk918gYcomQnYSQ X-Received: by 2002:a05:6402:20b:b0:440:cb9f:c469 with SMTP id t11-20020a056402020b00b00440cb9fc469mr4112767edv.420.1659987374918; Mon, 08 Aug 2022 12:36:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659987374; cv=none; d=google.com; s=arc-20160816; b=agvtMnTT0t9iagR2znU9JwxAwYyrGhybVWFZ0XTdnyhuTTVHNV/lr38EpBfTJzDOst Bp8TljYjRdC/eZwvlLduFbgR66xYott/NTfzNJn/qie9SsblfxrwNcSMZL6ALBdfnc7Y IvN5svMjl1ekLzceCOZWzypeuQnlH/veM482rPoaIuI2/BYNrLYvALHMhyg6gL4bBFnp 8BAqFamjITYx9ifXZGpF7QF7xpyIlnWNCrmUHkeht9gP3+96aN1/5UKsKBcBq4xMYJhz Ne3upHzWlLBsBvDxADrnLePGQXNUKgnib9T6vqrtLNXAWBjNPZ+sj3QJdry6+JORYO70 cS/w== 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:dkim-signature; bh=RU3DGXSDOhFlKHEp39Wsh7o4svAUaQZSBtY/RHj/jLg=; b=0tnBR3/4Qwozm/9e21PQ5L97XxIqaqkL1QFVa0qT9/IOe7UkR2pdkp+GD+AOel8ESy QW5iLtdPpndCqzyrQxqaC4p+NY+aIxYaGsh+OKr6NQ8bH/XYlzg74je2NF5g+9eFxX7o gvDfMe1gvHMhuf/IsyUCNSWcEB22SPGU5w7VlNwk+ONPDQyAp40PXKM+GOrl1TWZZrPS tzBODnmr4ra6THy+ebc3xnfHWesBKVu4LqR4kH9pGDgFnewceNFfFGoyHS7ntlJCAR1X 8/7abxfQbmRBThWdkhjlLoNam0brDOEajct5TvjiyVLOfGvr2reSuIsxaK1c12Q2MnHL CmrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fcWEFkrt; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kk18-20020a170907767200b0072b83c2b374si363246ejc.62.2022.08.08.12.35.49; Mon, 08 Aug 2022 12:36:14 -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=@kernel.org header.s=k20201202 header.b=fcWEFkrt; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238151AbiHHTCD (ORCPT + 99 others); Mon, 8 Aug 2022 15:02:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236918AbiHHTCB (ORCPT ); Mon, 8 Aug 2022 15:02:01 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ECDC221A4 for ; Mon, 8 Aug 2022 12:01:59 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 980AAB8105C for ; Mon, 8 Aug 2022 19:01:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DF63FC433D6; Mon, 8 Aug 2022 19:01:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659985317; bh=hF4l8QFriGU1eOWUnU7PWiZ4z9ikvwdpSd6+DkCK1xM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fcWEFkrtp6LsdBp9rhhKiVlKk9AyTkzjezSOPaF7Zr1upGlxOh6LxCSvl3DLc0juM 5ozsbleaOgL3Mxdq2UKsjUAfCB6xjaCuIS31gyMU8yuw+JiqEyuYdQo7EmbLYQPwIZ Yv59hSgK4nVV0x+H026l4xtYRcpMykZPAVRl82cWcfGbH7Jcb7KiMYZRsWgtEHFFII rHMffbmZy+hixY0/fCyqhRK+WlfBrCKZy1oEFo33Jm5s5Lkg6TX4WWf+ga27bPl8x7 ePa0fnnPwm6Fw0MGowRfQLYrK+uWYBNfYJl/DjTGUWYg9VPmkKoo8Ck0vQ43Ldx2BB Nspu92s2Gh1Yg== Date: Mon, 8 Aug 2022 20:01:52 +0100 From: Mark Brown To: Andy Shevchenko Cc: Andy Shevchenko , Aidan MacDonald , Linux Kernel Mailing List , Greg Kroah-Hartman , "Rafael J. Wysocki" Subject: Re: [PATCH v1 1/5] regmap: mmio: Don't unprepare attached clock Message-ID: References: <20220805205321.19452-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="W7E4tre6vxSM9BnJ" Content-Disposition: inline In-Reply-To: X-Cookie: Flee at once, all is discovered. X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 --W7E4tre6vxSM9BnJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Aug 08, 2022 at 08:23:28PM +0200, Andy Shevchenko wrote: > On Mon, Aug 8, 2022 at 5:52 PM Mark Brown wrote: > > On Mon, Aug 08, 2022 at 04:42:28PM +0200, Andy Shevchenko wrote: > > > > I think just for symmetry so it's obvious that error handling is > > > > happening if people want it to be. > > > So, the only user of that API calls it explicitly. Should I rewrite a > > > commit message somehow? > > No. Your commit would just introduce a bug. > There is no bug with the existing codebase after this commit. Are you > talking about out-of-tree modules? Or maybe there is documentation > that says that regmap clears all additionally attached resources? If the regmap code prepared a clock it should unprepare it otherwise we leaked a reference - the caller shouldn't have to worry what enables are done by regmap inside the implementation (and conversely regmap is making sure the clock is prepared and enabled when it's needed). > Okay I may admit that Fixes tag might be wrong due to potential users > in the past. However, in the current state of affairs either we can > proceed with a patch, or amend documentation (if not yet done) to > clarify this aspect of regmap MMIO. From the above I may assume that > you would rather expect the latter to be done (if not yet). I don't understand why you think we need any change at all here. The only effect I can see is to make the code less robust in the case where the user doesn't explicitly detach the clock which is not something we document as mandatory and doesn't strike me as something where there's a pressing need for it to be mandatory. --W7E4tre6vxSM9BnJ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmLxXZ8ACgkQJNaLcl1U h9Dg4wf/Yi1gkgbrwRTCZisVK49mT6spurF29s3Y+7jEwoSmMpRREJzNfu0K4SY7 Q2Gh41aA5fdrmq0RpZE+zUNjqndW54EPrH9pI6JKtYuMfN5+32odfqgJlGo5VPGj 56jGXnwCbX2SYD0l3sS+8evsiwm5B8bm7l6gfpqyemiOX2ZAUf3EKCefDRivPX7s POCxv1WTyBXZVdVJA+iv/pNuU3tBSXylPR5PIu8eJp7RcFCp4Te+Bwf4o1bkCNR5 daJ9LebnED4Sf+U5esSEX/6E9ZymWNQuWHr32q4R4SYqmaOJkuS+HN3bHqAxf/Ja sp7dKEUC7avlEI+7H00VTx/hUcOwTw== =nTGk -----END PGP SIGNATURE----- --W7E4tre6vxSM9BnJ--