Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp383142ybt; Wed, 8 Jul 2020 02:13:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx34NUB1EEHe8LG6ATGGk2VVt8sn2xITOtoZDjEM0OKMVmaHAEKREoyXuCGeMWQo7LIEEIf X-Received: by 2002:aa7:d3cd:: with SMTP id o13mr64187130edr.176.1594199634221; Wed, 08 Jul 2020 02:13:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594199634; cv=none; d=google.com; s=arc-20160816; b=VEakrmzzyNcgCyFZkImsYvK/SAs0I82M2qiEHoZ7LSG4SurLGKSopMmktQJUFLHlLE 7geun+IfM3unk5vUK59D7H9ip1OLV/lpXyjHYKuLaH7Ly21O4U1VVuEaz525eUmY9DnK +ON5z2M1LISPhDdRmh2t5AfyEOJXsdZuxXiU6OWj6i4+7uM52C6MyXAf/o19dqJ0WcD3 txoSonj9P0B8hjFrpc2aC33TmdcVOj56NjBR8fpaVemJgzwt/tKtpFDqL8mrELWZOcia I9x7ZTjStU8pEznDSvFMal4p6K/Y/3qNkrW2xohFwANMx4S0xSGmFLgPYX+ZnIEgVW37 XJxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=iawSYaeSKNtVm44sgn49UhCmyo15meIegOqh6x74E2M=; b=PTbojplt2fFecYy5+MfXhxuMcOhbIlVyCReMuNHS0q+++xTl+bp6guveF8ZaAR9K4d GGZhFyUx3+mHnulH4BsFEexp/AeRtjD3Z0bdHpqtoRWoyyvwF0IpUtYDkAfE7UVBFUJ8 Sqokbtp8wDk8s/SXgUmkQBFy8hqq7WEFrKQPD/VRr/L0D/y53t1PuN+hGNAKVnCbetth OlxgW5tK9MPR8OtL2AcD9sluyRK8Hba1efioNIQs0IW7YLXlS6ktENRkFbj6XApHyziv g8fM5l4Go1CuPV+Oka5d7D3xHldshyG/0gFO3kNNqd8baVv9jGcsSW5d8I8FZ0XyNfaq a4yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=TO0IWmej; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=st.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q24si16181571edw.193.2020.07.08.02.13.30; Wed, 08 Jul 2020 02:13:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=TO0IWmej; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727075AbgGHJNF (ORCPT + 99 others); Wed, 8 Jul 2020 05:13:05 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:25120 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728102AbgGHJNA (ORCPT ); Wed, 8 Jul 2020 05:13:00 -0400 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 06898mX7031611; Wed, 8 Jul 2020 11:12:06 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=STMicroelectronics; bh=iawSYaeSKNtVm44sgn49UhCmyo15meIegOqh6x74E2M=; b=TO0IWmejSbgi7SHJXFFD9ycY1Yz2bJiFrKk55e7vIsjjYRhwXn01v/NE2Fg6D1XxVL0c cZcHuW4kzDK+uLzkp3S3d7vB9C3sL2wEHr9JnbiBsBboeaLC3kRpPNGJ4dpZOuY5ulQ5 JG5Oiz+KAFYspXbJXwZe5SEaDp41aEJJY+GjCoWe/XCM7yWQkUNZDrzdZiWMl0FeRAI0 RghVB+2dhAf4tPKbOpJakxQGR7BmLt4s33BDj7vvbl9w0krkboSbqKP+dWD6cj5dVXNF AjAws0bd/3lFDpzkFW2WK9DMR7X/8ts7aDSyyZlC/LF8iXVzRHycrestry/rhxC/hUXb BQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 322f80xfwp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Jul 2020 11:12:06 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 470B910002A; Wed, 8 Jul 2020 11:12:04 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag3node1.st.com [10.75.127.7]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 0A8062222A6; Wed, 8 Jul 2020 11:12:00 +0200 (CEST) Received: from lmecxl0889.tpe.st.com (10.75.127.45) by SFHDAG3NODE1.st.com (10.75.127.7) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 8 Jul 2020 11:11:58 +0200 Subject: Re: [PATCH v3 06/10] ASoC: sti: uniperif: fix 'defined by not used' warning To: Pierre-Louis Bossart , "alsa-devel@alsa-project.org" CC: "tiwai@suse.de" , "broonie@kernel.org" , Lee Jones , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , open list References: <20200707191615.98296-1-pierre-louis.bossart@linux.intel.com> <20200707191615.98296-7-pierre-louis.bossart@linux.intel.com> From: Arnaud POULIQUEN Message-ID: Date: Wed, 8 Jul 2020 11:11:57 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200707191615.98296-7-pierre-louis.bossart@linux.intel.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.75.127.45] X-ClientProxiedBy: SFHDAG4NODE2.st.com (10.75.127.11) To SFHDAG3NODE1.st.com (10.75.127.7) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-07-08_04:2020-07-08,2020-07-08 signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Pierre-Louis, On 7/7/20 9:16 PM, Pierre-Louis Bossart wrote: > 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 Thanks for the patch, Seems that the same patch has already been proposed by Lee: https://www.spinics.net/lists/arm-kernel/msg820327.html Regards, Arnaud > --- > 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, >