* [PATCH] scsi: ufs: ufs-mediatek: guard ufs_mtk_runtime_suspend() and ufs_mtk_runtime_resume() w/ CONFIG_PM
@ 2023-02-20 14:24 Yangtao Li
2023-02-21 1:44 ` Stanley Chu
2023-02-21 23:15 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Yangtao Li @ 2023-02-20 14:24 UTC (permalink / raw)
To: stanley.chu, jejb, martin.petersen, linux-scsi
Cc: linux-mediatek, linux-kernel, linux-arm-kernel, zhangshida,
Yangtao Li, k2ci
To fix below compile error(CONFIG_PM set to 'n'):
drivers/ufs/host/ufs-mediatek.c: In function `ufs_mtk_runtime_suspend`:
drivers/ufs/host/ufs-mediatek.c:1623:8: error: implicit declaration of
function `ufshcd_runtime_suspend`; did you mean `ufs_mtk_runtime_suspend`?
[-Werror=implicit-function-declaration]
1623 | ret = ufshcd_runtime_suspend(dev);
| ^~~~~~~~~~~~~~~~~~~~~~
| ufs_mtk_runtime_suspend
drivers/ufs/host/ufs-mediatek.c: In function `ufs_mtk_runtime_resume`:
drivers/ufs/host/ufs-mediatek.c:1638:9: error: implicit declaration of function
`ufshcd_runtime_resume`; did you mean `ufs_mtk_runtime_resume`?
[-Werror=implicit-function-declaration]
1638 | return ufshcd_runtime_resume(dev);
| ^~~~~~~~~~~~~~~~~~~~~
| ufs_mtk_runtime_resume
At top level:
drivers/ufs/host/ufs-mediatek.c:1632:12: error: `ufs_mtk_runtime_resume`
defined but not used [-Werror=unused-function]
1632 | static int ufs_mtk_runtime_resume(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/ufs/host/ufs-mediatek.c:1618:12: error: `ufs_mtk_runtime_suspend`
defined but not used [-Werror=unused-function]
1618 | static int ufs_mtk_runtime_suspend(struct device *dev)
Reported-by: k2ci <kernel-bot@kylinos.cn>
Reported-by: Shida Zhang <zhangshida@kylinos.cn>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/ufs/host/ufs-mediatek.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c
index 21d9b047539f..73e217260390 100644
--- a/drivers/ufs/host/ufs-mediatek.c
+++ b/drivers/ufs/host/ufs-mediatek.c
@@ -1613,6 +1613,7 @@ static int ufs_mtk_system_resume(struct device *dev)
}
#endif
+#ifdef CONFIG_PM
static int ufs_mtk_runtime_suspend(struct device *dev)
{
struct ufs_hba *hba = dev_get_drvdata(dev);
@@ -1635,6 +1636,7 @@ static int ufs_mtk_runtime_resume(struct device *dev)
return ufshcd_runtime_resume(dev);
}
+#endif
static const struct dev_pm_ops ufs_mtk_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(ufs_mtk_system_suspend,
--
2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: ufs: ufs-mediatek: guard ufs_mtk_runtime_suspend() and ufs_mtk_runtime_resume() w/ CONFIG_PM
2023-02-20 14:24 [PATCH] scsi: ufs: ufs-mediatek: guard ufs_mtk_runtime_suspend() and ufs_mtk_runtime_resume() w/ CONFIG_PM Yangtao Li
@ 2023-02-21 1:44 ` Stanley Chu
2023-02-21 23:15 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Stanley Chu @ 2023-02-21 1:44 UTC (permalink / raw)
To: Yangtao Li
Cc: stanley.chu, jejb, martin.petersen, linux-scsi, linux-mediatek,
linux-kernel, linux-arm-kernel, zhangshida, k2ci
Hi Yangtao,
On Mon, Feb 20, 2023 at 10:44 PM Yangtao Li <frank.li@vivo.com> wrote:
>
> To fix below compile error(CONFIG_PM set to 'n'):
>
> drivers/ufs/host/ufs-mediatek.c: In function `ufs_mtk_runtime_suspend`:
> drivers/ufs/host/ufs-mediatek.c:1623:8: error: implicit declaration of
> function `ufshcd_runtime_suspend`; did you mean `ufs_mtk_runtime_suspend`?
> [-Werror=implicit-function-declaration]
> 1623 | ret = ufshcd_runtime_suspend(dev);
> | ^~~~~~~~~~~~~~~~~~~~~~
> | ufs_mtk_runtime_suspend
> drivers/ufs/host/ufs-mediatek.c: In function `ufs_mtk_runtime_resume`:
> drivers/ufs/host/ufs-mediatek.c:1638:9: error: implicit declaration of function
> `ufshcd_runtime_resume`; did you mean `ufs_mtk_runtime_resume`?
> [-Werror=implicit-function-declaration]
> 1638 | return ufshcd_runtime_resume(dev);
> | ^~~~~~~~~~~~~~~~~~~~~
> | ufs_mtk_runtime_resume
> At top level:
> drivers/ufs/host/ufs-mediatek.c:1632:12: error: `ufs_mtk_runtime_resume`
> defined but not used [-Werror=unused-function]
> 1632 | static int ufs_mtk_runtime_resume(struct device *dev)
> | ^~~~~~~~~~~~~~~~~~~~~~
> drivers/ufs/host/ufs-mediatek.c:1618:12: error: `ufs_mtk_runtime_suspend`
> defined but not used [-Werror=unused-function]
> 1618 | static int ufs_mtk_runtime_suspend(struct device *dev)
>
> Reported-by: k2ci <kernel-bot@kylinos.cn>
> Reported-by: Shida Zhang <zhangshida@kylinos.cn>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
Thanks for this fix.
Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: ufs: ufs-mediatek: guard ufs_mtk_runtime_suspend() and ufs_mtk_runtime_resume() w/ CONFIG_PM
2023-02-20 14:24 [PATCH] scsi: ufs: ufs-mediatek: guard ufs_mtk_runtime_suspend() and ufs_mtk_runtime_resume() w/ CONFIG_PM Yangtao Li
2023-02-21 1:44 ` Stanley Chu
@ 2023-02-21 23:15 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2023-02-21 23:15 UTC (permalink / raw)
To: Yangtao Li
Cc: stanley.chu, jejb, martin.petersen, linux-scsi, linux-mediatek,
linux-kernel, linux-arm-kernel, zhangshida, k2ci
Yangtao,
> To fix below compile error(CONFIG_PM set to 'n'):
Applied to 6.3/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-21 23:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-20 14:24 [PATCH] scsi: ufs: ufs-mediatek: guard ufs_mtk_runtime_suspend() and ufs_mtk_runtime_resume() w/ CONFIG_PM Yangtao Li
2023-02-21 1:44 ` Stanley Chu
2023-02-21 23:15 ` Martin K. Petersen
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®