From patchwork Thu Mar 7 10:11:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10842613 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C8400139A for ; Thu, 7 Mar 2019 10:13:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B2F222E183 for ; Thu, 7 Mar 2019 10:13:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A6F592E374; Thu, 7 Mar 2019 10:13:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F33FC2E183 for ; Thu, 7 Mar 2019 10:13:36 +0000 (UTC) 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 8EA0C86F; Thu, 7 Mar 2019 11:12:44 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8EA0C86F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1551953614; bh=Mft9ueOG70EL0Tu0q2T5GFKe8v3uKcwuoCfaK6DL/mo=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=cRFeBhEmdipdQrJs+HZrE+5JnR/qEDF76wVMlcnPmbZca+ch1DxHrmO5tZKCO4CiU 2QwO5WgqWejtEjfrfC/xV7olG9y5Je2pkxHhegX8sWJY1fFS0VpxPaZYdB9t3SzxhD h07UdC/M0E4qz9yPjMCifCe1HathkPY2F1fweyvM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 951CFF896FC; Thu, 7 Mar 2019 11:12:02 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1D1CDF8065A; Thu, 7 Mar 2019 11:12:01 +0100 (CET) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.135]) (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 9B5F2F8065A for ; Thu, 7 Mar 2019 11:11:58 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9B5F2F8065A Received: from wuerfel.lan ([109.192.41.194]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.129]) with ESMTPA (Nemesis) id 1MpDRv-1gjnOl0S9X-00qi2m; Thu, 07 Mar 2019 11:11:48 +0100 From: Arnd Bergmann To: Peter Ujfalusi , Mark Brown Date: Thu, 7 Mar 2019 11:11:30 +0100 Message-Id: <20190307101145.636705-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:k4DDxjibd8u11zOsPD7lZAVg/Zeo4oJO0PYetGd3gbXntL9v0Hc AYtFbBGvYEPhSGEF457096RqdOSZCEXJSDK9RIET+JNa1sOOrp1M/Ai9XyzwTqSEhx0mhKR 7Qpt40zFtoHG0j1rIpitct4VODtmyMd2xy5FChig9UsOOf0e62GXl7TsyuFHDtIWDBTST6A 7Ym+9KSwolmfdC7krcf0w== X-UI-Out-Filterresults: notjunk:1;V03:K0:aUhG0xnewKU=:uMK/tCaRRGiBWJ22FZMROg mUaoGPAR2iN9yXx0MVBRtC7A3d8qiEgyCY4chbEok1tZrhqgt38+94ydS1uRsTmfM9TKR3a+8 CE90Pr42BbHOzx3RngXMighOOetzJcA+l3oHqnFP0O6sKQwyn3kVUFmE48OlapO59DOYEEfA+ IFn2cNK/UbrrE/iltMMfzpszLUlJRgXCFPIBrtGKgybzhScpwQ+SWDtvWAJXSY+x0SXPJgksk d6u9L6QrWdH0vL9GujyHbM5HCpeEP/4mfE6zvmb4KF3JmSM1jYjNC3RWmdeOHwir7xuWPhZNR 0azzbsFMJg+QSlzF9JPkRxy6YZc/6cP8BimW+PMAmkBuh37s9R4OVw9XvqeLMnIcOXCbGLJ8g rpsEMOMxxkzIn46wJt+2v7xYAPuYZ8EVl4PzNLOnE3RUGFEieIN2CLI0CTv+7R2Fp26P9uxaI 5DoXMe1pTkxPYeDr3nDANmfNDnIc3ea27i1KhVpYLAyCDoUx2GiYwlPt+UscNvFs5ybCFFqCW mpg9y9j1GZeybeygtK+N1tq69JSpkH8o+ff6dDJPOaXrKb1DrHoUAdtvy4V5F4RaEYwrd0cvL EU1tIDpwyXKC1bHyGnaxB6WC2z7sdkDwgRUQy5pjp126kXaNqP/I9BwjNr5WCvgVLTeSYo3i0 M+CPXekxc5aBbB/uPZed50KW0UhcJjdZl9pKngxqJ3Q2+qDRUZAO1QM/E9DmQwS590S7DV9wL A9aVHX9iVYOKXodCV6+lJudSK8cI66xkTWkn7A== Cc: alsa-devel@alsa-project.org, Kees Cook , Arnd Bergmann , Tony Lindgren , linux-kernel@vger.kernel.org, Nick Desaulniers , Takashi Iwai , Liam Girdwood , Vishal Thanki Subject: [alsa-devel] [PATCH] ASoC: davinci-mcasp: Fix clang warning without CONFIG_PM 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" X-Virus-Scanned: ClamAV using ClamSMTP Building with clang shows a variable that is only used by the suspend/resume functions but defined outside of their #ifdef block: sound/soc/ti/davinci-mcasp.c:48:12: error: variable 'context_regs' is not needed and will not be emitted We commonly fix these by marking the PM functions as __maybe_unused, but here that would grow the davinci_mcasp structure, so instead add another #ifdef here. Fixes: 1cc0c054f380 ("ASoC: davinci-mcasp: Convert the context save/restore to use array") Signed-off-by: Arnd Bergmann Acked-by: Peter Ujfalusi Reviewed-by: Nathan Chancellor --- sound/soc/ti/davinci-mcasp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/ti/davinci-mcasp.c b/sound/soc/ti/davinci-mcasp.c index a3a67a8f0f54..9fbc759fdefe 100644 --- a/sound/soc/ti/davinci-mcasp.c +++ b/sound/soc/ti/davinci-mcasp.c @@ -45,6 +45,7 @@ #define MCASP_MAX_AFIFO_DEPTH 64 +#ifdef CONFIG_PM static u32 context_regs[] = { DAVINCI_MCASP_TXFMCTL_REG, DAVINCI_MCASP_RXFMCTL_REG, @@ -68,6 +69,7 @@ struct davinci_mcasp_context { u32 *xrsr_regs; /* for serializer configuration */ bool pm_state; }; +#endif struct davinci_mcasp_ruledata { struct davinci_mcasp *mcasp;