From nobody Thu Dec 18 13:07:56 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2280C32772 for ; Tue, 23 Aug 2022 09:25:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350052AbiHWJZF (ORCPT ); Tue, 23 Aug 2022 05:25:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349494AbiHWJWu (ORCPT ); Tue, 23 Aug 2022 05:22:50 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E8318F944; Tue, 23 Aug 2022 01:35:33 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BFF6761475; Tue, 23 Aug 2022 08:35:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CBACBC433D7; Tue, 23 Aug 2022 08:35:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661243733; bh=Z6tw5p3I/8qPJhg9+be/JmAilsolo8TLCG5ED0j4UIM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t/JrvDdHy/jPK5GoEXk+UnVn1Qvzb799BM8J7kIwZ6nbLooNpK2a+zEWdaaFuLTMx yo1g5FEfFa7D+hre/8SwBv95PqfZZTaPv9IpukZ2qniXhbE3R3jMAh4zWyWfNdWZLA yWKOEQdoB1kTF6ivDFp/26gSrnOIp318YsZyxoWU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Stanley Chu , Ren Zhijie , "Martin K. Petersen" Subject: [PATCH 5.19 364/365] scsi: ufs: ufs-mediatek: Fix build error and type mismatch Date: Tue, 23 Aug 2022 10:04:25 +0200 Message-Id: <20220823080133.542900028@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080118.128342613@linuxfoundation.org> References: <20220823080118.128342613@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ren Zhijie commit f54912b228a8df6c0133e31bc75628677bb8c6e5 upstream. If CONFIG_PM_SLEEP is not set. make ARCH=3Darm64 CROSS_COMPILE=3Daarch64-linux-gnu-, will fail: drivers/ufs/host/ufs-mediatek.c: In function =E2=80=98ufs_mtk_vreg_fix_vcc= =E2=80=99: drivers/ufs/host/ufs-mediatek.c:688:46: warning: format =E2=80=98%u=E2=80= =99 expects argument of type =E2=80=98unsigned int=E2=80=99, but argument 4= has type =E2=80=98long unsigned int=E2=80=99 [-Wformat=3D] snprintf(vcc_name, MAX_VCC_NAME, "vcc-opt%u", res.a1); ~^ ~~~~~~ %lu drivers/ufs/host/ufs-mediatek.c: In function =E2=80=98ufs_mtk_system_suspen= d=E2=80=99: drivers/ufs/host/ufs-mediatek.c:1371:8: error: implicit declaration of func= tion =E2=80=98ufshcd_system_suspend=E2=80=99; did you mean =E2=80=98ufs_mtk= _system_suspend=E2=80=99? [-Werror=3Dimplicit-function-declaration] ret =3D ufshcd_system_suspend(dev); ^~~~~~~~~~~~~~~~~~~~~ ufs_mtk_system_suspend drivers/ufs/host/ufs-mediatek.c: In function =E2=80=98ufs_mtk_system_resume= =E2=80=99: drivers/ufs/host/ufs-mediatek.c:1386:9: error: implicit declaration of func= tion =E2=80=98ufshcd_system_resume=E2=80=99; did you mean =E2=80=98ufs_mtk_= system_resume=E2=80=99? [-Werror=3Dimplicit-function-declaration] return ufshcd_system_resume(dev); ^~~~~~~~~~~~~~~~~~~~ ufs_mtk_system_resume cc1: some warnings being treated as errors The declaration of func "ufshcd_system_suspend()" depends on CONFIG_PM_SLEEP, so the function wrapper ufs_mtk_system_suspend() should wrapped by CONFIG_PM_SLEEP too. Link: https://lore.kernel.org/r/20220619115432.205504-1-renzhijie2@huawei.c= om Fixes: 3fd23b8dfb54 ("scsi: ufs: ufs-mediatek: Fix the timing of configurin= g device regulators") Reported-by: Hulk Robot Reviewed-by: Stanley Chu Signed-off-by: Ren Zhijie Signed-off-by: Martin K. Petersen [only take the suspend/resume portion of the commit - gregkh] Signed-off-by: Greg Kroah-Hartman --- drivers/ufs/host/ufs-mediatek.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/ufs/host/ufs-mediatek.c +++ b/drivers/ufs/host/ufs-mediatek.c @@ -1220,6 +1220,7 @@ static int ufs_mtk_remove(struct platfor return 0; } =20 +#ifdef CONFIG_PM_SLEEP int ufs_mtk_system_suspend(struct device *dev) { struct ufs_hba *hba =3D dev_get_drvdata(dev); @@ -1242,6 +1243,7 @@ int ufs_mtk_system_resume(struct device =20 return ufshcd_system_resume(dev); } +#endif =20 int ufs_mtk_runtime_suspend(struct device *dev) {