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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA156C7EE23 for ; Mon, 29 May 2023 05:20:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230424AbjE2FUf (ORCPT ); Mon, 29 May 2023 01:20:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231350AbjE2FUf (ORCPT ); Mon, 29 May 2023 01:20:35 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24A13A6; Sun, 28 May 2023 22:20:34 -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 dfw.source.kernel.org (Postfix) with ESMTPS id B227D611F0; 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> Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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