>> @@ -5715,6 +5715,9 @@ static int __ufshcd_wb_toggle(struct ufs_hba *hba, >> bool set, enum flag_idn idn) >> enum query_opcode opcode = set ? UPIU_QUERY_OPCODE_SET_FLAG : >> UPIU_QUERY_OPCODE_CLEAR_FLAG; >> >> + if (!ufshcd_is_wb_allowed(hba)) >> + return -EPERM; >> + >> index = ufshcd_wb_get_query_index(hba); >> return ufshcd_query_flag_retry(hba, opcode, idn, index, NULL); } @@ - >> 5723,60 +5726,50 @@ int ufshcd_wb_toggle(struct ufs_hba *hba, bool >> enable) { > Nobody is checking the return value of ufshcd_wb_toggle(), maybe make it void instead? > > Other than that - looks good to me. > > Reviewed-by: Avri Altman <avri.altman@xxxxxxx> It is used in "wb_on_store()" that turns WB on/off. Thank you for your review. :) Jinyoung.