mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
UPSTREAM: scsi: ufs: wb: Change wb_enabled condition test
Change to improve readability.
Link: https://lore.kernel.org/r/20220804074928epcms2p86582693a39597501b491400a28543a92@epcms2p8
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Reviewed-by: Bean Huo <beanhuo@micron.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>
Change-Id: I5b59ed911ffdf2ea734f244ab1b8c7cf2832c92d
Signed-off-by: Jinyoung Choi <j-young.choi@samsung.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Bug: 258234315
(cherry picked from commit f8dc7a31a3)
Signed-off-by: Bart Van Assche <bvanassche@google.com>
This commit is contained in:
committed by
Alistair Delva
parent
1cbf4559b8
commit
f77cbdb960
@@ -5834,10 +5834,8 @@ int ufshcd_wb_toggle(struct ufs_hba *hba, bool enable)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (!ufshcd_is_wb_allowed(hba))
|
||||
return 0;
|
||||
|
||||
if (!(enable ^ hba->dev_info.wb_enabled))
|
||||
if (!ufshcd_is_wb_allowed(hba) ||
|
||||
hba->dev_info.wb_enabled == enable)
|
||||
return 0;
|
||||
|
||||
ret = __ufshcd_wb_toggle(hba, enable, QUERY_FLAG_IDN_WB_EN);
|
||||
|
||||
Reference in New Issue
Block a user