Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4614062ybi; Tue, 30 Jul 2019 05:12:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqwjb34nn3qYUZHr1RgwOAoqohOUcRSQrFmFr+N0yeOmPJPKEIJ1+nzFwhL5g/8cv25vWJ+a X-Received: by 2002:a65:518a:: with SMTP id h10mr107167342pgq.117.1564488772230; Tue, 30 Jul 2019 05:12:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564488772; cv=none; d=google.com; s=arc-20160816; b=F0M7aeP6kVyZIF2y9urbTTSk72pinMyFMlnrtfMQC3u9BS3p2DUDIZuK+zJqN+9vh2 UaxvbNnCugJ4ZogJMMyrrs7EYwqhcSu57raDAPTFLJfRU8107SML0Yu5Iixy67tfOKiS yA7F/R4IipBPN3/h9wC1YDFaRXmkUzO36ch+03t/+7pieGiw3u/yYkIBtA4RDt3urV3O JMpe8ncnHehBerTeWk25/bsjW1QCrmw82qkYu80su17ZOiXgyyAkGG1WCz2/AzE+yPIR ay9d9ld7jkJtVx9ZKmrE2NuRWke5GoVx2oIbDhPyCVvk80QhgFdZKChbifuInq5r1817 akTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=ieTNkN8LnkVbzrjTDOQpBp3CjWt8YVpn5WOZbzRgmcg=; b=qi+r1mFHmO6s8V975L2DxPtckYiWsI8E3x6mqvEGK9S78cIMdTGsR6eEyDjBYxXfkH kApczDgJC2b14002nVyvkPGsQ74Ce6ufdEuejjWT5elcbZraLW60ghyOC3GVTe0S90Hx SL8PNrWkmtim3ArPSCAClNyrQJxrEE9Foup4Hu/lLAmXJNbB/HeSiXP588iQz3+CtXrV 4nP3rZZwHhY2h8ONN2GJPq5OmjTpJbzCry2i3hqtWblIqTH80S9cU2ceFzOUs40zlzlh 76hi303JugGcjn16FO7+x6iutkc8KwXNMDDwS3roG6wHN28+zHKyDG8CVt68KpiZ4tWz ESfA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b74si29109888pfb.281.2019.07.30.05.12.37; Tue, 30 Jul 2019 05:12:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729515AbfG3LWE (ORCPT + 99 others); Tue, 30 Jul 2019 07:22:04 -0400 Received: from mga04.intel.com ([192.55.52.120]:38576 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726870AbfG3LWE (ORCPT ); Tue, 30 Jul 2019 07:22:04 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jul 2019 04:22:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,326,1559545200"; d="scan'208";a="176745668" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.145]) by orsmga006.jf.intel.com with ESMTP; 30 Jul 2019 04:21:59 -0700 Received: from andy by smile with local (Exim 4.92) (envelope-from ) id 1hsQCb-0002aG-NN; Tue, 30 Jul 2019 14:21:57 +0300 Date: Tue, 30 Jul 2019 14:21:57 +0300 From: Andy Shevchenko To: Pierre-Louis Bossart Cc: alsa-devel@alsa-project.org, "Rafael J. Wysocki" , tiwai@suse.de, gregkh@linuxfoundation.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, vkoul@kernel.org, broonie@kernel.org, srinivas.kandagatla@linaro.org, jank@cadence.com, slawomir.blauciak@intel.com, Sanyog Kale Subject: Re: [alsa-devel] [RFC PATCH 17/40] soundwire: bus: use runtime_pm_get_sync/pm when enabled Message-ID: <20190730112157.GM23480@smile.fi.intel.com> References: <20190725234032.21152-1-pierre-louis.bossart@linux.intel.com> <20190725234032.21152-18-pierre-louis.bossart@linux.intel.com> <45a912c5-134b-8642-70ef-8c1060389300@linux.intel.com> <20190726190823.GD9224@smile.fi.intel.com> <5a16d9e6-0a9c-a0a8-3b11-d046247f3879@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5a16d9e6-0a9c-a0a8-3b11-d046247f3879@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 29, 2019 at 05:07:39PM -0500, Pierre-Louis Bossart wrote: > On 7/26/19 2:08 PM, Andy Shevchenko wrote: > > On Fri, Jul 26, 2019 at 01:08:57PM -0500, Pierre-Louis Bossart wrote: > > > - if (ret < 0) > > > + if (ret < 0 && ret != -EACCES) > > > > ...and here, the pm_runtime_put_noidle() call is missed. > > yes but in the example you provided, they actually do more work than just > decrement the device usage counter: In their case they would like to do that. You decide what is appropriate call in your case. My point is, that reference counter in case of error handling should be returned back to its value. -- With Best Regards, Andy Shevchenko