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.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, 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 2A931C433DF for ; Thu, 9 Jul 2020 16:23:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 06C61207DD for ; Thu, 9 Jul 2020 16:23:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728267AbgGIQXm (ORCPT ); Thu, 9 Jul 2020 12:23:42 -0400 Received: from mga17.intel.com ([192.55.52.151]:37037 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726408AbgGIQXm (ORCPT ); Thu, 9 Jul 2020 12:23:42 -0400 IronPort-SDR: MbOR8cxORikbbVz9T30uRWdCJLsPxTpvJCC/if62O3uxfnzm3XJOo11vAYidcd+JmCOzBtgqu/ zvOwqBrxMRzg== X-IronPort-AV: E=McAfee;i="6000,8403,9677"; a="128100519" X-IronPort-AV: E=Sophos;i="5.75,331,1589266800"; d="scan'208";a="128100519" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jul 2020 09:23:41 -0700 IronPort-SDR: KzUGfoalURuiIxELJefwg1H+FBc3WNXrvMOf2f8zmPdhtnNVYUyYTwLZLRJA3PgutpqmK+1VIY 5NpmjSl/m53g== X-IronPort-AV: E=Sophos;i="5.75,331,1589266800"; d="scan'208";a="280352965" Received: from mdcoakle-mobl.amr.corp.intel.com (HELO pbossart-mobl3.amr.corp.intel.com) ([10.255.231.43]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jul 2020 09:23:40 -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 v4 01/10] ASoC: sti: uniperif: fix 'defined by not used' warning Date: Thu, 9 Jul 2020 11:23:18 -0500 Message-Id: <20200709162328.259586-2-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200709162328.259586-1-pierre-louis.bossart@linux.intel.com> References: <20200709162328.259586-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 = { | ^~~~~~~~~~ Acked-by: Arnaud Pouliquen 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