From patchwork Tue Jul 7 10:16:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 11648291 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 849C26C1 for ; Tue, 7 Jul 2020 10:32:41 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1AB0A2065F for ; Tue, 7 Jul 2020 10:32:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="TyNrd6Rb"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="RJJDMHb5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1AB0A2065F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id A040910E; Tue, 7 Jul 2020 12:31:52 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A040910E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1594117959; bh=NCtYYHmh/Hk6m+9uLA0/GithztxMt6Zw9EiRAcooUf8=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=TyNrd6Rbd5RhTfHAYZs/I/fkXTSeK/fl3Uyafr9UdDPUJLezUZ4oeE1BAzs8GAwBl sxCOFvXNCIH/3GmYD+5h85d9JNlFei5s76x+cvuJoC5mWtNkjUWrwM0P5bM29hjDKA DjTxhcG9Npik6KcfvrSF0P1bpwJBFGllCR6JVOkY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E5E19F803C9; Tue, 7 Jul 2020 12:18:00 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id E1A17F80345; Tue, 7 Jul 2020 12:17:40 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 4B805F8031A for ; Tue, 7 Jul 2020 12:17:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4B805F8031A Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="RJJDMHb5" Received: by mail-wm1-x342.google.com with SMTP id g75so42669565wme.5 for ; Tue, 07 Jul 2020 03:17:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Uo5lua4EqbM6dOWxZ2PX5/59WiGZNeMIYC5zygYLP+w=; b=RJJDMHb5PseEHV13fK3dntfY0SifRUv3KOer7kIUTRvgXuZ4xlS45hcCxG5BKlewVC 3hP+gmb2xP8RQZ4rXrBu7OAMcj1IjYnk/Hq8f5w+JQIvyEKO1gCKJqlBEWxmNCyou+gh RVSC+T3bqxktFOZj/7Cj+oOt0FWUcOpX2WZL3ggGMoRNb3BBwPGNOjBsphEau4CyJlWx HRhZzBsx+Zeb3zzu6VHY6FFwmBLm0Xf3cA5G6VqXRm+bw6pVJKQSqdh+a+CDvFyxFPZm tt7mqjlndBOcwoFBaY1YXUAZ/dYDPaXolLxY/JRUFFiXiX+li4ymLYlyNAFDfkDvl0fJ 28eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Uo5lua4EqbM6dOWxZ2PX5/59WiGZNeMIYC5zygYLP+w=; b=FBHo022GP5rYoXPnJUMRsWpcbYSjVK8cThRnoAtCEUZ4VL426sg29zKUJlDFVdVBV/ X0lJiHdbazdgMGo4KqxRm+22POBqtcVfWt89cp1pWAusHhuKmH+eJL2cRndOOLrWNSxo b4qt79EVDb5I0TOcC8REVcdC0XQyacAA3CBjwyUNv1LAXaXHNbho0ioXcsi4ncBPMFIf ZgW2Ja+ZrFoeyB61OgdiCWkRtwoZVbtMWA5yMc3HjePirYjFEj0jK0T9KGfIuF5x+W02 SpZHesPGamjz4iHqwNjNHfVlDbE0CTBRp/hQ2A9T6tGd870TaiWzLABBFBqOn+DMD1IQ a1ig== X-Gm-Message-State: AOAM532n1RdXXBL1FgVh/5CIBbZfps/5qbsTJpkMchKUhNq94Dw75Ik/ tfOZoEIl5aPL8XRDF5m9TK6Z1yUW2R8= X-Google-Smtp-Source: ABdhPJwBZScVrLRaoB2qbt1B7gPdAiGWJE3GpDYVPkVBQkQeuhCY3G1NK1G3mX96r9YIsd6G8GLX1g== X-Received: by 2002:a7b:c38c:: with SMTP id s12mr3392098wmj.136.1594117039808; Tue, 07 Jul 2020 03:17:19 -0700 (PDT) Received: from localhost.localdomain ([2.27.35.206]) by smtp.gmail.com with ESMTPSA id z8sm469409wmg.39.2020.07.07.03.17.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jul 2020 03:17:19 -0700 (PDT) From: Lee Jones To: broonie@kernel.org, lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com Subject: [PATCH 26/28] ASoC: codecs: rt5659: Remove many unused const variables Date: Tue, 7 Jul 2020 11:16:40 +0100 Message-Id: <20200707101642.1747944-27-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200707101642.1747944-1-lee.jones@linaro.org> References: <20200707101642.1747944-1-lee.jones@linaro.org> MIME-Version: 1.0 Cc: Oder Chiou , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Bard Liao , Lee Jones , linux-arm-kernel@lists.infradead.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Looks as though they've never been used. Fixes the following W=1 kernel build warning(s): In file included from sound/soc/codecs/rt5659.c:25: In file included from sound/soc/codecs/rt5659.c:25: sound/soc/codecs/rt5659.c:1232:2: warning: ‘rt5659_ad_monor_asrc_enum’ defined but not used [-Wunused-const-variable=] 1232 | rt5659_ad_monor_asrc_enum, RT5659_ASRC_3, RT5659_AD_MONO_R_T_SFT, 0x7, | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/sound/soc.h:359:24: note: in definition of macro ‘SOC_VALUE_ENUM_DOUBLE_DECL’ 359 | const struct soc_enum name = SOC_VALUE_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, | ^~~~ sound/soc/codecs/rt5659.c:1231:8: note: in expansion of macro ‘SOC_VALUE_ENUM_SINGLE_DECL’ 1231 | static SOC_VALUE_ENUM_SINGLE_DECL( | ^~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/rt5659.c:1228:2: warning: ‘rt5659_ad_monol_asrc_enum’ defined but not used [-Wunused-const-variable=] 1228 | rt5659_ad_monol_asrc_enum, RT5659_ASRC_3, RT5659_AD_MONO_L_T_SFT, 0x7, | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/sound/soc.h:359:24: note: in definition of macro ‘SOC_VALUE_ENUM_DOUBLE_DECL’ 359 | const struct soc_enum name = SOC_VALUE_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, | ^~~~ sound/soc/codecs/rt5659.c:1227:8: note: in expansion of macro ‘SOC_VALUE_ENUM_SINGLE_DECL’ 1227 | static SOC_VALUE_ENUM_SINGLE_DECL( | ^~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/rt5659.c:1224:2: warning: ‘rt5659_ad_sto2_asrc_enum’ defined but not used [-Wunused-const-variable=] 1224 | rt5659_ad_sto2_asrc_enum, RT5659_ASRC_3, RT5659_AD_STO2_T_SFT, 0x7, | ^~~~~~~~~~~~~~~~~~~~~~~~ include/sound/soc.h:359:24: note: in definition of macro ‘SOC_VALUE_ENUM_DOUBLE_DECL’ 359 | const struct soc_enum name = SOC_VALUE_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, | ^~~~ sound/soc/codecs/rt5659.c:1223:8: note: in expansion of macro ‘SOC_VALUE_ENUM_SINGLE_DECL’ 1223 | static SOC_VALUE_ENUM_SINGLE_DECL( | ^~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/rt5659.c:1220:2: warning: ‘rt5659_ad_sto1_asrc_enum’ defined but not used [-Wunused-const-variable=] 1220 | rt5659_ad_sto1_asrc_enum, RT5659_ASRC_2, RT5659_AD_STO1_T_SFT, 0x7, | ^~~~~~~~~~~~~~~~~~~~~~~~ include/sound/soc.h:359:24: note: in definition of macro ‘SOC_VALUE_ENUM_DOUBLE_DECL’ 359 | const struct soc_enum name = SOC_VALUE_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, | ^~~~ sound/soc/codecs/rt5659.c:1219:8: note: in expansion of macro ‘SOC_VALUE_ENUM_SINGLE_DECL’ 1219 | static SOC_VALUE_ENUM_SINGLE_DECL( | ^~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/rt5659.c:1216:2: warning: ‘rt5659_da_monor_asrc_enum’ defined but not used [-Wunused-const-variable=] 1216 | rt5659_da_monor_asrc_enum, RT5659_ASRC_2, RT5659_DA_MONO_R_T_SFT, 0x7, | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/sound/soc.h:359:24: note: in definition of macro ‘SOC_VALUE_ENUM_DOUBLE_DECL’ 359 | const struct soc_enum name = SOC_VALUE_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, | ^~~~ sound/soc/codecs/rt5659.c:1215:8: note: in expansion of macro ‘SOC_VALUE_ENUM_SINGLE_DECL’ 1215 | static SOC_VALUE_ENUM_SINGLE_DECL( | ^~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/rt5659.c:1212:2: warning: ‘rt5659_da_monol_asrc_enum’ defined but not used [-Wunused-const-variable=] 1212 | rt5659_da_monol_asrc_enum, RT5659_ASRC_2, RT5659_DA_MONO_L_T_SFT, 0x7, | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/sound/soc.h:359:24: note: in definition of macro ‘SOC_VALUE_ENUM_DOUBLE_DECL’ 359 | const struct soc_enum name = SOC_VALUE_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, | ^~~~ sound/soc/codecs/rt5659.c:1211:8: note: in expansion of macro ‘SOC_VALUE_ENUM_SINGLE_DECL’ 1211 | static SOC_VALUE_ENUM_SINGLE_DECL( | ^~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/rt5659.c:1208:2: warning: ‘rt5659_da_sto_asrc_enum’ defined but not used [-Wunused-const-variable=] 1208 | rt5659_da_sto_asrc_enum, RT5659_ASRC_2, RT5659_DA_STO_T_SFT, 0x7, | ^~~~~~~~~~~~~~~~~~~~~~~ include/sound/soc.h:359:24: note: in definition of macro ‘SOC_VALUE_ENUM_DOUBLE_DECL’ 359 | const struct soc_enum name = SOC_VALUE_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, | ^~~~ sound/soc/codecs/rt5659.c:1207:8: note: in expansion of macro ‘SOC_VALUE_ENUM_SINGLE_DECL’ 1207 | static SOC_VALUE_ENUM_SINGLE_DECL( | ^~~~~~~~~~~~~~~~~~~~~~~~~~ Cc: Oder Chiou Cc: Bard Liao Signed-off-by: Lee Jones --- sound/soc/codecs/rt5659.c | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/sound/soc/codecs/rt5659.c b/sound/soc/codecs/rt5659.c index 541fc6f1089bb..41e5917b16a5e 100644 --- a/sound/soc/codecs/rt5659.c +++ b/sound/soc/codecs/rt5659.c @@ -1195,43 +1195,6 @@ static const struct snd_kcontrol_new rt5659_if3_dac_swap_mux = static const struct snd_kcontrol_new rt5659_if3_adc_swap_mux = SOC_DAPM_ENUM("IF3 ADC Swap Source", rt5659_if3_adc_enum); -static const char * const rt5659_asrc_clk_src[] = { - "clk_sysy_div_out", "clk_i2s1_track", "clk_i2s2_track", - "clk_i2s3_track", "clk_sys2", "clk_sys3" -}; - -static unsigned int rt5659_asrc_clk_map_values[] = { - 0, 1, 2, 3, 5, 6, -}; - -static SOC_VALUE_ENUM_SINGLE_DECL( - rt5659_da_sto_asrc_enum, RT5659_ASRC_2, RT5659_DA_STO_T_SFT, 0x7, - rt5659_asrc_clk_src, rt5659_asrc_clk_map_values); - -static SOC_VALUE_ENUM_SINGLE_DECL( - rt5659_da_monol_asrc_enum, RT5659_ASRC_2, RT5659_DA_MONO_L_T_SFT, 0x7, - rt5659_asrc_clk_src, rt5659_asrc_clk_map_values); - -static SOC_VALUE_ENUM_SINGLE_DECL( - rt5659_da_monor_asrc_enum, RT5659_ASRC_2, RT5659_DA_MONO_R_T_SFT, 0x7, - rt5659_asrc_clk_src, rt5659_asrc_clk_map_values); - -static SOC_VALUE_ENUM_SINGLE_DECL( - rt5659_ad_sto1_asrc_enum, RT5659_ASRC_2, RT5659_AD_STO1_T_SFT, 0x7, - rt5659_asrc_clk_src, rt5659_asrc_clk_map_values); - -static SOC_VALUE_ENUM_SINGLE_DECL( - rt5659_ad_sto2_asrc_enum, RT5659_ASRC_3, RT5659_AD_STO2_T_SFT, 0x7, - rt5659_asrc_clk_src, rt5659_asrc_clk_map_values); - -static SOC_VALUE_ENUM_SINGLE_DECL( - rt5659_ad_monol_asrc_enum, RT5659_ASRC_3, RT5659_AD_MONO_L_T_SFT, 0x7, - rt5659_asrc_clk_src, rt5659_asrc_clk_map_values); - -static SOC_VALUE_ENUM_SINGLE_DECL( - rt5659_ad_monor_asrc_enum, RT5659_ASRC_3, RT5659_AD_MONO_R_T_SFT, 0x7, - rt5659_asrc_clk_src, rt5659_asrc_clk_map_values); - static int rt5659_hp_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) {