From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 07A3DC77B7A for ; Mon, 29 May 2023 05:27:39 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 845B06C0; Mon, 29 May 2023 07:26:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 845B06C0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1685338057; bh=yVoaOUXbOBC7CemKH4jxuLrA+Cy2P81i7fI7XtLeuiM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=sUDoFmbc12irbnity7TtfnIJhCQVSVzaAG8Ik9pwyXeTPJquezYLdww8+0h1PRGlp u+Ssyvhl+q+8VUllSlgs2/1EicoTdYpP+R/EzAZU6ETsyeW89qOJbl3ZEN4xqawlCY JW4IANMM10j4J9X/R+20vGcawJJ2rzlb/ck59lys= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 03CB3F80567; Mon, 29 May 2023 07:25:58 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 83B6FF8056F; Mon, 29 May 2023 07:25:58 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6F727F8042F; Mon, 29 May 2023 07:20:40 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A6F98F8016B for ; Mon, 29 May 2023 07:20:35 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A6F98F8016B Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=sk9yj12N 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 dfw.source.kernel.org (Postfix) with ESMTPS id AC375611A3; Mon, 29 May 2023 05:20:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3F9BEC433EF; Mon, 29 May 2023 05:20:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685337633; bh=yVoaOUXbOBC7CemKH4jxuLrA+Cy2P81i7fI7XtLeuiM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sk9yj12NbE3zSbxGD88YDiRMuvNeTIz4Fs0F1URoFBTromRWGA7tY567RHMgEpgcu G+379bu3UpYFwAsxvgBf/II4WJLhKtneY1jKhWfES3LEyan8RK/q/x7G6YLngxa7nH QZ+mphtIwdVQnL19TIHMtxN+w/GUV4vwejQ1X7aP6jSJJh/xcM5jQ8LKYpmzSjICci WpryIn2E0eoiW3QU2PAtRjERWiUhc+0VIOmwYJuf91YBaC9AtP9PTID/ffJ5B7wEHU UgHcJo3qjPyy5G9+IyNNXMLQR/2lpkZDIrsESZ03MVtXRRflpOohs6ok3Jh4d8+L3h ybeZAVRsvVGRw== Date: Mon, 29 May 2023 10:50:28 +0530 From: Vinod Koul To: Krzysztof Kozlowski Cc: Bard Liao , Pierre-Louis Bossart , Sanyog Kale , Andy Gross , Bjorn Andersson , Konrad Dybcio , =?iso-8859-1?Q?P=E9ter?= Ujfalusi , Srinivas Kandagatla , Charles Keepax , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH 1/2] soundwire: qcom: fix unbalanced pm_runtime_put() Message-ID: References: <20230517163750.997629-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230517163750.997629-1-krzysztof.kozlowski@linaro.org> Message-ID-Hash: DEMJ6HQSHPJB6L3XZAEL7BCPHFSFQGX4 X-Message-ID-Hash: DEMJ6HQSHPJB6L3XZAEL7BCPHFSFQGX4 X-MailFrom: vkoul@kernel.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On 17-05-23, 18:37, Krzysztof Kozlowski wrote: > This reverts commit 57ed510b0547 ("soundwire: qcom: use > pm_runtime_resume_and_get()") which introduced unbalanced > pm_runtime_put(), when device did not have runtime PM enabled. > > If pm_runtime_resume_and_get() failed with -EACCES, the driver continued > execution and finally called pm_runtime_put_autosuspend(). Since > pm_runtime_resume_and_get() drops the usage counter on every error, this > lead to double decrement of that counter visible in certain debugfs > actions on unattached devices (still in reset state): Applied, thanks -- ~Vinod