From: Dan Carpenter <dan.carpenter@oracle.com>
To: dinghao.liu@zju.edu.cn
Cc: devel@driverdev.osuosl.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
kjlu@umn.edu, linux-kernel@vger.kernel.org,
Jonathan Hunter <jonathanh@nvidia.com>,
Thierry Reding <thierry.reding@gmail.com>,
linux-tegra@vger.kernel.org, Dmitry Osipenko <digetx@gmail.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
linux-pm@vger.kernel.org, linux-media@vger.kernel.org
Subject: Re: Re: [PATCH] [v2] media: staging: tegra-vde: fix runtime pm imbalance on error
Date: Thu, 21 May 2020 15:03:45 +0300 [thread overview]
Message-ID: <20200521120344.GH30374@kadam> (raw)
In-Reply-To: <4b400526.bbc83.172370b23a0.Coremail.dinghao.liu@zju.edu.cn>
On Thu, May 21, 2020 at 07:42:56PM +0800, dinghao.liu@zju.edu.cn wrote:
> We need to make sure if pm_runtime_get_sync() is designed with
> such behavior before modifying it.
>
> I received a response from Rafael when I commited a similar patch:
> https://lkml.org/lkml/2020/5/20/1100
> It seems that this behavior is intentional and needs to be kept.
Yes. This is why I have said twice or three times to not change
pm_runtime_get_sync() but instead to write a replacement.
A large percent of the callers are buggy. The pm_runtime_get_sync() is
a -4 on Rusty's API scale.
http://sweng.the-davies.net/Home/rustys-api-design-manifesto
One could argue that anything above a -4 is really a 2 if you read
the implementation thouroughly enough...
regards,
dan carpenter
next prev parent reply other threads:[~2020-05-21 12:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-21 6:27 [PATCH] [v2] media: staging: tegra-vde: fix runtime pm imbalance on error Dinghao Liu
2020-05-21 6:27 ` Dinghao Liu
[not found] ` <20200521062746.6656-1-dinghao.liu-Y5EWUtBUdg4nDS1+zs4M5A@public.gmane.org>
2020-05-21 11:21 ` Dan Carpenter
2020-05-21 11:21 ` Dan Carpenter
2020-05-21 11:42 ` dinghao.liu-Y5EWUtBUdg4nDS1+zs4M5A
2020-05-21 11:42 ` dinghao.liu
2020-05-21 12:03 ` Dan Carpenter [this message]
2020-05-21 12:21 ` dinghao.liu
2020-05-21 12:21 ` dinghao.liu-Y5EWUtBUdg4nDS1+zs4M5A
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=20200521120344.GH30374@kadam \
--to=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=digetx@gmail.com \
--cc=dinghao.liu@zju.edu.cn \
--cc=gregkh@linuxfoundation.org \
--cc=jonathanh@nvidia.com \
--cc=kjlu@umn.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=rjw@rjwysocki.net \
--cc=thierry.reding@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.