Skip to content

Commit

Permalink
scsi: ufs: Simplify two tests
Browse files Browse the repository at this point in the history
lrbp->cmd is set only for SCSI commands. Use this knowledge to simplify two
boolean expressions.

Link: https://lore.kernel.org/r/[email protected]
Cc: Alim Akhtar <[email protected]>
Cc: Tomas Winkler <[email protected]>
Cc: Bean Huo <[email protected]>
Cc: Can Guo <[email protected]>
Reviewed-by: Stanley Chu <[email protected]>
Reviewed-by: Asutosh Das <[email protected]>
Reviewed-by: Avri Altman <[email protected]>
Signed-off-by: Bart Van Assche <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
  • Loading branch information
bvanassche authored and martinkpetersen committed Feb 29, 2020
1 parent 4d2b8d4 commit 5905d46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/scsi/ufs/ufshcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2469,7 +2469,7 @@ static int ufshcd_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)

/* issue command to the controller */
spin_lock_irqsave(hba->host->host_lock, flags);
ufshcd_vops_setup_xfer_req(hba, tag, (lrbp->cmd ? true : false));
ufshcd_vops_setup_xfer_req(hba, tag, true);
ufshcd_send_command(hba, tag);
out_unlock:
spin_unlock_irqrestore(hba->host->host_lock, flags);
Expand Down Expand Up @@ -2656,7 +2656,7 @@ static int ufshcd_exec_dev_cmd(struct ufs_hba *hba,
/* Make sure descriptors are ready before ringing the doorbell */
wmb();
spin_lock_irqsave(hba->host->host_lock, flags);
ufshcd_vops_setup_xfer_req(hba, tag, (lrbp->cmd ? true : false));
ufshcd_vops_setup_xfer_req(hba, tag, false);
ufshcd_send_command(hba, tag);
spin_unlock_irqrestore(hba->host->host_lock, flags);

Expand Down

0 comments on commit 5905d46

Please sign in to comment.