[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <99c99d97-5849-cf40-709b-aebe53b80ce3@acm.org>
Date: Mon, 26 Jul 2021 10:59:41 -0700
From: Bart Van Assche <bvanassche@....org>
To: YueHaibing <yuehaibing@...wei.com>, alim.akhtar@...sung.com,
avri.altman@....com, jejb@...ux.ibm.com, martin.petersen@...cle.com
Cc: linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] scsi: ufs: fix build warning without CONFIG_PM
On 6/11/21 6:06 AM, YueHaibing wrote:
> drivers/scsi/ufs/ufshcd.c:9770:12: warning: ‘ufshcd_rpmb_resume’ defined but not used [-Wunused-function]
> static int ufshcd_rpmb_resume(struct device *dev)
> ^~~~~~~~~~~~~~~~~~
> drivers/scsi/ufs/ufshcd.c:9037:12: warning: ‘ufshcd_wl_runtime_resume’ defined but not used [-Wunused-function]
> static int ufshcd_wl_runtime_resume(struct device *dev)
> ^~~~~~~~~~~~~~~~~~~~~~~~
> drivers/scsi/ufs/ufshcd.c:9017:12: warning: ‘ufshcd_wl_runtime_suspend’ defined but not used [-Wunused-function]
> static int ufshcd_wl_runtime_suspend(struct device *dev)
> ^~~~~~~~~~~~~~~~~~~~~~~~~
>
> Move it into #ifdef block to fix this.
>
> Signed-off-by: YueHaibing <yuehaibing@...wei.com>
> ---
> drivers/scsi/ufs/ufshcd.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index b87ff68aa9aa..0c54589e186a 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -8926,6 +8926,7 @@ static int __ufshcd_wl_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op)
> return ret;
> }
>
> +#ifdef CONFIG_PM_SLEEP
> static int __ufshcd_wl_resume(struct ufs_hba *hba, enum ufs_pm_op pm_op)
> {
> int ret;
> @@ -9053,7 +9054,6 @@ static int ufshcd_wl_runtime_resume(struct device *dev)
> return ret;
> }
>
> -#ifdef CONFIG_PM_SLEEP
> static int ufshcd_wl_suspend(struct device *dev)
> {
> struct scsi_device *sdev = to_scsi_device(dev);
> @@ -9766,6 +9766,7 @@ static inline int ufshcd_clear_rpmb_uac(struct ufs_hba *hba)
> return ret;
> }
>
> +#ifdef CONFIG_PM_SLEEP
> static int ufshcd_rpmb_resume(struct device *dev)
> {
> struct ufs_hba *hba = wlun_dev_to_hba(dev);
> @@ -9774,6 +9775,7 @@ static int ufshcd_rpmb_resume(struct device *dev)
> ufshcd_clear_rpmb_uac(hba);
> return 0;
> }
> +#endif
>
> static const struct dev_pm_ops ufs_rpmb_pm_ops = {
> SET_RUNTIME_PM_OPS(NULL, ufshcd_rpmb_resume, NULL)
Hi YueHaibing,
Can you take a look at
https://lore.kernel.org/linux-scsi/20210722033439.26550-1-bvanassche@acm.org/T/#m6e7a02fc79634b5b77cfb77849253ac41d021389?
I let the kernel robot verify that patch before I posted it on the
linux-scsi mailing list.
Thanks,
Bart.
Powered by blists - more mailing lists