From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jon Hunter Subject: Re: [PATCH] [v4] dmaengine: tegra210-adma: Fix runtime PM imbalance on error Date: Tue, 23 Jun 2020 11:13:12 +0100 Message-ID: <44d7771e-5600-19c2-888a-dd226cbc4b50@nvidia.com> References: <20200621054710.9915-1-dinghao.liu@zju.edu.cn> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20200621054710.9915-1-dinghao.liu-Y5EWUtBUdg4nDS1+zs4M5A@public.gmane.org> Content-Language: en-US Sender: linux-tegra-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Dinghao Liu , kjlu-OJFnDUYgAso@public.gmane.org Cc: Laxman Dewangan , Vinod Koul , Dan Williams , Thierry Reding , dmaengine-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-tegra@vger.kernel.org On 21/06/2020 06:47, Dinghao Liu wrote: > pm_runtime_get_sync() increments the runtime PM usage counter even > when it returns an error code. Thus a pairing decrement is needed on > the error handling path to keep the counter balanced. So you have not mentioned here why you are using _noidle and not _put. Furthermore, in this patch [0] you are not using _noidle to fix the same problem in another driver. We should fix this in a consistent manner across all drivers, otherwise it leads to more confusion. Finally, Rafael mentions we should just use _put [0] and so I think we should follow his recommendation. Jon [0] https://lkml.org/lkml/2020/5/21/601 -- nvpublic