From: YueHaibing <yuehaibing@huawei.com>
To: Bart Van Assche <bvanassche@acm.org>, <alim.akhtar@samsung.com>,
<avri.altman@wdc.com>, <jejb@linux.ibm.com>,
<martin.petersen@oracle.com>
Cc: <linux-scsi@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -next] scsi: ufs: fix build warning without CONFIG_PM
Date: Tue, 27 Jul 2021 10:57:21 +0800 [thread overview]
Message-ID: <cf956e7d-27b2-43c9-5c65-9d9e62919f40@huawei.com> (raw)
In-Reply-To: <99c99d97-5849-cf40-709b-aebe53b80ce3@acm.org>
On 2021/7/27 1:59, Bart Van Assche wrote:
> 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@huawei.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.
__ufshcd_wl_resume() is needed while CONFIG_PM is enabled, and my patch v2 has been Applied. See:
https://lore.kernel.org/r/20210617031326.36908-1-yuehaibing@huawei.com
I will let Hulk Robot test your patch serials, and report if any.
>
> Thanks,
>
> Bart.
> .
prev parent reply other threads:[~2021-07-27 2:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-11 13:06 YueHaibing
2021-06-16 16:52 ` kernel test robot
2021-07-26 17:59 ` Bart Van Assche
2021-07-27 2:57 ` YueHaibing [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cf956e7d-27b2-43c9-5c65-9d9e62919f40@huawei.com \
--to=yuehaibing@huawei.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=bvanassche@acm.org \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®