From patchwork Thu Sep 10 07:29:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 291777 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D473BC433E2 for ; Thu, 10 Sep 2020 07:30:51 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 34FB12078B for ; Thu, 10 Sep 2020 07:30:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="cqRAvEwi" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 34FB12078B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 33CAF844; Thu, 10 Sep 2020 09:29:58 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 33CAF844 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1599723048; bh=Ef8TkvKH+Gu2gMwmaDkICNJPw3AcfMtnVdzuI+raO6k=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=cqRAvEwikVhzi1vvel/Gnfcqg2KJjnLro6WXNLgGOyAkC5vAU3EKzeI45BW9waOrm s/ldL34sM5hcpWNp1z/npgT75Mzok0NtmT+qB9uDFMjTBap7n+9/bcy/ErT7Knr6RB WVk5Lea3w1SaKKEEKTLjPJoxPW+Ca8WUffCJrcBs= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 99073F801F2; Thu, 10 Sep 2020 09:29:57 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4C38CF80264; Thu, 10 Sep 2020 09:29:52 +0200 (CEST) Received: from huawei.com (szxga04-in.huawei.com [45.249.212.190]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 4C2F8F800D0 for ; Thu, 10 Sep 2020 09:29:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4C2F8F800D0 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 63B7C9D187AFAC1DC36D; Thu, 10 Sep 2020 15:29:38 +0800 (CST) Received: from localhost (10.174.179.108) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.487.0; Thu, 10 Sep 2020 15:29:31 +0800 From: YueHaibing To: , , , Subject: [PATCH -next] soundwire: intel: Fix -Wunused-function warning Date: Thu, 10 Sep 2020 15:29:06 +0800 Message-ID: <20200910072906.28284-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 In-Reply-To: <20200909131531.31380-1-yuehaibing@huawei.com> References: <20200909131531.31380-1-yuehaibing@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.174.179.108] X-CFilter-Loop: Reflected Cc: alsa-devel@alsa-project.org, YueHaibing , linux-kernel@vger.kernel.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" If CONFIG_PM is not set, build warns: drivers/soundwire/intel.c:488:12: warning: 'intel_link_power_down' defined but not used [-Wunused-function] Mark the functions __maybe_unused and remove the CONFIG_PM dependency. Signed-off-by: YueHaibing --- drivers/soundwire/intel.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index e047910d73f5..48ae8800594a 100644 --- a/drivers/soundwire/intel.c +++ b/drivers/soundwire/intel.c @@ -400,7 +400,7 @@ static void intel_shim_glue_to_master_ip(struct sdw_intel *sdw) } /* this needs to be called with shim_lock */ -static void intel_shim_master_ip_to_glue(struct sdw_intel *sdw) +static void __maybe_unused intel_shim_master_ip_to_glue(struct sdw_intel *sdw) { unsigned int link_id = sdw->instance; void __iomem *shim = sdw->link_res->shim; @@ -485,7 +485,7 @@ static void intel_shim_wake(struct sdw_intel *sdw, bool wake_enable) mutex_unlock(sdw->link_res->shim_lock); } -static int intel_link_power_down(struct sdw_intel *sdw) +static int __maybe_unused intel_link_power_down(struct sdw_intel *sdw) { u32 link_control, spa_mask, cpa_mask; unsigned int link_id = sdw->instance; @@ -1540,8 +1540,6 @@ int intel_master_process_wakeen_event(struct platform_device *pdev) * PM calls */ -#ifdef CONFIG_PM - static int __maybe_unused intel_suspend(struct device *dev) { struct sdw_cdns *cdns = dev_get_drvdata(dev); @@ -1596,7 +1594,7 @@ static int __maybe_unused intel_suspend(struct device *dev) return 0; } -static int intel_suspend_runtime(struct device *dev) +static int __maybe_unused intel_suspend_runtime(struct device *dev) { struct sdw_cdns *cdns = dev_get_drvdata(dev); struct sdw_intel *sdw = cdns_to_intel(cdns); @@ -1751,7 +1749,7 @@ static int __maybe_unused intel_resume(struct device *dev) return ret; } -static int intel_resume_runtime(struct device *dev) +static int __maybe_unused intel_resume_runtime(struct device *dev) { struct sdw_cdns *cdns = dev_get_drvdata(dev); struct sdw_intel *sdw = cdns_to_intel(cdns); @@ -1924,8 +1922,6 @@ static int intel_resume_runtime(struct device *dev) return ret; } -#endif - static const struct dev_pm_ops intel_pm = { SET_SYSTEM_SLEEP_PM_OPS(intel_suspend, intel_resume) SET_RUNTIME_PM_OPS(intel_suspend_runtime, intel_resume_runtime, NULL)