Received: by 10.192.165.156 with SMTP id m28csp828550imm; Mon, 16 Apr 2018 09:20:06 -0700 (PDT) X-Google-Smtp-Source: AIpwx489jpkr/k/e1WAcvCMBQeD4QzsWXMbWuaiTOMx69z5BoKi5OY7FXnG4NBr/Uo/PpfrsNcd9 X-Received: by 10.98.178.76 with SMTP id x73mr22303766pfe.193.1523895606558; Mon, 16 Apr 2018 09:20:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523895606; cv=none; d=google.com; s=arc-20160816; b=QJCn8Y1viFL69W29qAhC+PPNWkikt6sz4/OfzFYnN9aFpKPTz4U7vqf7NSqxpbpxHB uRfQ8YcobHkm5cf4e+czwArPFierV2rDPlyKNuREjrUWX9ViCp5YBmBAC6ZV/ihdMeDm C9LYOEVAy4m8kxLUyvNNjMHitFj5P5TNhcjQZBgaCPnExIhlJJfkN8tQjrsK7OSqQpPh Tyut1tu+ahEC/vsaj3fpeQlBAGMjL03V1PcM6MCeTyp5PO37elCWd14soOpdhiH4XuOj ZjI9d4IxlUZABfRcu8ydzwhmXpy67joKyEFCZpDiv3VxeTejKIo/9hJOXbIOKv+MIsQJ 8GQg== 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:arc-authentication-results; bh=F7CpXCL3OkSw0xbRkwVQJoExtg9T4G+Auqch4oMtFlo=; b=PNxH9kxLcXd+r1a58cQDR9PBOcH5JYGHf3UWxB/w3Q7rcCJtaUawtLE6O+CbwqP2Hf mlMF9uSkSP5BoBH4GBygVfgPBh0tf7ZNXg+LfDEEhn1H7AVfFAKNqqd5rojGVNoV/V/p 9s8tR38NJY1GfQ5yAYTG8oIGvcpyG9hmx8lii6HXc08jrtQ/TpwOd7lPPjpNgZSeRr/7 k5yXhqXLolF7dDT3YTu/CR5CR3+lIfDyzfCQm2Nuq4946PqDqF7Fc+Q6mbqF4K7tIEsn Jz6u8QFaQAlBYci+ylwyGyfPKOebL9wPItq7BaILrn6CdFNsrhbyY9W6ycYAVwveLxzS 9oZg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d79si3812828pfk.71.2018.04.16.09.19.52; Mon, 16 Apr 2018 09:20:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752332AbeDPQSt (ORCPT + 99 others); Mon, 16 Apr 2018 12:18:49 -0400 Received: from sauhun.de ([88.99.104.3]:49266 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750989AbeDPQSs (ORCPT ); Mon, 16 Apr 2018 12:18:48 -0400 Received: from localhost (unknown [46.183.103.8]) by pokefinder.org (Postfix) with ESMTPSA id 31BFC30212E; Mon, 16 Apr 2018 18:18:46 +0200 (CEST) Date: Mon, 16 Apr 2018 18:18:45 +0200 From: Wolfram Sang To: Tobias Jordan Cc: Nicholas Mc Guire , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [SIL2review] [PATCH] i2c: img-scb: fix PM device usage count Message-ID: <20180416161845.hxizpjituo6mpvbm@ninjato> References: <20180224224303.3mpwhal2axcr6aos@agrajag.zerfleddert.de> <20180225132014.GA8844@osadl.at> <20180225172730.2b443978@denkmatte> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="oa5a7cavjqb53muk" Content-Disposition: inline In-Reply-To: <20180225172730.2b443978@denkmatte> 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 --oa5a7cavjqb53muk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > As far as I've understood the idea is that most "error" return values > actually are a result of disabled runtime PM, and that should be > transparent to the caller. Looking at the code, that's what the vast > majority of callers do - they just ignore the return value of > pm_runtime_get_sync, and somewhere later have an > unconditional pm_runtime_put_... call. >=20 > So the only issue are callers that don't ignore the pm_runtime_get_sync > return value, probably because they're having some kind of special > requirements for error handling. For those, they need to ensure that a > proper _put_ is done somewhere in the error path. Is it easily recognizable if the drivers check the error code because there is a reason or if they do it "out of habit"? For the latter, I agree that the better fix would be to remove the error check altogether. Otherwise the code becomes more complex for no reason and even less people are then brave enough to simplify it later. --oa5a7cavjqb53muk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAlrUzOUACgkQFA3kzBSg KbZZQg//ViwCEDxliCtxLvHWNN1uGRydGEKWymuZTgzvED+kjbWXFWJA1swsaRHZ zPTPHYg3FnPQLCVfhj+PMoNbHX8PZYc6zo+vtS6mfIEtq4OyLkQmW78wtyeW1uOL n5SUfqWh6havgHoa6+E16M2dzrQXTz4Th4IzBid2IDbcp61rvq39SEhZmybxiA7A D6SqG7g+Jo5IwD9S4sa3QXDfeHPvja6Ld3Z2nc0KUlyRPW7m6ds+OQpYklWbhnIC HilN+Sk6AbPSbVuBfXxLV4xaKBVTLmm7kniUHJAEScfOZsPbX8LXYvv/yaFalbJP VnRB/Uapfc3DqSZ2dBOXSsgFBGxPmTsrgN3oerVVx/yh4VCeVR2TKt1XxRmlRQ0m ldGcxE+8FaW9UQRP4PkHD3tekiUiJGQRbhEPULpkLtjswck5TetXE3lvIB6RTvxc btUtQTCv3/NmDVzORYFGKpWSP9MM3MYuN/mkkW4e3g3zr3nB4zMi/41ZXxeJFxPr nmN3/JTKM7GaAnEHnESLb/1/pViOTMqjF38RXXFy9QqiufpE3hri2EwC+zruXDLv kDsCvkhRMa0f4ABRbmh2jAg40p1zIacK1NvUKTgzhVYpU1Gbyfpp5Ym1Xl1hrLyq uQsF0+iBQ+Yl7y6rpycKzba45CIwHKd5LywzxvxU+2MHa3DDpCg= =SvGp -----END PGP SIGNATURE----- --oa5a7cavjqb53muk--