Re: [PATCH] scsi: ufs-bsg: Fix runtime PM imbalance on error

2020-06-15 Thread Martin K. Petersen
On Fri, 22 May 2020 12:59:29 +0800, Dinghao Liu wrote: > When ufs_bsg_alloc_desc_buffer() returns an error code, > a pairing runtime PM usage counter decrement is needed > to keep the counter balanced. Applied to 5.8/scsi-fixes, thanks! [1/1] scsi: ufs-bsg: Fix runtime PM imbalance on error

RE: [PATCH] scsi: ufs-bsg: Fix runtime PM imbalance on error

2020-06-10 Thread Avri Altman
Hi, > Avri: Please review! > > > When ufs_bsg_alloc_desc_buffer() returns an error code, > > a pairing runtime PM usage counter decrement is needed > > to keep the counter balanced. > > > > Signed-off-by: Dinghao Liu Please add: Fixes: 74e5e468b664 (scsi: ufs-bsg: Wake the device before

Re: [PATCH] scsi: ufs-bsg: Fix runtime PM imbalance on error

2020-06-09 Thread Martin K. Petersen
Avri: Please review! > When ufs_bsg_alloc_desc_buffer() returns an error code, > a pairing runtime PM usage counter decrement is needed > to keep the counter balanced. > > Signed-off-by: Dinghao Liu > --- > drivers/scsi/ufs/ufs_bsg.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-)

Re: RE: RE: [EXT] [PATCH] scsi: ufs-bsg: Fix runtime PM imbalance on error

2020-05-23 Thread dinghao . liu
> Hi, Dinghao > > > Thank you for your advice! Moving original pm_runtime_put_sync() to after > > "out" label will influence an error path branched from > > ups_bsg_verify_query_size(). So I think changing "goto out" to "break" is a > > good > > idea. But in this case we may execute an extra > >

RE: RE: [EXT] [PATCH] scsi: ufs-bsg: Fix runtime PM imbalance on error

2020-05-22 Thread Bean Huo (beanhuo)
Hi, Dinghao > Thank you for your advice! Moving original pm_runtime_put_sync() to after > "out" label will influence an error path branched from > ups_bsg_verify_query_size(). So I think changing "goto out" to "break" is a > good > idea. But in this case we may execute an extra >

Re: RE: [EXT] [PATCH] scsi: ufs-bsg: Fix runtime PM imbalance on error

2020-05-22 Thread dinghao . liu
Hi, Bean Thank you for your advice! Moving original pm_runtime_put_sync() to after "out" label will influence an error path branched from ups_bsg_verify_query_size(). So I think changing "goto out" to "break" is a good idea. But in this case we may execute an extra sg_copy_from_buffer() and an

RE: [EXT] [PATCH] scsi: ufs-bsg: Fix runtime PM imbalance on error

2020-05-22 Thread Bean Huo (beanhuo)
> 1 file changed, 3 insertions(+), 1 deletion(-) Hi, Dinghao > > diff --git a/drivers/scsi/ufs/ufs_bsg.c b/drivers/scsi/ufs/ufs_bsg.c index > 53dd87628cbe..516a7f573942 100644 > --- a/drivers/scsi/ufs/ufs_bsg.c > +++ b/drivers/scsi/ufs/ufs_bsg.c > @@ -106,8 +106,10 @@ static int

[PATCH] scsi: ufs-bsg: Fix runtime PM imbalance on error

2020-05-21 Thread Dinghao Liu
When ufs_bsg_alloc_desc_buffer() returns an error code, a pairing runtime PM usage counter decrement is needed to keep the counter balanced. Signed-off-by: Dinghao Liu --- drivers/scsi/ufs/ufs_bsg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git