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, URIBL_BLOCKED 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 05FC6C433DF for ; Mon, 15 Jun 2020 07:06:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D5F8E20707 for ; Mon, 15 Jun 2020 07:06:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592204781; bh=fUQNCAAb6DjGomvNl4eNFS4GZ/iZOIWKfiriaaglQf4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=2vaEbOWpi2iA+Q1bvnmKDOAeMlNMFQTuZy4OBmIt19N/YmjUP/DD9+lx5/STdEiAP yVVrmqwiutl3Fka05gc+dfC/1EJSGiLXJzcHDN4n5jyqsZMyTF4xO+tquyENYgo2JL 6xp8sdodt+JjfliIdrzwGpmi0Jm+jBlnkvrwkPUw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728224AbgFOHGV (ORCPT ); Mon, 15 Jun 2020 03:06:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:51052 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728180AbgFOHGV (ORCPT ); Mon, 15 Jun 2020 03:06:21 -0400 Received: from localhost (p54b333b6.dip0.t-ipconnect.de [84.179.51.182]) (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 0060C206D7; Mon, 15 Jun 2020 07:06:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592204780; bh=fUQNCAAb6DjGomvNl4eNFS4GZ/iZOIWKfiriaaglQf4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NGt9H7nPgvZ32vSDoQGNlVzCidRta/sIu4S/AmYHx+omviqGOlI7rqBOrBomhSabw odKfQDbf/MwUe5m2rlbgggpyE7/rDmDwe2IGiw+N6nfMmlxjKDzT8UnkOvCjmA9xi4 3HP1Lh/ZIcwsuvpACy6Cczd7m27IFY44y/ETSLR8= Date: Mon, 15 Jun 2020 09:06:13 +0200 From: Wolfram Sang To: Aisheng Dong Cc: Dinghao Liu , "linux-pm@vger.kernel.org" , Ulf Hansson , "Rafael J . Wysocki" , "kjlu@umn.edu" , Markus Elfring , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , dl-linux-imx , Andy 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: <20200615070613.GA1497@kunai> References: <20200601061640.27632-1-dinghao.liu@zju.edu.cn> <20200614091203.GC2878@kunai> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="zYM0uCDKw75PZbzx" Content-Disposition: inline In-Reply-To: Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org --zYM0uCDKw75PZbzx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 15, 2020 at 06:33:40AM +0000, Aisheng Dong wrote: > > From: Wolfram Sang > > Sent: Sunday, June 14, 2020 5:12 PM > >=20 > > 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. > >=20 > > Can you point me to a discussion where it was decided that this is a pr= oper fix? > > I'd think we rather should fix pm_runtime_get_sync() but maybe there are > > technical reasons against it. >=20 > I had the same feeling. > Copy pm guys to comments. I started a seperate thread: https://lkml.org/lkml/2020/6/14/76 Still, on-going discussion if the proper fix is to remove the error check. --zYM0uCDKw75PZbzx Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAl7nHeEACgkQFA3kzBSg KbbAbA/9FTQMd1gpGi6tiS2NPZ+sd1kxs7t0vnUK9MLKKpgEC0Do/6JBFttvRoN6 So/PITa5zgqjUYeNzRtrbMjXmQVSbCanAhMOBGX2/8w6aMUJnGPbm6sDT26oQkSP T0jzir2gR3Mw9bh07kXbszx4vJGOFJDOlH31BjxvN/9lZZRCILiEpfoTxGNAOXyV 73BiU6Ez6AMB01363BL8vMC/l4W82YeitG6xrxvz+Fzw5/OQ7qFlOrDfEFbP10tU wlbk5gUjyWEzhzh0qqGPuRVDeuBxGDgrDQDpFGScJBfZ1oH7lqSyg7fjdOIG3fNH RPSgvvoPkJkY1WL9wbt3lOpt+F/rBJYy7iDMwY9CgYnaF4bP+peLtUzazK83Wzhb F4N5A7AP550rmEYEZV1sJqNHacQFqcXXdremSzKjMEp1XVp4CqncjIGrC9qy+BAQ VZi3L8ExCY36TWYPi5lBqJ76vv3nB2q+GhYkU9CaBok/rQ12LmgGS4Z27X9YjdS4 3CwpsXCrl+/4tsbxFxbWqRvvCMYQwtbIJ3EWGG6ga277+OtYDSSnn3QLFt4GUQ3F xnWTt0+xvPRHfI/b2ffkQBYINd9kqEy5c7H6OSN67NtdREktPmtbS8OHhEoTx1gy 2Ly8984MP9JzxermLmvQ0mvvtJFrr1TA80UCmQev6XsMoQ/xCUg= =g8OW -----END PGP SIGNATURE----- --zYM0uCDKw75PZbzx--