mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Tobias Jordan <Tobias.Jordan@elektrobit.com>
Cc: Nicholas Mc Guire <der.herr@hofr.at>,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [SIL2review] [PATCH] i2c: img-scb: fix PM device usage count
Date: Mon, 16 Apr 2018 18:18:45 +0200	[thread overview]
Message-ID: <20180416161845.hxizpjituo6mpvbm@ninjato> (raw)
In-Reply-To: <20180225172730.2b443978@denkmatte>

[-- Attachment #1: Type: text/plain, Size: 990 bytes --]


> 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.
> 
> 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.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2018-04-16 16:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-24 22:43 Tobias Jordan
2018-02-25 13:20 ` [SIL2review] " Nicholas Mc Guire
2018-02-25 16:27   ` Tobias Jordan
2018-04-16 16:18     ` Wolfram Sang [this message]
2018-04-17  8:03       ` Tobias.Jordan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180416161845.hxizpjituo6mpvbm@ninjato \
    --to=wsa@the-dreams.de \
    --cc=Tobias.Jordan@elektrobit.com \
    --cc=der.herr@hofr.at \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®