* [PATCH] scsi: ufs: Add select to CONFIG_PM in Kconfig
@ 2023-02-20 8:32 Stephen Zhang
2023-02-20 9:32 ` Manivannan Sadhasivam
2023-02-20 13:58 ` AngeloGioacchino Del Regno
0 siblings, 2 replies; 3+ messages in thread
From: Stephen Zhang @ 2023-02-20 8:32 UTC (permalink / raw)
To: jejb, artin.petersen, matthias.bgg, angelogioacchino.delregno,
beanhuo, bvanassche, avri.altman, yoshihiro.shimoda.uh
Cc: linux-scsi, linux-kernel, linux-arm-kernel, linux-mediatek,
zhangshida, starzhangzsd, k2ci
From: Shida Zhang <zhangshida@kylinos.cn>
From: Shida Zhang <zhangshida@kylinos.cn>
In a configuration with CONFIG_SCSI_UFS_MEDIATEK set to 'm' and
CONFIG_PM set to 'n', errors occur at compile time:
====
../drivers/ufs/host/ufs-mediatek.c: In function ‘ufs_mtk_runtime_suspend’:
../drivers/ufs/host/ufs-mediatek.c:1621:8: error: implicit declaration of function ‘ufshcd_runtime_suspend’; did you mean ‘ufs_mtk_runtime_suspend’? [-Werror=implicit-function-declaration]
../drivers/ufs/host/ufs-mediatek.c: In function ‘ufs_mtk_runtime_resume’:
../drivers/ufs/host/ufs-mediatek.c:1636:9: error: implicit declaration of function ‘ufshcd_runtime_resume’; did you mean ‘ufs_mtk_runtime_resume’? [-Werror=implicit-function-declaration]
====
This patch fixes these by selecting CONFIG_PM from CONFIG_SCSI_UFS_MEDIATEK.
Reported-by: k2ci <kernel-bot@kylinos.cn>
Signed-off-by: Shida Zhang <zhangshida@kylinos.cn>
---
drivers/ufs/host/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/ufs/host/Kconfig b/drivers/ufs/host/Kconfig
index 4cc2dbd79ed0..f9786f085b54 100644
--- a/drivers/ufs/host/Kconfig
+++ b/drivers/ufs/host/Kconfig
@@ -71,6 +71,7 @@ config SCSI_UFS_QCOM
config SCSI_UFS_MEDIATEK
tristate "Mediatek specific hooks to UFS controller platform driver"
depends on SCSI_UFSHCD_PLATFORM && ARCH_MEDIATEK
+ select PM
select PHY_MTK_UFS
select RESET_TI_SYSCON
help
--
2.27.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: ufs: Add select to CONFIG_PM in Kconfig
2023-02-20 8:32 [PATCH] scsi: ufs: Add select to CONFIG_PM in Kconfig Stephen Zhang
@ 2023-02-20 9:32 ` Manivannan Sadhasivam
2023-02-20 13:58 ` AngeloGioacchino Del Regno
1 sibling, 0 replies; 3+ messages in thread
From: Manivannan Sadhasivam @ 2023-02-20 9:32 UTC (permalink / raw)
To: Stephen Zhang
Cc: jejb, artin.petersen, matthias.bgg, angelogioacchino.delregno,
beanhuo, bvanassche, avri.altman, yoshihiro.shimoda.uh,
linux-scsi, linux-kernel, linux-arm-kernel, linux-mediatek,
zhangshida, k2ci
On Mon, Feb 20, 2023 at 04:32:56PM +0800, Stephen Zhang wrote:
> From: Shida Zhang <zhangshida@kylinos.cn>
>
> From: Shida Zhang <zhangshida@kylinos.cn>
>
> In a configuration with CONFIG_SCSI_UFS_MEDIATEK set to 'm' and
> CONFIG_PM set to 'n', errors occur at compile time:
>
> ====
> ../drivers/ufs/host/ufs-mediatek.c: In function ‘ufs_mtk_runtime_suspend’:
> ../drivers/ufs/host/ufs-mediatek.c:1621:8: error: implicit declaration of function ‘ufshcd_runtime_suspend’; did you mean ‘ufs_mtk_runtime_suspend’? [-Werror=implicit-function-declaration]
> ../drivers/ufs/host/ufs-mediatek.c: In function ‘ufs_mtk_runtime_resume’:
> ../drivers/ufs/host/ufs-mediatek.c:1636:9: error: implicit declaration of function ‘ufshcd_runtime_resume’; did you mean ‘ufs_mtk_runtime_resume’? [-Werror=implicit-function-declaration]
> ====
>
> This patch fixes these by selecting CONFIG_PM from CONFIG_SCSI_UFS_MEDIATEK.
>
> Reported-by: k2ci <kernel-bot@kylinos.cn>
> Signed-off-by: Shida Zhang <zhangshida@kylinos.cn>
> ---
> drivers/ufs/host/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/ufs/host/Kconfig b/drivers/ufs/host/Kconfig
> index 4cc2dbd79ed0..f9786f085b54 100644
> --- a/drivers/ufs/host/Kconfig
> +++ b/drivers/ufs/host/Kconfig
> @@ -71,6 +71,7 @@ config SCSI_UFS_QCOM
> config SCSI_UFS_MEDIATEK
> tristate "Mediatek specific hooks to UFS controller platform driver"
> depends on SCSI_UFSHCD_PLATFORM && ARCH_MEDIATEK
> + select PM
Forcing a dependency is only valid if the driver won't work without it. PM is
an optional feature, so it shouldn't be forced. Moreover, in your case the
drivers were not used but instead erroring out because their definitions exist.
Here you should guard the ufs_mtk_runtime_suspend and ufs_mtk_runtime_resume
functions with CONFIG_PM instead.
Thanks,
Mani
> select PHY_MTK_UFS
> select RESET_TI_SYSCON
> help
> --
> 2.27.0
>
--
மணிவண்ணன் சதாசிவம்
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: ufs: Add select to CONFIG_PM in Kconfig
2023-02-20 8:32 [PATCH] scsi: ufs: Add select to CONFIG_PM in Kconfig Stephen Zhang
2023-02-20 9:32 ` Manivannan Sadhasivam
@ 2023-02-20 13:58 ` AngeloGioacchino Del Regno
1 sibling, 0 replies; 3+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-02-20 13:58 UTC (permalink / raw)
To: Stephen Zhang, jejb, artin.petersen, matthias.bgg, beanhuo,
bvanassche, avri.altman, yoshihiro.shimoda.uh
Cc: linux-scsi, linux-kernel, linux-arm-kernel, linux-mediatek,
zhangshida, k2ci
Il 20/02/23 09:32, Stephen Zhang ha scritto:
> From: Shida Zhang <zhangshida@kylinos.cn>
>
> From: Shida Zhang <zhangshida@kylinos.cn>
>
> In a configuration with CONFIG_SCSI_UFS_MEDIATEK set to 'm' and
> CONFIG_PM set to 'n', errors occur at compile time:
>
> ====
> ../drivers/ufs/host/ufs-mediatek.c: In function ‘ufs_mtk_runtime_suspend’:
> ../drivers/ufs/host/ufs-mediatek.c:1621:8: error: implicit declaration of function ‘ufshcd_runtime_suspend’; did you mean ‘ufs_mtk_runtime_suspend’? [-Werror=implicit-function-declaration]
> ../drivers/ufs/host/ufs-mediatek.c: In function ‘ufs_mtk_runtime_resume’:
> ../drivers/ufs/host/ufs-mediatek.c:1636:9: error: implicit declaration of function ‘ufshcd_runtime_resume’; did you mean ‘ufs_mtk_runtime_resume’? [-Werror=implicit-function-declaration]
> ====
>
That's wrong. This driver should be made to compile for both !CONFIG_PM
and CONFIG_PM.
Regards,
Angelo
> This patch fixes these by selecting CONFIG_PM from CONFIG_SCSI_UFS_MEDIATEK.
>
> Reported-by: k2ci <kernel-bot@kylinos.cn>
> Signed-off-by: Shida Zhang <zhangshida@kylinos.cn>
> ---
> drivers/ufs/host/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/ufs/host/Kconfig b/drivers/ufs/host/Kconfig
> index 4cc2dbd79ed0..f9786f085b54 100644
> --- a/drivers/ufs/host/Kconfig
> +++ b/drivers/ufs/host/Kconfig
> @@ -71,6 +71,7 @@ config SCSI_UFS_QCOM
> config SCSI_UFS_MEDIATEK
> tristate "Mediatek specific hooks to UFS controller platform driver"
> depends on SCSI_UFSHCD_PLATFORM && ARCH_MEDIATEK
> + select PM
> select PHY_MTK_UFS
> select RESET_TI_SYSCON
> help
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-20 13:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-20 8:32 [PATCH] scsi: ufs: Add select to CONFIG_PM in Kconfig Stephen Zhang
2023-02-20 9:32 ` Manivannan Sadhasivam
2023-02-20 13:58 ` AngeloGioacchino Del Regno
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).