From patchwork Tue Apr 28 21:28:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 192853 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=-9.8 required=3.0 tests=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 1EF45C83000 for ; Tue, 28 Apr 2020 21:30:26 +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 9BD6F20730 for ; Tue, 28 Apr 2020 21:30:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="KVcqHw2L" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9BD6F20730 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arndb.de 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 028091687; Tue, 28 Apr 2020 23:29:34 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 028091687 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1588109424; bh=n6EOrFbNlRyOni08Xmza/+ml16DI3DOWSj6m+38S1kk=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=KVcqHw2LDSRfQw13RsaLwn3NOi3ga1Z69R6nGh818yHXXbfb7uG/Ik+7Gvuiub4Lc YQNSjl+Yw1jIyYJNHd+XR8a/oJ9hBl+N0rEAtqXqqRKIPSyec6OlUDTIW2+d9RxvEC QJ/xwFITGm7AahrKzs5NFqXsMs37aaZSHGUNcBY0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C817EF80292; Tue, 28 Apr 2020 23:29:04 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0B23EF80299; Tue, 28 Apr 2020 23:29:03 +0200 (CEST) Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 3CA25F80290 for ; Tue, 28 Apr 2020 23:28:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3CA25F80290 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1MowOm-1ipG1f4B2s-00qQ8m; Tue, 28 Apr 2020 23:28:50 +0200 From: Arnd Bergmann To: Timur Tabi , Nicolin Chen , Xiubo Li , Liam Girdwood , Mark Brown Subject: [PATCH] ASoC: fsl_easrc: mark PM functions __maybe_unused Date: Tue, 28 Apr 2020 23:28:08 +0200 Message-Id: <20200428212847.2926376-1-arnd@arndb.de> X-Mailer: git-send-email 2.26.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:g/lhTMinUlzKjoBIslu8GiMzNGRtNXY/jrd3tcEcByZM7OBbtB4 ni0GNMk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wR+FQ= Cc: alsa-devel@alsa-project.org, Arnd Bergmann , linux-kernel@vger.kernel.org, Shengjiu Wang , Takashi Iwai , Cosmin-Gabriel Samoila , Fabio Estevam 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" ifdefs are hard, and in this driver the suspend/resume functions are the only callers of some other helpers that trigger a harmless warning when CONFIG_PM is disabled: sound/soc/fsl/fsl_easrc.c:1807:12: warning: 'fsl_easrc_get_firmware' defined but not used [-Wunused-function] 1807 | static int fsl_easrc_get_firmware(struct fsl_asrc *easrc) | ^~~~~~~~~~~~~~~~~~~~~~ sound/soc/fsl/fsl_easrc.c:303:12: warning: 'fsl_easrc_resampler_config' defined but not used [-Wunused-function] 303 | static int fsl_easrc_resampler_config(struct fsl_asrc *easrc) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ Remove the #ifdef and just mark the callers as __maybe_unused to suppress the warnings altogether. Fixes: 955ac624058f ("ASoC: fsl_easrc: Add EASRC ASoC CPU DAI drivers") Signed-off-by: Arnd Bergmann --- sound/soc/fsl/fsl_easrc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/fsl_easrc.c b/sound/soc/fsl/fsl_easrc.c index 20326bffab64..c6b5eb2d2af7 100644 --- a/sound/soc/fsl/fsl_easrc.c +++ b/sound/soc/fsl/fsl_easrc.c @@ -1997,8 +1997,7 @@ static int fsl_easrc_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM -static int fsl_easrc_runtime_suspend(struct device *dev) +static __maybe_unused int fsl_easrc_runtime_suspend(struct device *dev) { struct fsl_asrc *easrc = dev_get_drvdata(dev); struct fsl_easrc_priv *easrc_priv = easrc->private; @@ -2015,7 +2014,7 @@ static int fsl_easrc_runtime_suspend(struct device *dev) return 0; } -static int fsl_easrc_runtime_resume(struct device *dev) +static __maybe_unused int fsl_easrc_runtime_resume(struct device *dev) { struct fsl_asrc *easrc = dev_get_drvdata(dev); struct fsl_easrc_priv *easrc_priv = easrc->private; @@ -2094,7 +2093,6 @@ static int fsl_easrc_runtime_resume(struct device *dev) clk_disable_unprepare(easrc->mem_clk); return ret; } -#endif /* CONFIG_PM */ static const struct dev_pm_ops fsl_easrc_pm_ops = { SET_RUNTIME_PM_OPS(fsl_easrc_runtime_suspend,