linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Re: [PATCH] [v2] media: staging: tegra-vde: fix runtime pm imbalance on error
       [not found]   ` <4b400526.bbc83.172370b23a0.Coremail.dinghao.liu@zju.edu.cn>
@ 2020-05-21 12:03     ` Dan Carpenter
  2020-05-21 12:21       ` dinghao.liu
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2020-05-21 12:03 UTC (permalink / raw)
  To: dinghao.liu
  Cc: devel, Greg Kroah-Hartman, kjlu, linux-kernel, Jonathan Hunter,
	Thierry Reding, linux-tegra, Dmitry Osipenko,
	Mauro Carvalho Chehab, Rafael J. Wysocki, linux-pm, linux-media

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Re: Re: [PATCH] [v2] media: staging: tegra-vde: fix runtime pm imbalance on error
  2020-05-21 12:03     ` Re: [PATCH] [v2] media: staging: tegra-vde: fix runtime pm imbalance on error Dan Carpenter
@ 2020-05-21 12:21       ` dinghao.liu
  0 siblings, 0 replies; 2+ messages in thread
From: dinghao.liu @ 2020-05-21 12:21 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: devel, Greg Kroah-Hartman, kjlu, linux-kernel, Jonathan Hunter,
	Thierry Reding, linux-tegra, Dmitry Osipenko,
	Mauro Carvalho Chehab, Rafael J. Wysocki, linux-pm, linux-media

Sorry, I misunderstood your idea before. A new function is 
the best solution for this problem.

Regards,
Dinghao

&quot;Dan Carpenter&quot; &lt;dan.carpenter@oracle.com&gt;写道:
> 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
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-21 12:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200521062746.6656-1-dinghao.liu@zju.edu.cn>
     [not found] ` <20200521112131.GG30374@kadam>
     [not found]   ` <4b400526.bbc83.172370b23a0.Coremail.dinghao.liu@zju.edu.cn>
2020-05-21 12:03     ` Re: [PATCH] [v2] media: staging: tegra-vde: fix runtime pm imbalance on error Dan Carpenter
2020-05-21 12:21       ` dinghao.liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).