[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210216173829.GB35819@stor-presley.qualcomm.com>
Date: Tue, 16 Feb 2021 09:38:29 -0800
From: Asutosh Das <asutoshd@...eaurora.org>
To: Bart Van Assche <bvanassche@....org>
Cc: cang@...eaurora.org, martin.petersen@...cle.com,
linux-scsi@...r.kernel.org, linux-arm-msm@...r.kernel.org,
stern@...land.harvard.edu, Alim Akhtar <alim.akhtar@...sung.com>,
Avri Altman <avri.altman@....com>,
"James E.J. Bottomley" <jejb@...ux.ibm.com>,
Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...hat.com>,
Stanley Chu <stanley.chu@...iatek.com>,
Bean Huo <beanhuo@...ron.com>,
Jaegeuk Kim <jaegeuk@...nel.org>,
Kiwoong Kim <kwmad.kim@...sung.com>,
Adrian Hunter <adrian.hunter@...el.com>,
Satya Tangirala <satyat@...gle.com>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH v3 1/1] scsi: ufs: Enable power management for wlun
On Fri, Feb 12 2021 at 19:25 -0800, Bart Van Assche wrote:
>On 2/11/21 11:18 AM, Asutosh Das wrote:
>> +static inline bool is_rpmb_wlun(struct scsi_device *sdev)
>> +{
>> + return (sdev->lun == ufshcd_upiu_wlun_to_scsi_wlun(UFS_UPIU_RPMB_WLUN));
>> +}
>> +
>> +static inline bool is_device_wlun(struct scsi_device *sdev)
>> +{
>> + return (sdev->lun ==
>> + ufshcd_upiu_wlun_to_scsi_wlun(UFS_UPIU_UFS_DEVICE_WLUN));
>> +}
>
>A minor comment: checkpatch should have reported that "return is not a
>function" for the above code.
>
>> /**
>> + * ufshcd_setup_links - associate link b/w device wlun and other luns
>> + * @sdev: pointer to SCSI device
>> + * @hba: pointer to ufs hba
>> + *
>> + * Returns void
>> + */
>
>Please leave out "Returns void".
>
>> +static int ufshcd_wl_suspend(struct device *dev)
>> +{
>> + struct scsi_device *sdev = to_scsi_device(dev);
>> + struct ufs_hba *hba;
>> + int ret;
>> + ktime_t start = ktime_get();
>> +
>> + if (is_rpmb_wlun(sdev))
>> + return 0;
>> + hba = shost_priv(sdev->host);
>> + ret = __ufshcd_wl_suspend(hba, UFS_SYSTEM_PM);
>> + if (ret)
>> + dev_err(&sdev->sdev_gendev, "%s failed: %d\n", __func__, ret);
>> +
>> + trace_ufshcd_wl_suspend(dev_name(dev), ret,
>> + ktime_to_us(ktime_sub(ktime_get(), start)),
>> + hba->curr_dev_pwr_mode, hba->uic_link_state);
>> +
>> + return ret;
>> +
>> +}
>
>Please remove the blank line after the return statement.
>
>Otherwise this patch looks good to me. Hence:
>
>Reviewed-by: Bart Van Assche <bvanassche@....org>
>
Done.
Thanks,
-asd
Powered by blists - more mailing lists