linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yue Hu <zbestahu@gmail.com>
To: martin.petersen@oracle.com, jejb@linux.ibm.com,
	linux-scsi@vger.kernel.org
Cc: alim.akhtar@samsung.com, avri.altman@wdc.com,
	stanley.chu@mediatek.com, cang@codeaurora.org,
	beanhuo@micron.com, jaegeuk@kernel.org, asutoshd@codeaurora.org,
	linux-kernel@vger.kernel.org, huyue2@yulong.com,
	zhangwen@yulong.com, zbestahu@163.com
Subject: [PATCH] scsi: ufs: Remove redundant WB enabling check in ufshcd_wb_toggle_flush()
Date: Fri,  5 Mar 2021 17:12:53 +0800	[thread overview]
Message-ID: <20210305091253.314-1-zbestahu@gmail.com> (raw)

From: Yue Hu <huyue2@yulong.com>

Note that ufshcd_wb_toggle_flush() will be called only in
ufshcd_wb_config() which have already checked if WB is allowed.

Signed-off-by: Yue Hu <huyue2@yulong.com>
---
 drivers/scsi/ufs/ufshcd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 721f55d..2c49344 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -5484,8 +5484,7 @@ static inline int ufshcd_wb_toggle_flush(struct ufs_hba *hba, bool enable)
 	u8 index;
 	enum query_opcode opcode;
 
-	if (!ufshcd_is_wb_allowed(hba) ||
-	    hba->dev_info.wb_buf_flush_enabled == enable)
+	if (hba->dev_info.wb_buf_flush_enabled == enable)
 		return 0;
 
 	if (enable)
-- 
1.9.1


                 reply	other threads:[~2021-03-05  9:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20210305091253.314-1-zbestahu@gmail.com \
    --to=zbestahu@gmail.com \
    --cc=alim.akhtar@samsung.com \
    --cc=asutoshd@codeaurora.org \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=cang@codeaurora.org \
    --cc=huyue2@yulong.com \
    --cc=jaegeuk@kernel.org \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=stanley.chu@mediatek.com \
    --cc=zbestahu@163.com \
    --cc=zhangwen@yulong.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).