Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1002729ybt; Sun, 14 Jun 2020 07:09:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx54oUSHm0iebQecjph7cVhiWwWr57Doep/nLW2RuLPL0Z0/MGqF6abzwR0f47EGgIO0UY9 X-Received: by 2002:a17:906:6b8e:: with SMTP id l14mr22258341ejr.32.1592143778136; Sun, 14 Jun 2020 07:09:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592143778; cv=none; d=google.com; s=arc-20160816; b=G8LZwjR5DIg6S932o2wnXVN1WMHQi9TtKPakWofV6x2XUZa+fycbHGzaJ0g98jyD0S ykAYYgf60DZu0/r2/DAABSgRrMwhh9awZag4egz3y4Ijkb5ffZ4gs1W3SWc6YCJy7Qtr WdIDcCONYUeRrGbSb8w2rCstXjUXQNSflAsIxeWGjVMr/1+kfmu7m9Fm08HaIofOiFLR SUNFutKP2QSlNS7JJ9gfJL4/aU4j/5+ZsuJQ5JmFcPD0tGGajSILXXvYYsnnCFper+8R NhTT7YwiD0Kg3VlqQy4khNHjt2JXuWZIv+8WeXUj5DN9YNHB22xIC1zkdMM8SzhPt+aA GSgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=RrowR95AdqAmtGEwm13x7wolP220oORKm7c9kbiNOVU=; b=w5FrPsii1vBakHOnNWC2LkzA/spKl2IqX6Ol0xeIblIqaJuPri+RL7DnMYxAXmJWQy 0H+7QNsI5O9jb9C01riSBEHOvfMi9DRI6xEoHmRvFJSKPnWocuLJA0LbA3l7dtkiBofK ds5j0lcW/EOfgCp7AjvitSb0p4ooS82WgRjzKe1AMYEPDyjwxdbfggnhljQeyxgP2oEX oSyWC6vg5b8ISV3MRfyBWbyCp3Vh5MRZ2czZgB/+RWq6Oq4rddZF2aTpt8ZvsEk/P/Rg P2tJzPTQqHOwD5MWl0d4mOV1gCi3EDpjy3yoNCWM8dsjY1F6oA69/kQEqa0gNTwK6B9d /g8g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f1si7185871ejh.665.2020.06.14.07.09.15; Sun, 14 Jun 2020 07:09:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726921AbgFNOHX (ORCPT + 99 others); Sun, 14 Jun 2020 10:07:23 -0400 Received: from sauhun.de ([88.99.104.3]:55436 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725815AbgFNOHW (ORCPT ); Sun, 14 Jun 2020 10:07:22 -0400 Received: from localhost (p5486c990.dip0.t-ipconnect.de [84.134.201.144]) by pokefinder.org (Postfix) with ESMTPSA id 5F5BC2C05DF; Sun, 14 Jun 2020 16:07:20 +0200 (CEST) Date: Sun, 14 Jun 2020 16:07:17 +0200 From: Wolfram Sang To: "Rafael J. Wysocki" Cc: Geert Uytterhoeven , Andy Shevchenko , Wolfram Sang , Linux PM , Linux-Renesas , Linux Kernel Mailing List , linux-i2c Subject: Re: RFC: a failing pm_runtime_get increases the refcnt? Message-ID: <20200614140717.heceqlwq75w5if5s@katana> References: <20200614090751.GA2878@kunai> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ttzcavrxsgfcj6ge" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --ttzcavrxsgfcj6ge Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Geert and Rafael, > > I've always[*] considered a pm_runtime_get_sync() failure to be fatal > > (or: cannot happen), and that there's nothing that can be done to > > recover. Hence I never checked the function's return value. > > Was that wrong? >=20 > No, it wasn't. It is the right thing to do in the majority of cases. OK, if *not checking* the retval is the major use case, then I understand that ref counting takes place. However, that probably means that for most patches I am getting, the better fix would be to remove the error checking? (I assume most people put the error check in there to be on the "safe side" without having a real argument to really do it.) And thanks for putting more hints to kernel doc! I think this will help the case a lot. Kind regards, Wolfram --ttzcavrxsgfcj6ge Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAl7mLxEACgkQFA3kzBSg Kbapfg/+NedKrAreny9QrDywewr7HSYOdccWDlF8ypEtOn6a8AgCHL0tQwkqSZPh 6hsCX3Eet+8pdogl+p/B5QRXXgpSkRd+eV6NDjiIb6MWCRfegz/Dgzo39qJXanfc oSELotI/jA1/qySS08y9azi4QEgHS9scMcUpnCaaHhqFYwbYQMpXojW4WymaR7Z2 FTi9HRP9+E4KIggKU10UMnECpDqoVep0XLiuKfkLJjAF3AjtxAIcDMCN43+oZHtU SotkwGThTiSYCOnu9gvBAGm95qtATj2orICxcxdnW4gWjFpV90tTmTRaB9+vrIOS W/WKlzH5BCljiBuANdikjIz57X2QFz9YTGaPjmCfGMwBfTtWUb7fJvaxoXnYFo7S w0nEGMlH0biTFPKgtkmSQQiW7ZVdXsDsYHgir/EqEGBNNIB5tal7op2ROT9+eLCa IsaRycoJBaihulkGrxLpowOlJ6lREEdlhUcg+Pw09+6MrA/rDDBTN/qGnrbCnMKX yxNuXqZSWA9xdPBE/b+qBFtU4t7Gs05NLaqmejD7/u1Sa/iLU71OYIdbkPEKRIS+ U+bUWJ3dzW4QpVo9m9Sp66IC2yTIVRVbtXS745+bWienhoch4YuPvO8pcOzNOmVo DnGbIrEMHFkQjmmd+qmKnK/gkdeLkYsIuwAqQmWP5CU/QoujQEM= =Bx3F -----END PGP SIGNATURE----- --ttzcavrxsgfcj6ge--