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 X-Spam-Level: X-Spam-Status: No, score=-2.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0B775C433DF for ; Wed, 20 May 2020 18:09:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C93E520708 for ; Wed, 20 May 2020 18:09:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="ThItXi9C" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726805AbgETSJP (ORCPT ); Wed, 20 May 2020 14:09:15 -0400 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:8118 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726548AbgETSJP (ORCPT ); Wed, 20 May 2020 14:09:15 -0400 Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Wed, 20 May 2020 11:07:55 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Wed, 20 May 2020 11:09:14 -0700 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Wed, 20 May 2020 11:09:14 -0700 Received: from [10.25.75.122] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 20 May 2020 18:09:11 +0000 Subject: Re: [PATCH] PCI: tegra: fix runtime pm imbalance on error To: Bjorn Helgaas , Thierry Reding CC: Dinghao Liu , , Lorenzo Pieralisi , Rob Herring , Bjorn Helgaas , Jonathan Hunter , Andrew Murray , , , References: <20200520163739.GA1100601@bjorn-Precision-5520> X-Nvconfidentiality: public From: Vidya Sagar Message-ID: Date: Wed, 20 May 2020 23:39:08 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200520163739.GA1100601@bjorn-Precision-5520> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1589998075; bh=EY5HqxwEqKqg5b+Jx1MhOv8T2s5ZKTI22o9MVaqGtdU=; h=X-PGP-Universal:Subject:To:CC:References:X-Nvconfidentiality:From: Message-ID:Date:User-Agent:MIME-Version:In-Reply-To: X-Originating-IP:X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=ThItXi9C4A38MvEvZWl6y1zxcJmFKnsGvjy+afoD88QwZmLHlTiSFnRBX8RSTOymo +cNmtEMeZyXZeVrsPAofXCHibv+vmtwq+TXYsF/TCwwlmHgZxXLAZQqOQzQ6YjrI96 RTf+d7h2UmTepNBcv4kQLelDmAB/qDqrDaUPQMAFRl2f4sR7K8ndeTd8zx0HtabHw6 EvV4rDAc8PmyJRJnHB5txgZKqirO2F0EVdtqNSLpYA07+tim+a+4JboEyiCIB873Q9 IVjBEV25coJjCYfNQxj8VlL/I1s/0KnXazcI2uROVCdPo8Hu4arS8NPr9qCZCYd798 JUfHT02OzScRA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks for pushing a patch to fix it. I've been under the wrong assumption that a failing pm_runtime_get_sync() wouldn't increment the usage counter. With Thierry's and Bjorn's comments addressed Acked-by: Vidya Sagar On 20-May-20 10:07 PM, Bjorn Helgaas wrote: > External email: Use caution opening links or attachments > > > On Wed, May 20, 2020 at 11:59:08AM +0200, Thierry Reding wrote: >> On Wed, May 20, 2020 at 04:52:23PM +0800, Dinghao Liu wrote: >>> pm_runtime_get_sync() increments the runtime PM usage counter even >>> it returns an error code. Thus a pairing decrement is needed on >> >> s/even it/even when it/ >> >> Might also be a good idea to use a different subject prefix because I >> was almost not going to look at the other patch, taking this to be a >> replacement for it. > > Amen. This would be a good change to start using "PCI: tegra194" or > something for pcie-tegra194.c. Or will there be tegra195, tegra 196, > etc added to this driver? > > Also, please capitalize the first word and "PM" in the subjects: > > PCI: tegra194: Fix runtime PM imbalance on error > > Bjorn >