diff mbox

scsi: ufs: remove the duplicated checking for supporting clkscaling

Message ID 20170321121957.18655-1-jh80.chung@samsung.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Jaehoon Chung March 21, 2017, 12:19 p.m. UTC
There are same conditions for checking whether supporting clkscaling or
not.
When ufshcd is supporting clkscaling, active_reqs should be decreased by
two.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
 drivers/scsi/ufs/ufshcd.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Bartlomiej Zolnierkiewicz March 22, 2017, 1:35 p.m. UTC | #1
Hi,

On Tuesday, March 21, 2017 09:19:57 PM Jaehoon Chung wrote:
> There are same conditions for checking whether supporting clkscaling or
> not.
> When ufshcd is supporting clkscaling, active_reqs should be decreased by
> two.

I guess you meant "one" here, not "two"?

> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> ---
>  drivers/scsi/ufs/ufshcd.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index dc6efbd..f2cbc71 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -4598,8 +4598,6 @@ static void __ufshcd_transfer_req_compl(struct ufs_hba *hba,
>  		}
>  		if (ufshcd_is_clkscaling_supported(hba))
>  			hba->clk_scaling.active_reqs--;
> -		if (ufshcd_is_clkscaling_supported(hba))
> -			hba->clk_scaling.active_reqs--;
>  	}
>  
>  	/* clear corresponding bits of completed commands */

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
subhashj@codeaurora.org March 24, 2017, 11:19 p.m. UTC | #2
On 2017-03-21 05:19, Jaehoon Chung wrote:
> There are same conditions for checking whether supporting clkscaling or
> not.
> When ufshcd is supporting clkscaling, active_reqs should be decreased 
> by
> two.
> 
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> ---
>  drivers/scsi/ufs/ufshcd.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index dc6efbd..f2cbc71 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -4598,8 +4598,6 @@ static void __ufshcd_transfer_req_compl(struct
> ufs_hba *hba,
>  		}
>  		if (ufshcd_is_clkscaling_supported(hba))
>  			hba->clk_scaling.active_reqs--;
> -		if (ufshcd_is_clkscaling_supported(hba))
> -			hba->clk_scaling.active_reqs--;
>  	}
> 
>  	/* clear corresponding bits of completed commands */

Looks good to me.
Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>
Martin K. Petersen March 28, 2017, 1:46 a.m. UTC | #3
Jaehoon Chung <jh80.chung@samsung.com> writes:

Jaehoon,

> There are same conditions for checking whether supporting clkscaling
> or not.  When ufshcd is supporting clkscaling, active_reqs should be
> decreased by two.

Applied to 4.11/scsi-fixes.

Thank you!
diff mbox

Patch

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index dc6efbd..f2cbc71 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -4598,8 +4598,6 @@  static void __ufshcd_transfer_req_compl(struct ufs_hba *hba,
 		}
 		if (ufshcd_is_clkscaling_supported(hba))
 			hba->clk_scaling.active_reqs--;
-		if (ufshcd_is_clkscaling_supported(hba))
-			hba->clk_scaling.active_reqs--;
 	}
 
 	/* clear corresponding bits of completed commands */