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.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, 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 AA2BCC433DF for ; Tue, 7 Jul 2020 19:16:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8E1C7206E9 for ; Tue, 7 Jul 2020 19:16:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728722AbgGGTQn (ORCPT ); Tue, 7 Jul 2020 15:16:43 -0400 Received: from mga01.intel.com ([192.55.52.88]:5637 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728692AbgGGTQk (ORCPT ); Tue, 7 Jul 2020 15:16:40 -0400 IronPort-SDR: Y/n4nTHtD08uP2USfbUkgTjL7Oxsg2cPyg47YkvB1UF/3k4oz+D4g5BjHYUMbOjsjLZGkGI+XP 5uSWFaSAAzNQ== X-IronPort-AV: E=McAfee;i="6000,8403,9675"; a="165753003" X-IronPort-AV: E=Sophos;i="5.75,324,1589266800"; d="scan'208";a="165753003" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jul 2020 12:16:40 -0700 IronPort-SDR: /suSIlxaokPqR671iiUxFN6GYWeFBnGgoSr6SrYAdcFMWA592cksoAJz+aA+siuLWXuDPD6XE0 pqmOvKGkbfZg== X-IronPort-AV: E=Sophos;i="5.75,324,1589266800"; d="scan'208";a="388601639" Received: from mrtorger-mobl1.amr.corp.intel.com (HELO pbossart-mobl3.amr.corp.intel.com) ([10.254.77.62]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jul 2020 12:16:39 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Cc: tiwai@suse.de, broonie@kernel.org, Lee Jones , Pierre-Louis Bossart , Arnaud Pouliquen , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , linux-kernel@vger.kernel.org (open list) Subject: [PATCH v3 06/10] ASoC: sti: uniperif: fix 'defined by not used' warning Date: Tue, 7 Jul 2020 14:16:11 -0500 Message-Id: <20200707191615.98296-7-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200707191615.98296-1-pierre-louis.bossart@linux.intel.com> References: <20200707191615.98296-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix W=1 warning. The table uni_tdm_hw is declared in a header included by multiple C file. This isn't really a good practice but for now using __maybe_unused makes the following warning go away. sound/soc/sti/sti_uniperif.c:12: sound/soc/sti/uniperif.h:1351:38: warning: ‘uni_tdm_hw’ defined but not used [-Wunused-const-variable=] 1351 | static const struct snd_pcm_hardware uni_tdm_hw = { | ^~~~~~~~~~ Signed-off-by: Pierre-Louis Bossart --- sound/soc/sti/uniperif.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sti/uniperif.h b/sound/soc/sti/uniperif.h index 2dc2da5d458b..a16adeb7c1e9 100644 --- a/sound/soc/sti/uniperif.h +++ b/sound/soc/sti/uniperif.h @@ -1348,7 +1348,7 @@ struct sti_uniperiph_data { struct sti_uniperiph_dai dai_data; }; -static const struct snd_pcm_hardware uni_tdm_hw = { +static __maybe_unused const struct snd_pcm_hardware uni_tdm_hw = { .info = SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID, -- 2.25.1