From mboxrd@z Thu Jan 1 00:00:00 1970 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.0 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,T_DKIMWL_WL_HIGH,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 E48F5C28CC0 for ; Thu, 30 May 2019 03:20:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B482E24926 for ; Thu, 30 May 2019 03:20:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559186418; bh=+AqCDIM5UC3xb9nQVemPcQpfm/wHfY8NsDn9rFRZ2h0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=edwLmYSamRPIvRGPbp6TXdRLOOxniduZqpc5lKF5U3irZkHTKw25ztSZF41lM+kGD S7FjFd52y2xZ78B+KHSYJVgknl7T5F63sOxKR7OF4Ksw6a1Odb32NcdxLndQW9xzJB +w2Kaw9WUdtRvut3x/lhIPzHoDk9n8Xs14pDqwIE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732146AbfE3DUR (ORCPT ); Wed, 29 May 2019 23:20:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:57984 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730532AbfE3DUQ (ORCPT ); Wed, 29 May 2019 23:20:16 -0400 Received: from localhost (ip67-88-213-2.z213-88-67.customer.algx.net [67.88.213.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 205DD24918; Thu, 30 May 2019 03:20:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559186416; bh=+AqCDIM5UC3xb9nQVemPcQpfm/wHfY8NsDn9rFRZ2h0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Uu/LPoSu0p6tUpZBm4+cVXEMnOwRcaYYA2ZHn28a9w2RPUTJDxDlsf5Yopr6ZqBDG ZS/IDKdluHxjh/GS2EbizHPebxb7xa6bCRyskyY36hYCGE0LcZIUSgckGEYhmmXllD sVW5DG8mitWd3E83QtfAgYImGI7uO3L+2jlwo3sE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Peter Ujfalusi , Nathan Chancellor , Mark Brown , Sasha Levin Subject: [PATCH 4.14 189/193] ASoC: davinci-mcasp: Fix clang warning without CONFIG_PM Date: Wed, 29 May 2019 20:07:23 -0700 Message-Id: <20190530030513.204147560@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190530030446.953835040@linuxfoundation.org> References: <20190530030446.953835040@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org [ Upstream commit 8ca5104715cfd14254ea5aecc390ae583b707607 ] 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 Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/davinci/davinci-mcasp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c index f395bbc7c3545..9aa741d272798 100644 --- a/sound/soc/davinci/davinci-mcasp.c +++ b/sound/soc/davinci/davinci-mcasp.c @@ -43,6 +43,7 @@ #define MCASP_MAX_AFIFO_DEPTH 64 +#ifdef CONFIG_PM static u32 context_regs[] = { DAVINCI_MCASP_TXFMCTL_REG, DAVINCI_MCASP_RXFMCTL_REG, @@ -65,6 +66,7 @@ struct davinci_mcasp_context { u32 *xrsr_regs; /* for serializer configuration */ bool pm_state; }; +#endif struct davinci_mcasp_ruledata { struct davinci_mcasp *mcasp; -- 2.20.1