From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966806AbdEWTtN (ORCPT ); Tue, 23 May 2017 15:49:13 -0400 Received: from mga02.intel.com ([134.134.136.20]:9796 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1764395AbdEWTtL (ORCPT ); Tue, 23 May 2017 15:49:11 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,383,1491289200"; d="scan'208";a="106069596" Subject: Re: [alsa-devel] [PATCH] ASoC: cht_bsw_max98090_ti: Remove unused function cht_get_codec_dai() To: Matthias Kaehlcke References: <20170523190509.59212-1-mka@chromium.org> <6f941eb4-04b9-89ea-a791-c65c939581cf@linux.intel.com> <20170523193239.GP141096@google.com> Cc: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Yang A Fang , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Douglas Anderson From: Pierre-Louis Bossart Message-ID: <0070e2cf-3b8b-9440-06c0-3eb284c517a3@linux.intel.com> Date: Tue, 23 May 2017 12:49:03 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170523193239.GP141096@google.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/23/17 12:32 PM, Matthias Kaehlcke wrote: > Hi Pierre-Louis, > > El Tue, May 23, 2017 at 12:25:17PM -0700 Pierre-Louis Bossart ha dit: > >> On 5/23/17 12:05 PM, Matthias Kaehlcke wrote: >>> Looks like the function has never been used since it was added by commit >>> 17119a465706 ("ASoC: Intel: Add Cherrytrail & Braswell machine driver >>> cht_bsw_max98090_ti"). Removing it fixes the following warning when >>> building with clang: >>> >>> sound/soc/intel/boards/cht_bsw_max98090_ti.c:42:35: error: unused >>> function 'cht_get_codec_dai' [-Werror,-Wunused-function] >> >> Fine but it'll have to be re-added when I finally find the time to >> support Baytrail with this driver. > > If you have plans to add the code in a nearish future it is probably > not worth to do the removal, unless the maintainers think otherwise. I have patches for this on github, but I've been unable to force the Rambi system I have into submission to boot my image from USB. https://github.com/plbossart/sound/commit/756c912a3da1c7e40bb98ea726a1508c5e0191e2 Like I said, it's fine if you want to get rid of the warning for now, I am not going to be able to work on this before August. > >>> Signed-off-by: Matthias Kaehlcke >>> --- >>> sound/soc/intel/boards/cht_bsw_max98090_ti.c | 12 ------------ >>> 1 file changed, 12 deletions(-) >>> >>> diff --git a/sound/soc/intel/boards/cht_bsw_max98090_ti.c b/sound/soc/intel/boards/cht_bsw_max98090_ti.c >>> index 742bc0d4e681..20755ecc7f9e 100644 >>> --- a/sound/soc/intel/boards/cht_bsw_max98090_ti.c >>> +++ b/sound/soc/intel/boards/cht_bsw_max98090_ti.c >>> @@ -39,18 +39,6 @@ struct cht_mc_private { >>> bool ts3a227e_present; >>> }; >>> >>> -static inline struct snd_soc_dai *cht_get_codec_dai(struct snd_soc_card *card) >>> -{ >>> - struct snd_soc_pcm_runtime *rtd; >>> - >>> - list_for_each_entry(rtd, &card->rtd_list, list) { >>> - if (!strncmp(rtd->codec_dai->name, CHT_CODEC_DAI, >>> - strlen(CHT_CODEC_DAI))) >>> - return rtd->codec_dai; >>> - } >>> - return NULL; >>> -} >>> - >>> static const struct snd_soc_dapm_widget cht_dapm_widgets[] = { >>> SND_SOC_DAPM_HP("Headphone", NULL), >>> SND_SOC_DAPM_MIC("Headset Mic", NULL), >>> >>