OSDN Git Service

scsi: ufs: Remove the 'update_scaling' local variable
authorBart Van Assche <bvanassche@acm.org>
Fri, 3 Dec 2021 23:19:44 +0000 (15:19 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 7 Dec 2021 03:30:34 +0000 (22:30 -0500)
This patch does not change any functionality but makes the next patch in
this series easier to read.

Link: https://lore.kernel.org/r/20211203231950.193369-12-bvanassche@acm.org
Tested-by: Bean Huo <beanhuo@micron.com>
Reviewed-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufshcd.c

index 2cd777d..27574ae 100644 (file)
@@ -5225,7 +5225,6 @@ static void __ufshcd_transfer_req_compl(struct ufs_hba *hba,
        struct scsi_cmnd *cmd;
        int result;
        int index;
-       bool update_scaling = false;
 
        for_each_set_bit(index, &completed_reqs, hba->nutrs) {
                lrbp = &hba->lrb[index];
@@ -5243,18 +5242,16 @@ static void __ufshcd_transfer_req_compl(struct ufs_hba *hba,
                        /* Do not touch lrbp after scsi done */
                        scsi_done(cmd);
                        ufshcd_release(hba);
-                       update_scaling = true;
+                       ufshcd_clk_scaling_update_busy(hba);
                } else if (lrbp->command_type == UTP_CMD_TYPE_DEV_MANAGE ||
                        lrbp->command_type == UTP_CMD_TYPE_UFS_STORAGE) {
                        if (hba->dev_cmd.complete) {
                                ufshcd_add_command_trace(hba, index,
                                                         UFS_DEV_COMP);
                                complete(hba->dev_cmd.complete);
-                               update_scaling = true;
+                               ufshcd_clk_scaling_update_busy(hba);
                        }
                }
-               if (update_scaling)
-                       ufshcd_clk_scaling_update_busy(hba);
        }
 }