Skip to content

Commit bf91b35

Browse files
committed
scsi: ufs: core: Discard pm_runtime_put() return values
The ufshcd driver defines ufshcd_rpm_put() to return an int, but that return value is never used. It also passes the return value of pm_runtime_put() to the caller which is not very useful. Returning an error code from pm_runtime_put() merely means that it has not queued up a work item to check whether or not the device can be suspended and there are many perfectly valid situations in which that can happen, like after writing "on" to the devices' runtime PM "control" attribute in sysfs for one example. Modify ufshcd_rpm_put() to discard the pm_runtime_put() return value and change its return type to void. No intentional functional impact. This will facilitate a planned change of the pm_runtime_put() return type to void in the future. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Link: https://patch.msgid.link/2781685.BddDVKsqQX@rafael.j.wysocki
1 parent 6401e43 commit bf91b35

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/ufs/core/ufshcd-priv.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,9 +348,9 @@ static inline int ufshcd_rpm_resume(struct ufs_hba *hba)
348348
return pm_runtime_resume(&hba->ufs_device_wlun->sdev_gendev);
349349
}
350350

351-
static inline int ufshcd_rpm_put(struct ufs_hba *hba)
351+
static inline void ufshcd_rpm_put(struct ufs_hba *hba)
352352
{
353-
return pm_runtime_put(&hba->ufs_device_wlun->sdev_gendev);
353+
pm_runtime_put(&hba->ufs_device_wlun->sdev_gendev);
354354
}
355355

356356
/**

0 commit comments

Comments
 (0)