Re: [PATCH v4 5/6] scsi: ufs: Cleanup WB buffer flush toggle implementation

From: Bean Huo
Date: Tue Dec 15 2020 - 04:29:48 EST


On Tue, 2020-12-15 at 17:07 +0800, Stanley Chu wrote:
> > if (ret) {
> > - dev_warn(hba->dev, "%s: WB - buf flush disable failed
> > %d\n",
> > - __func__, ret);
> > - } else {
> > - hba->dev_info.wb_buf_flush_enabled = false;
> > - dev_dbg(hba->dev, "WB - Flush disabled: %d\n", ret);
> > + dev_err(hba->dev, "%s WB-Buf Flush %s failed %d\n",
> > __func__,
> > + enable ? "enable" : "disable", ret);
> > + goto out;
> > }
> >
> > + if (enable)
> > + hba->dev_info.wb_buf_flush_enabled = true;
> > + else
> > + hba->dev_info.wb_buf_flush_enabled = false;
>
> Perhaps this could be simpler as below?
>
> hba->dev_info.wb_buf_flush_enabled = enable;

Thanks, will be changed in next version.

Bean