lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d1474fc0-3eba-f1c3-6e63-0db8ce4ab07f@huawei.com>
Date:   Mon, 11 Jul 2022 09:23:40 +0800
From:   Ren Zhijie <renzhijie2@...wei.com>
To:     <stanley.chu@...iatek.com>, <jejb@...ux.ibm.com>,
        <martin.petersen@...cle.com>, <matthias.bgg@...il.com>,
        <bvanassche@....org>
CC:     <linux-scsi@...r.kernel.org>, <linux-mediatek@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH -next] scsi: ufs: ufs-mediatek: Fix build error

Hi,

Just friendly ping...

在 2022/7/4 10:56, Ren Zhijie 写道:
> If CONFIG_PM is not set,
> make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-, will be failed, like this:
> drivers/ufs/host/ufs-mediatek.c: In function ‘ufs_mtk_runtime_suspend’:
> drivers/ufs/host/ufs-mediatek.c:1435:8: error: implicit declaration of function ‘ufshcd_runtime_suspend’; did you mean ‘ufs_mtk_runtime_suspend’? [-Werror=implicit-function-declaration]
>    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:1450:9: error: implicit declaration of function ‘ufshcd_runtime_resume’; did you mean ‘ufs_mtk_runtime_resume’? [-Werror=implicit-function-declaration]
>    return ufshcd_runtime_resume(dev);
>           ^~~~~~~~~~~~~~~~~~~~~
>           ufs_mtk_runtime_resume
> At top level:
> drivers/ufs/host/ufs-mediatek.c:1444:12: error: ‘ufs_mtk_runtime_resume’ defined but not used [-Werror=unused-function]
>   static int ufs_mtk_runtime_resume(struct device *dev)
>              ^~~~~~~~~~~~~~~~~~~~~~
> drivers/ufs/host/ufs-mediatek.c:1430:12: error: ‘ufs_mtk_runtime_suspend’ defined but not used [-Werror=unused-function]
>   static int ufs_mtk_runtime_suspend(struct device *dev)
>              ^~~~~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
>
> The declarations of func "ufshcd_runtime_suspend()" and "ufshcd_runtime_resume()" depended on CONFIG_PM, so the function wrappers "ufs_mtk_runtime_suspend()" and "ufs_mtk_runtime_resume()"  both should warpped by CONFIG_PM too.
>
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Fixes: e7bf1d50063c ("scsi: ufs: ufs-mediatek: Fix build warnings")
> Signed-off-by: Ren Zhijie <renzhijie2@...wei.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 c958279bdd8f..e006c2528a3a 100644
> --- a/drivers/ufs/host/ufs-mediatek.c
> +++ b/drivers/ufs/host/ufs-mediatek.c
> @@ -1427,6 +1427,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);
> @@ -1449,6 +1450,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,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ