Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp531358ybt; Wed, 8 Jul 2020 05:57:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNj4uv8r2C+2Zi4K+vjb+yAQ26jzcliz62FzyVHmGNK5yfgQCnKGThcnePmPQli1C3NgSn X-Received: by 2002:a17:906:841:: with SMTP id f1mr18108763ejd.229.1594213022093; Wed, 08 Jul 2020 05:57:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594213022; cv=none; d=google.com; s=arc-20160816; b=LTuYoPJMiG9Dou/TKaKWaTX+9mx5hjKzaPP272ZZ02TZ3vfll/+WmXs9fCg0idX33P QsCWF+8xkCkv9jIl837RAPDnQnYH3tHOKlnzeWOErBt4k/R8VAUncSA7eOjCXs31X3pK ff0Pc6oVLfkbWohy4TEkmjtQXxmIbUMvqAF5QFCEzGHbKnpeTjezy6JeAsTCVWWlcVQy hooNEM+KXMIUeJ6vB/UxSPmcB6q3GI68NFPk02tJ24/jlxpRJJZIzYe4Di8OQgkX0+A7 1/yTumYoDBijVQUFq/5dRcjwOA8Jd+0DBy2lvuYUoa2YefBhXbfa4nAUA+gotYOJVhAa +7NQ== 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:ironport-sdr:ironport-sdr; bh=+E3j8PSdmAOzJa8vk28TX3XxHQ84J1elWGDmCf6znaA=; b=ObEPOAw2RS8wJsgeeiSh5YVTsLPYzAbd/sggRDKHLJiLyYJ4qekI0s1F7Ly7JKM3M6 JU0W9hctap9KRalTSa6MZTlQ0db4EFZIoFLw1wZad0cb1+PZYsDFI6NljxlOHzJZ6dhc 3KU7jD2efycobEqI5vIzQQIw3mFs+PvR0HHFFz8AgSdFPQ8Yhn1DMQ1niof3lEYTUn7b Xb1XXbssEeXSj5TkfdQI/ZbiyC5URCLOSIkcfq9lT0PyRvSwoJWIxiD4c00QT/EHsJRF LWbOj/+oU38t5s5ArK2LYAjfM4LHV9rSY6S1pEfQbutKnS11TjnT0IMgddULogi0APD6 QJdA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l6si16953895edq.465.2020.07.08.05.56.38; Wed, 08 Jul 2020 05:57:02 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729203AbgGHMzc (ORCPT + 99 others); Wed, 8 Jul 2020 08:55:32 -0400 Received: from mga07.intel.com ([134.134.136.100]:34172 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728803AbgGHMzb (ORCPT ); Wed, 8 Jul 2020 08:55:31 -0400 IronPort-SDR: 54/6mK/DpLbtsCLzL6CQYF3HcMoVBy5NTWdeOxVCaaRFMg8kZ9DKOpFL86hEEFr6EhJUjVFdpY c/vBBoTJs5Vg== X-IronPort-AV: E=McAfee;i="6000,8403,9675"; a="212726291" X-IronPort-AV: E=Sophos;i="5.75,327,1589266800"; d="scan'208";a="212726291" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2020 05:55:30 -0700 IronPort-SDR: Suofd+7AXM9bgYprsc3aXwnwRy34R3yv6fE2zBFww32epVdK9ww47VGE/BD3lLFPYFZ/t9GI1I 5VBOwLBt5z7A== X-IronPort-AV: E=Sophos;i="5.75,327,1589266800"; d="scan'208";a="323870355" Received: from sare-mobl.amr.corp.intel.com (HELO [10.251.7.246]) ([10.251.7.246]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2020 05:55:30 -0700 Subject: Re: [PATCH v3 06/10] ASoC: sti: uniperif: fix 'defined by not used' warning To: Arnaud POULIQUEN , "alsa-devel@alsa-project.org" Cc: "tiwai@suse.de" , open list , Takashi Iwai , Liam Girdwood , "broonie@kernel.org" , Lee Jones References: <20200707191615.98296-1-pierre-louis.bossart@linux.intel.com> <20200707191615.98296-7-pierre-louis.bossart@linux.intel.com> From: Pierre-Louis Bossart Message-ID: <31969204-1ada-3775-64da-092ded0bff8f@linux.intel.com> Date: Wed, 8 Jul 2020 07:55:28 -0500 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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/8/20 4:11 AM, Arnaud POULIQUEN wrote: > 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 that's right, we both fixed the same things, and this is the merged series. Do you mind providing a tag if you're ok with the change? > 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, >>