linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: "Martin K . Petersen" <martin.petersen@oracle.com>,
	"James E . J . Bottomley" <jejb@linux.vnet.ibm.com>
Cc: linux-scsi@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
	Bart Van Assche <bvanassche@acm.org>
Subject: [PATCH 3/4] ufs: Simplify two tests
Date: Tue,  7 Jan 2020 11:25:30 -0800	[thread overview]
Message-ID: <20200107192531.73802-4-bvanassche@acm.org> (raw)
In-Reply-To: <20200107192531.73802-1-bvanassche@acm.org>

lrbp->cmd is set only for SCSI commands. Use this knowledge to simplify
two boolean expressions.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/ufs/ufshcd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 6f55d72e7fdd..15e65248597d 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -2474,7 +2474,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);
@@ -2661,7 +2661,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);
 

  parent reply	other threads:[~2020-01-07 19:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-07 19:25 [PATCH 0/4] ufs: Let the SCSI core allocate per-command UFS data Bart Van Assche
2020-01-07 19:25 ` [PATCH 1/4] Introduce {init,exit}_cmd_priv() Bart Van Assche
2020-01-07 19:25 ` [PATCH 2/4] ufs: Introduce ufshcd_init_lrb() Bart Van Assche
2020-01-09 10:28   ` Avri Altman
2020-01-19 14:38   ` Alim Akhtar
2020-01-07 19:25 ` Bart Van Assche [this message]
2020-01-09 10:29   ` [PATCH 3/4] ufs: Simplify two tests Avri Altman
2020-01-10 17:17   ` asutoshd
2020-01-11  7:21   ` Stanley Chu
2020-01-07 19:25 ` [PATCH 4/4] ufs: Let the SCSI core allocate per-command UFS data Bart Van Assche
2020-01-09  9:48   ` Avri Altman
2020-01-09 22:28     ` Bart Van Assche
2020-01-10 12:03       ` Avri Altman
2020-01-08 13:14 ` [PATCH 0/4] " Avri Altman
2020-01-08 22:53   ` Bart Van Assche

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200107192531.73802-4-bvanassche@acm.org \
    --to=bvanassche@acm.org \
    --cc=hch@lst.de \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).