Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3308428rwa; Tue, 23 Aug 2022 02:28:45 -0700 (PDT) X-Google-Smtp-Source: AA6agR4fjTQyR+e6SAbED21XyikWOEIJN50GuM+0uDys6PU4/8zOFxJ/1HueqxL1/DKt4MWqM2dY X-Received: by 2002:a05:6402:3324:b0:446:7bcc:6a93 with SMTP id e36-20020a056402332400b004467bcc6a93mr2971229eda.174.1661246925250; Tue, 23 Aug 2022 02:28:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661246925; cv=none; d=google.com; s=arc-20160816; b=WdfSB/st03iWd1jEsTgXrwrPxPcQM80hcmGlx0Qdn+J2HnJdLLAwr/9xi28R35bf5f Whaqtca0LKy+rKbgnPaBxT1aFgROL16a7oHfPJhmME6GreBntJIabn0yhuaEPeG+IP3M m0A8HyTcetcyOSfv+Im9vEO2Kh8JPB1DKEXYsTCPzoLtCdUEUBakfO0rOtLTSy73ejLX C7jzHn7JMACz0lJV+jtShnTK6FPSJdSsfYS/CnAMxJRa3WpxGd5NUhNYZkjmU9vrGoi2 Jw5cgevxgkiiDaVaMpBtBq5t1zU2UqDf/yvGD0cdcFiMV5Mc7CBJFPDvfZ9uq/Vl+oAe u1nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=n8JnTBW6mOl22++rGG+5YY05HtvlpWXKJUpY25aZdzg=; b=sZ8SloQG24slBHCoc7h4Puxqm9f5JVc5vTA4dCAHM5ThDTY44Gut4YeCb5VbD9O7Oe UrK8bVnKf+AyMQD0+zH+AmHcrMMFZ1o/P7fTbynlKlWZUJQQWZZHr6yYAsO4dJGAd8yN ER5PWBLyRmyLC/bHrF1CUVMxi5lKcQ6dN5r6YVVuuB57WDhk1TWOoXZH0Lce0GQuKECE /3ikVUqiPrH/xzTtfhct+IqmXc3/j2H2Fe7FQy1wv1/ueUUT5hVJs95FVdf+xU13OBeX LGczAUdbY0972ThoYwpEOutLW3eEgsWDccx/81ARkuLRqCcxLwSPGgz8fHnRQM9e4NCf VBqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="t/JrvDdH"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y12-20020a50e60c000000b0043e8539199bsi1530511edm.489.2022.08.23.02.28.18; Tue, 23 Aug 2022 02:28:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="t/JrvDdH"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350028AbiHWJZE (ORCPT + 99 others); Tue, 23 Aug 2022 05:25:04 -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: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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=arm64 CROSS_COMPILE=aarch64-linux-gnu-, will fail: drivers/ufs/host/ufs-mediatek.c: In function ‘ufs_mtk_vreg_fix_vcc’: drivers/ufs/host/ufs-mediatek.c:688:46: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 4 has type ‘long unsigned int’ [-Wformat=] snprintf(vcc_name, MAX_VCC_NAME, "vcc-opt%u", res.a1); ~^ ~~~~~~ %lu drivers/ufs/host/ufs-mediatek.c: In function ‘ufs_mtk_system_suspend’: drivers/ufs/host/ufs-mediatek.c:1371:8: error: implicit declaration of function ‘ufshcd_system_suspend’; did you mean ‘ufs_mtk_system_suspend’? [-Werror=implicit-function-declaration] ret = ufshcd_system_suspend(dev); ^~~~~~~~~~~~~~~~~~~~~ ufs_mtk_system_suspend drivers/ufs/host/ufs-mediatek.c: In function ‘ufs_mtk_system_resume’: drivers/ufs/host/ufs-mediatek.c:1386:9: error: implicit declaration of function ‘ufshcd_system_resume’; did you mean ‘ufs_mtk_system_resume’? [-Werror=implicit-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.com Fixes: 3fd23b8dfb54 ("scsi: ufs: ufs-mediatek: Fix the timing of configuring 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; } +#ifdef CONFIG_PM_SLEEP int ufs_mtk_system_suspend(struct device *dev) { struct ufs_hba *hba = dev_get_drvdata(dev); @@ -1242,6 +1243,7 @@ int ufs_mtk_system_resume(struct device return ufshcd_system_resume(dev); } +#endif int ufs_mtk_runtime_suspend(struct device *dev) {