[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2781685.BddDVKsqQX@rafael.j.wysocki>
Date: Mon, 22 Dec 2025 21:31:45 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Linux PM <linux-pm@...r.kernel.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Ulf Hansson <ulf.hansson@...aro.org>,
Brian Norris <briannorris@...omium.org>,
Alim Akhtar <alim.akhtar@...sung.com>, Avri Altman <avri.altman@....com>,
Bart Van Assche <bvanassche@....org>,
"James E.J. Bottomley" <James.Bottomley@...senpartnership.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>, linux-scsi@...r.kernel.org
Subject:
[PATCH v1 20/23] scsi: ufs: core: Discard pm_runtime_put() return values
From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
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@...el.com>
---
This patch is part of a series, but it doesn't depend on anything else
in that series. The last patch in the series depends on it.
It can be applied by itself and if you decide to do so, please let me
know.
Otherwise, an ACK or equivalent will be appreciated, but also the lack
of specific criticism will be eventually regarded as consent.
---
drivers/ufs/core/ufshcd-priv.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/ufs/core/ufshcd-priv.h
+++ b/drivers/ufs/core/ufshcd-priv.h
@@ -341,9 +341,9 @@ static inline int ufshcd_rpm_resume(stru
return pm_runtime_resume(&hba->ufs_device_wlun->sdev_gendev);
}
-static inline int ufshcd_rpm_put(struct ufs_hba *hba)
+static inline void ufshcd_rpm_put(struct ufs_hba *hba)
{
- return pm_runtime_put(&hba->ufs_device_wlun->sdev_gendev);
+ pm_runtime_put(&hba->ufs_device_wlun->sdev_gendev);
}
/**
Powered by blists - more mailing lists