Re: [PATCH] hwrng: ks-sa - fix runtime pm imbalance on error

2020-05-28 Thread st...@rowland.harvard.edu
On Thu, May 28, 2020 at 04:55:19PM +1000, Herbert Xu wrote: > On Wed, May 20, 2020 at 12:45:56PM -0400, st...@rowland.harvard.edu wrote: > > On Wed, May 20, 2020 at 03:42:17PM +, Sverdlin, Alexander (Nokia - > > DE/Ulm) wrote: > > > Hello Dinghao, > > > > > > On Wed, 2020-05-20 at 21:29 +0800

Re: Re: [PATCH] hwrng: ks-sa - fix runtime pm imbalance on error

2020-05-28 Thread dinghao . liu
> On Wed, May 20, 2020 at 12:45:56PM -0400, st...@rowland.harvard.edu wrote: > > On Wed, May 20, 2020 at 03:42:17PM +, Sverdlin, Alexander (Nokia - > > DE/Ulm) wrote: > > > Hello Dinghao, > > > > > > On Wed, 2020-05-20 at 21:29 +0800, Dinghao Liu wrote: > > > > pm_runtime_get_sync() increment

Re: [PATCH] hwrng: ks-sa - fix runtime pm imbalance on error

2020-05-27 Thread Herbert Xu
On Wed, May 20, 2020 at 12:45:56PM -0400, st...@rowland.harvard.edu wrote: > On Wed, May 20, 2020 at 03:42:17PM +, Sverdlin, Alexander (Nokia - > DE/Ulm) wrote: > > Hello Dinghao, > > > > On Wed, 2020-05-20 at 21:29 +0800, Dinghao Liu wrote: > > > pm_runtime_get_sync() increments the runtime

Re: Re: [PATCH] hwrng: ks-sa - fix runtime pm imbalance on error

2020-05-20 Thread dinghao . liu
Hi Alexander, There are large amounts of cases that assume pm_runtime_get_sync() will modify runtime PM usage counter on error. Fixing this in PM subsystem will influence all callers of pm_runtime_get_sync() and introduce new bugs. Therefore I think the better solution is to fix misused cases ind

Re: [PATCH] hwrng: ks-sa - fix runtime pm imbalance on error

2020-05-20 Thread st...@rowland.harvard.edu
On Wed, May 20, 2020 at 03:42:17PM +, Sverdlin, Alexander (Nokia - DE/Ulm) wrote: > Hello Dinghao, > > On Wed, 2020-05-20 at 21:29 +0800, Dinghao Liu wrote: > > pm_runtime_get_sync() increments the runtime PM usage counter even > > the call returns an error code. Thus a pairing decrement is n

Re: [PATCH] hwrng: ks-sa - fix runtime pm imbalance on error

2020-05-20 Thread Sverdlin, Alexander (Nokia - DE/Ulm)
Hello Dinghao, On Wed, 2020-05-20 at 21:29 +0800, Dinghao Liu wrote: > pm_runtime_get_sync() increments the runtime PM usage counter even > the call returns an error code. Thus a pairing decrement is needed > on the error handling path to keep the counter balanced. I believe, this is the wrong pl

[PATCH] hwrng: ks-sa - fix runtime pm imbalance on error

2020-05-20 Thread Dinghao Liu
pm_runtime_get_sync() increments the runtime PM usage counter even the call 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/char/hw_random/ks-sa-rng.c | 1 + 1 file changed, 1 insertion(+)