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> Signed-off-by: Jinyoung Choi <j-young.choi@samsung.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
87bd05016a
commit
f8dc7a31a3
|
@ -5758,10 +5758,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);
|
||||
|
|
Loading…
Reference in New Issue