lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <29fcd3c1-72c7-1191-ec03-aea1b0c6b8c9@acm.org> Date: Fri, 12 Feb 2021 19:25:13 -0800 From: Bart Van Assche <bvanassche@....org> To: Asutosh Das <asutoshd@...eaurora.org>, cang@...eaurora.org, martin.petersen@...cle.com, linux-scsi@...r.kernel.org Cc: 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 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>
Powered by blists - more mailing lists