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=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 C8543C433E1 for ; Sun, 14 Jun 2020 09:12:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A0F2620747 for ; Sun, 14 Jun 2020 09:12:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592125927; bh=zcRl5dzioE4oiJSEfWn1q1ANQ0yluGl7UnG8UepPK3M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=pQTo63qFuUtOsLBnbEz7mYckF5X9D0/8wDBQUXxf0mnBuB5HJjj+fQwVovlArvnt+ nILXFuon7i/sN8vJKudQQpj+z5RXkhQ2Tmsp9k5+/atDy15lyaSSDPlcOJb46XBqXs ac3cFdlCKd4R/sycWT73xhTZHAZs2a5T+/jekZC8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726868AbgFNJMG (ORCPT ); Sun, 14 Jun 2020 05:12:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:42454 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726014AbgFNJMG (ORCPT ); Sun, 14 Jun 2020 05:12:06 -0400 Received: from localhost (p5486c990.dip0.t-ipconnect.de [84.134.201.144]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 20578206B7; Sun, 14 Jun 2020 09:12:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592125925; bh=zcRl5dzioE4oiJSEfWn1q1ANQ0yluGl7UnG8UepPK3M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dnH6BCMCsUSd/1yD1/tbpoUBB2a9th87D7C1PQCnXFF/MU/DRwhAiUyYa3WJtYM+P +Wt/LJUp2S3R9qIVUF7HzdT6xl4Q+8SpIoPJqJ7t4VzX5hEEO5BLOr+3PNknK2h5KA bej8V5iTQqiwMl1LzXLhh8ezDj58ZNu5rpkQ8mHY= Date: Sun, 14 Jun 2020 11:12:03 +0200 From: Wolfram Sang To: Dinghao Liu Cc: kjlu@umn.edu, Markus Elfring , Dong Aisheng , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Fugang Duan , linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] [v3] i2c: imx-lpi2c: Fix runtime PM imbalance on error Message-ID: <20200614091203.GC2878@kunai> References: <20200601061640.27632-1-dinghao.liu@zju.edu.cn> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="DSayHWYpDlRfCAAQ" Content-Disposition: inline In-Reply-To: <20200601061640.27632-1-dinghao.liu@zju.edu.cn> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --DSayHWYpDlRfCAAQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Jun 01, 2020 at 02:16:40PM +0800, Dinghao Liu wrote: > pm_runtime_get_sync() increments the runtime PM usage counter even > the call returns an error code. Thus a corresponding decrement is > needed on the error handling path to keep the counter balanced. Can you point me to a discussion where it was decided that this is a proper fix? I'd think we rather should fix pm_runtime_get_sync() but maybe there are technical reasons against it. --DSayHWYpDlRfCAAQ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAl7l6eMACgkQFA3kzBSg KbbomhAAsSDK9VozV4hQIjYDiVrG3P1dSoA0Nv0svNzvGBF3XDOvmYGFLM0oPPRA y/AhGqxktdvOK1iCa3xvdgN9WW8VvVf/wPE3anOmQ6YF8t+K8YIWxpEq7S5UE7kX qdKTwK6n5U6SCMPYRklp63lfCwxHxYOPz5LiF8Fahlm02xm5JTAR/DIZu97mFnMo vjKgDY6c1VfSKDSAhOJJEMwcdbpeSotsAUBUPSj0qyFymLng3Mip0iiI30ubfQxh DKimD5eJM7UXe3iuYw5mC6gXQX/ViWhpsAbP1otylqcMXEpebcPMdWGa7rr3R5yX TWNdBsFH0P3KUvr7ULY/XPzvOMfbijZoGCkqxa8ExihJZiK2PiLhDaxETR7LxrXy 28eu3mH9KK45rraUO3I4fVosyqASJ1NbSCC5qg3ldu/pXnoS8jGZcpwgZwv0Udme nwrjevSPmJ487gPkYaFlkJRm8kaJM0DOlWFgWdYnrDClG8hw/u1eJUnsEwe24A90 MmmiaUEwR0gMmAUIodwiTsqK9Y+8WYh6BuOEyw/8Cajq2iEYnYgDGm5I91y8hBvh 9t5I8CTQNM3EGGGjMm85fuZAddTk/O/AmA3kCMPbAoxX3bhjm71imaF8Q02xaxml lVvEfC46bUpQKIXNK0ULE+i3aoJtk5eM8y6Lw6CzOrAd8tcViY4= =PEkp -----END PGP SIGNATURE----- --DSayHWYpDlRfCAAQ-- 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=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 3FFC9C433DF for ; Sun, 14 Jun 2020 09:12:14 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 108E720747 for ; Sun, 14 Jun 2020 09:12:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="BXncHgEt"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="dnH6BCMC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 108E720747 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=xZyhT2VmZ6voOUC8iqeNuM4tz8BxcKMiTXQherNakEw=; b=BXncHgEtigH0zT0vO4F23ctrD WR3lw/Sqkq2pk6x1dlTjPFAHLvhxTeiNF7W1MURcdTycCHQuzCswK7bMIv0LxBONvAYxPtw1Angdi lxtXzqZArAVUwjPll4H5PrXOKk/P6BYvkhfw17F8RcfN5UgmUXhyOtMNTvHM72qHea26jd9dtLxHL bMYLSVjtw7mf6BV5LTowIlRHs4EKhuJNiTN+YbFYN+neKe1C0Qz947UsEKby8vRPPns4ripCPKZfW oLgeloqmaM200HdD/jsAXAXCft9Jv4koJrMJAzHuK4nrLk2zohZ416PUedbcFBEeudnL+Sy+RNNL8 zZtBrafhg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jkOgS-0002Dq-CN; Sun, 14 Jun 2020 09:12:08 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jkOgP-0002DG-U9 for linux-arm-kernel@lists.infradead.org; Sun, 14 Jun 2020 09:12:07 +0000 Received: from localhost (p5486c990.dip0.t-ipconnect.de [84.134.201.144]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 20578206B7; Sun, 14 Jun 2020 09:12:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592125925; bh=zcRl5dzioE4oiJSEfWn1q1ANQ0yluGl7UnG8UepPK3M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dnH6BCMCsUSd/1yD1/tbpoUBB2a9th87D7C1PQCnXFF/MU/DRwhAiUyYa3WJtYM+P +Wt/LJUp2S3R9qIVUF7HzdT6xl4Q+8SpIoPJqJ7t4VzX5hEEO5BLOr+3PNknK2h5KA bej8V5iTQqiwMl1LzXLhh8ezDj58ZNu5rpkQ8mHY= Date: Sun, 14 Jun 2020 11:12:03 +0200 From: Wolfram Sang To: Dinghao Liu Subject: Re: [PATCH] [v3] i2c: imx-lpi2c: Fix runtime PM imbalance on error Message-ID: <20200614091203.GC2878@kunai> References: <20200601061640.27632-1-dinghao.liu@zju.edu.cn> MIME-Version: 1.0 In-Reply-To: <20200601061640.27632-1-dinghao.liu@zju.edu.cn> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200614_021205_992138_BD8D5ADC X-CRM114-Status: GOOD ( 10.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dong Aisheng , Fugang Duan , Fabio Estevam , Sascha Hauer , kjlu@umn.edu, linux-kernel@vger.kernel.org, Markus Elfring , NXP Linux Team , Pengutronix Kernel Team , Shawn Guo , linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org Content-Type: multipart/mixed; boundary="===============0226596775885475397==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============0226596775885475397== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="DSayHWYpDlRfCAAQ" Content-Disposition: inline --DSayHWYpDlRfCAAQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Jun 01, 2020 at 02:16:40PM +0800, Dinghao Liu wrote: > pm_runtime_get_sync() increments the runtime PM usage counter even > the call returns an error code. Thus a corresponding decrement is > needed on the error handling path to keep the counter balanced. Can you point me to a discussion where it was decided that this is a proper fix? I'd think we rather should fix pm_runtime_get_sync() but maybe there are technical reasons against it. --DSayHWYpDlRfCAAQ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAl7l6eMACgkQFA3kzBSg KbbomhAAsSDK9VozV4hQIjYDiVrG3P1dSoA0Nv0svNzvGBF3XDOvmYGFLM0oPPRA y/AhGqxktdvOK1iCa3xvdgN9WW8VvVf/wPE3anOmQ6YF8t+K8YIWxpEq7S5UE7kX qdKTwK6n5U6SCMPYRklp63lfCwxHxYOPz5LiF8Fahlm02xm5JTAR/DIZu97mFnMo vjKgDY6c1VfSKDSAhOJJEMwcdbpeSotsAUBUPSj0qyFymLng3Mip0iiI30ubfQxh DKimD5eJM7UXe3iuYw5mC6gXQX/ViWhpsAbP1otylqcMXEpebcPMdWGa7rr3R5yX TWNdBsFH0P3KUvr7ULY/XPzvOMfbijZoGCkqxa8ExihJZiK2PiLhDaxETR7LxrXy 28eu3mH9KK45rraUO3I4fVosyqASJ1NbSCC5qg3ldu/pXnoS8jGZcpwgZwv0Udme nwrjevSPmJ487gPkYaFlkJRm8kaJM0DOlWFgWdYnrDClG8hw/u1eJUnsEwe24A90 MmmiaUEwR0gMmAUIodwiTsqK9Y+8WYh6BuOEyw/8Cajq2iEYnYgDGm5I91y8hBvh 9t5I8CTQNM3EGGGjMm85fuZAddTk/O/AmA3kCMPbAoxX3bhjm71imaF8Q02xaxml lVvEfC46bUpQKIXNK0ULE+i3aoJtk5eM8y6Lw6CzOrAd8tcViY4= =PEkp -----END PGP SIGNATURE----- --DSayHWYpDlRfCAAQ-- --===============0226596775885475397== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============0226596775885475397==--