Re: Re: [PATCH] media: staging: tegra-vde: fix runtime pm imbalance on error

2020-05-28 Thread Rafael J. Wysocki
On Thu, May 28, 2020 at 2:08 PM Dan Carpenter wrote: > > On Fri, May 22, 2020 at 04:43:12PM +0200, Thierry Reding wrote: > > On Fri, May 22, 2020 at 04:23:18PM +0300, Dan Carpenter wrote: > > > On Fri, May 22, 2020 at 03:10:31PM +0200, Thierry Reding wrote: > > > > On Thu, May 21, 2020 at

Re: Re: [PATCH] media: staging: tegra-vde: fix runtime pm imbalance on error

2020-05-28 Thread Dan Carpenter
On Fri, May 22, 2020 at 04:43:12PM +0200, Thierry Reding wrote: > On Fri, May 22, 2020 at 04:23:18PM +0300, Dan Carpenter wrote: > > On Fri, May 22, 2020 at 03:10:31PM +0200, Thierry Reding wrote: > > > On Thu, May 21, 2020 at 08:39:02PM +0300, Dan Carpenter wrote: > > > > On Thu, May 21, 2020 at

Re: Re: [PATCH] media: staging: tegra-vde: fix runtime pm imbalance on error

2020-05-22 Thread Thierry Reding
On Fri, May 22, 2020 at 04:23:18PM +0300, Dan Carpenter wrote: > On Fri, May 22, 2020 at 03:10:31PM +0200, Thierry Reding wrote: > > On Thu, May 21, 2020 at 08:39:02PM +0300, Dan Carpenter wrote: > > > On Thu, May 21, 2020 at 05:22:05PM +0200, Rafael J. Wysocki wrote: > > > > On Thu, May 21, 2020

Re: Re: [PATCH] media: staging: tegra-vde: fix runtime pm imbalance on error

2020-05-22 Thread Dan Carpenter
On Fri, May 22, 2020 at 03:10:31PM +0200, Thierry Reding wrote: > On Thu, May 21, 2020 at 08:39:02PM +0300, Dan Carpenter wrote: > > On Thu, May 21, 2020 at 05:22:05PM +0200, Rafael J. Wysocki wrote: > > > On Thu, May 21, 2020 at 11:15 AM Dan Carpenter > > > wrote: > > > > > > > > On Thu, May

Re: Re: [PATCH] media: staging: tegra-vde: fix runtime pm imbalance on error

2020-05-22 Thread Thierry Reding
On Thu, May 21, 2020 at 08:39:02PM +0300, Dan Carpenter wrote: > On Thu, May 21, 2020 at 05:22:05PM +0200, Rafael J. Wysocki wrote: > > On Thu, May 21, 2020 at 11:15 AM Dan Carpenter > > wrote: > > > > > > On Thu, May 21, 2020 at 11:42:55AM +0800, dinghao@zju.edu.cn wrote: > > > > Hi, Dan, >

Re: Re: [PATCH] media: staging: tegra-vde: fix runtime pm imbalance on error

2020-05-21 Thread Dan Carpenter
On Thu, May 21, 2020 at 05:22:05PM +0200, Rafael J. Wysocki wrote: > On Thu, May 21, 2020 at 11:15 AM Dan Carpenter > wrote: > > > > On Thu, May 21, 2020 at 11:42:55AM +0800, dinghao@zju.edu.cn wrote: > > > Hi, Dan, > > > > > > I agree the best solution is to fix __pm_runtime_resume(). But

Re: [PATCH] media: staging: tegra-vde: fix runtime pm imbalance on error

2020-05-21 Thread Rafael J. Wysocki
On Wednesday, May 20, 2020 5:02:30 PM CEST Dan Carpenter wrote: > On Wed, May 20, 2020 at 01:15:44PM +0300, Dmitry Osipenko wrote: > > 20.05.2020 12:51, Dinghao Liu пишет: > > > pm_runtime_get_sync() increments the runtime PM usage counter even > > > it returns an error code. Thus a pairing

Re: Re: [PATCH] media: staging: tegra-vde: fix runtime pm imbalance on error

2020-05-21 Thread Rafael J. Wysocki
On Thu, May 21, 2020 at 11:15 AM Dan Carpenter wrote: > > On Thu, May 21, 2020 at 11:42:55AM +0800, dinghao@zju.edu.cn wrote: > > Hi, Dan, > > > > I agree the best solution is to fix __pm_runtime_resume(). But there are > > also > > many cases that assume pm_runtime_get_sync() will change PM

Re: Re: [PATCH] media: staging: tegra-vde: fix runtime pm imbalance on error

2020-05-21 Thread Dan Carpenter
On Thu, May 21, 2020 at 11:42:55AM +0800, dinghao@zju.edu.cn wrote: > Hi, Dan, > > I agree the best solution is to fix __pm_runtime_resume(). But there are also > many cases that assume pm_runtime_get_sync() will change PM usage > counter on error. According to my static analysis results,

Re: Re: [PATCH] media: staging: tegra-vde: fix runtime pm imbalance on error

2020-05-20 Thread dinghao . liu
Hi, Dan, I agree the best solution is to fix __pm_runtime_resume(). But there are also many cases that assume pm_runtime_get_sync() will change PM usage counter on error. According to my static analysis results, the number of these "right" cases are larger. Adjusting __pm_runtime_resume()

Re: [PATCH] media: staging: tegra-vde: fix runtime pm imbalance on error

2020-05-20 Thread kbuild test robot
Hi Dinghao, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on staging/staging-testing] [also build test WARNING on linuxtv-media/master v5.7-rc6 next-20200519] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW,

Re: [PATCH] media: staging: tegra-vde: fix runtime pm imbalance on error

2020-05-20 Thread Dan Carpenter
On Wed, May 20, 2020 at 01:15:44PM +0300, Dmitry Osipenko wrote: > 20.05.2020 12:51, Dinghao Liu пишет: > > pm_runtime_get_sync() increments the runtime PM usage counter even > > it returns an error code. Thus a pairing decrement is needed on > > the error handling path to keep the counter

Re: [PATCH] media: staging: tegra-vde: fix runtime pm imbalance on error

2020-05-20 Thread Dmitry Osipenko
20.05.2020 12:51, Dinghao Liu пишет: > pm_runtime_get_sync() increments the runtime PM usage counter even > it returns an error code. Thus a pairing decrement is needed on > the error handling path to keep the counter balanced. > > Signed-off-by: Dinghao Liu > --- >

[PATCH] media: staging: tegra-vde: fix runtime pm imbalance on error

2020-05-20 Thread Dinghao Liu
pm_runtime_get_sync() increments the runtime PM usage counter even it returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao Liu --- drivers/staging/media/tegra-vde/vde.c | 2 +- 1 file changed, 1 insertion(+), 1