Re: [PATCH v3] scsi: ufs: mediatek: Guard runtime PM functions

From: AngeloGioacchino Del Regno
Date: Tue Feb 21 2023 - 08:53:42 EST


Il 21/02/23 12:38, Stephen Zhang ha scritto:
From: Shida Zhang <zhangshida@xxxxxxxxxx>

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]
====

Fix these errors by guarding the runtime PM functions with CONFIG_PM.

Reported-by: k2ci <kernel-bot@xxxxxxxxxx>
Signed-off-by: Shida Zhang <zhangshida@xxxxxxxxxx>
Reviewed-by: Manivannan Sadhasivam <mani@xxxxxxxxxx>

Reviewed-by: AngeloGioacchino Del Regno <angelogiaocchino.delregno@xxxxxxxxxxxxx>