From patchwork Thu Dec 3 22:29:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 336950 Delivered-To: patch@linaro.org Received: by 2002:a92:5e16:0:0:0:0:0 with SMTP id s22csp673039ilb; Thu, 3 Dec 2020 14:30:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJz8HMryMcugdeOaUkA5Lx1BQriuc4EXSuK7MDQV8JMT8yjF6MEaqLwzbjm+xwJjJbpcvlty X-Received: by 2002:a50:af65:: with SMTP id g92mr4885659edd.273.1607034622671; Thu, 03 Dec 2020 14:30:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607034622; cv=none; d=google.com; s=arc-20160816; b=SuWzAukGxUtVkE+qBpWBRO6zJ5HffUI/SR/RNDEMfEnrT0EkFMcU0ZifeuwuYGkhdY F/c+AueJ4Q6Fg2AsFEIggBunOJzgpxRpdgY7M2ksZOWmMA1A1DnI72NTk/ueejYF66mY C+r75U8XhsTA1IuJZINgWFFiCtDsvlrQSu8NNYRDUTZ0FZ+wQVV0Xb/7FbOamxbIOlbQ EjHNGGyAzIYq9MLlIU1JoZVmwdmtpGTRq3BVml/dgIWHJvAghCe1RyPPZ+doWjX4RObi 5FnNG2+Wqb1VQ6Wx2+RKNzSCviuFjaAQiCN+DAnv46vwpZU9B4nb/rpCDqb9nj4f/RDG khQg== 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 :message-id:date:subject:cc:to:from; bh=PwkqLVRgNMi2LQjm9rmE/g1N67BUnfwHrMfTQhuT1dU=; b=tBBbWErMYJxv9Qjsn22t6uLZWLOjkxXzc149Rp/Cl2x5Fyso9D7qARo5lhSBEWrbBN s6zcL8CXScnSs5sJwVpf/eu0fYscRIcoCHSlKTPxXGVSOl9/X5wcWqbAKOx0QyUyGlUb RXZb59JJU4GO3fQZX7AlcHjcYU33qRwWLU+2oGH+mhbhJZFeUOWj2wmvuexUIqeVCRM0 zV2dhDczvBRAlT3jOfSDFwqNCKcedmiV7KIHL2fhzLS/oVRB0CogO7Xl10zlQ+PZYa41 ttOKsqyR1Al7CxNbgviOFeeHLpmTXUqsfKI1r8qF29TRL9C3aoCJxl799s899/5kUPBT +2Zw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-mmc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k5si839281edj.176.2020.12.03.14.30.22; Thu, 03 Dec 2020 14:30:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-mmc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-mmc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726405AbgLCWaJ (ORCPT + 4 others); Thu, 3 Dec 2020 17:30:09 -0500 Received: from mail.kernel.org ([198.145.29.99]:54520 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725885AbgLCWaJ (ORCPT ); Thu, 3 Dec 2020 17:30:09 -0500 From: Arnd Bergmann Authentication-Results: mail.kernel.org; dkim=permerror (bad message/signature format) To: Chaotian Jing , Ulf Hansson , Matthias Brugger , Wenbin Mei Cc: Arnd Bergmann , Chun-Hung Wu , yong mao , Amey Narkhede , Marek Vasut , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] mmc: mediatek: mark PM functions as __maybe_unused Date: Thu, 3 Dec 2020 23:29:16 +0100 Message-Id: <20201203222922.1067522-1-arnd@kernel.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org From: Arnd Bergmann The #ifdef check for the suspend/resume functions is wrong: drivers/mmc/host/mtk-sd.c:2765:12: error: unused function 'msdc_suspend' [-Werror,-Wunused-function] static int msdc_suspend(struct device *dev) drivers/mmc/host/mtk-sd.c:2779:12: error: unused function 'msdc_resume' [-Werror,-Wunused-function] static int msdc_resume(struct device *dev) Remove the #ifdef and mark all four as __maybe_unused to aovid the problem. Fixes: c0a2074ac575 ("mmc: mediatek: Fix system suspend/resume support for CQHCI") Signed-off-by: Arnd Bergmann --- drivers/mmc/host/mtk-sd.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) -- 2.27.0 diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c index d057fb11112a..de09c6347524 100644 --- a/drivers/mmc/host/mtk-sd.c +++ b/drivers/mmc/host/mtk-sd.c @@ -2683,7 +2683,6 @@ static int msdc_drv_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM static void msdc_save_reg(struct msdc_host *host) { u32 tune_reg = host->dev_comp->pad_tune_reg; @@ -2742,7 +2741,7 @@ static void msdc_restore_reg(struct msdc_host *host) __msdc_enable_sdio_irq(host, 1); } -static int msdc_runtime_suspend(struct device *dev) +static int __maybe_unused msdc_runtime_suspend(struct device *dev) { struct mmc_host *mmc = dev_get_drvdata(dev); struct msdc_host *host = mmc_priv(mmc); @@ -2752,7 +2751,7 @@ static int msdc_runtime_suspend(struct device *dev) return 0; } -static int msdc_runtime_resume(struct device *dev) +static int __maybe_unused msdc_runtime_resume(struct device *dev) { struct mmc_host *mmc = dev_get_drvdata(dev); struct msdc_host *host = mmc_priv(mmc); @@ -2762,7 +2761,7 @@ static int msdc_runtime_resume(struct device *dev) return 0; } -static int msdc_suspend(struct device *dev) +static int __maybe_unused msdc_suspend(struct device *dev) { struct mmc_host *mmc = dev_get_drvdata(dev); int ret; @@ -2776,11 +2775,10 @@ static int msdc_suspend(struct device *dev) return pm_runtime_force_suspend(dev); } -static int msdc_resume(struct device *dev) +static int __maybe_unused msdc_resume(struct device *dev) { return pm_runtime_force_resume(dev); } -#endif static const struct dev_pm_ops msdc_dev_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(msdc_suspend, msdc_resume)