From patchwork Wed Sep 26 19:37:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 147661 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp1121906lji; Wed, 26 Sep 2018 12:38:27 -0700 (PDT) X-Google-Smtp-Source: ACcGV614A0LXbrUGkha3Mg6yBfqHqFEyvgVeLUr2QaPUmXTZucYS0CSegT/wGvyayJrkQTNdT8nu X-Received: by 2002:a5d:4a12:: with SMTP id m18-v6mr2231000wrq.278.1537990707198; Wed, 26 Sep 2018 12:38:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537990707; cv=none; d=google.com; s=arc-20160816; b=vI7jVZnEVgxdK+71BY+eMKVfjYzNimzzTC4/XYix/y3yduGYByCTYNr9biazcCFpbC IoH103RsOkWkGdoYSQT4TwE0Yv5IE1yvAjga0ALs3uTeZawiKGtdZSXvuAeNGssbLV6Z B3G7CGzzWope3EbEP0vHMLU1bpGgbneEqP+gJfaUymyajIhxVHRI6P6Un6ERrAp2L9Da daF/8IDo1evZ0qjOupn3etWY2anzsT9oHgDONPqhwq+ngS6VJQwuDATuleRHPJVvfeMc dx0EITB3rCNGfRsugU6q7sYxocsDkEPkqx1vjGQxerouPdzgpdR0fNrAKsVt/UrCGgCQ FOXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:message-id:date:to:from:delivered-to; bh=tztEoh/gPaADphxb62UYN8ZtPu2Gw3C6BVzqbbzSKVM=; b=xLf3k1G2A9DhhQqVNOifYoekOMzohur2c4R6l2fkVfVXvJy7tzjPFSStCa9/XPmq6j mSsWHqa3X1QABlOCDCoM9ssCtFvikmc2y7rRSZMmuh2ycrUpU49oiX/6NFCxc1AzBexH lv09KgMNHAgJ6WUcxFXHUcv2tcrxvfJD8DaOLTKJMFhaA5si/0dpo/4V7mTT7/2aoN4W nnVMzXViexMP60TrGs8FT6O8zLonpQqGPsMaNrRGUz4iJv6+6OlfSJNuu7/q/xkOEELd FxAWrdt5oIYvif5sILKHAipIxn/l6tqwkjwRVEHodo/nG5LLY2bWBGSqkQuBBt2AAszQ pQ3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id q135-v6si277890wmd.36.2018.09.26.12.38.22; Wed, 26 Sep 2018 12:38:27 -0700 (PDT) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 542E82678BE; Wed, 26 Sep 2018 21:38:21 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 8B2AA2678BF; Wed, 26 Sep 2018 21:38:18 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE autolearn=disabled version=3.4.0 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.133]) by alsa0.perex.cz (Postfix) with ESMTP id 32D402678BA for ; Wed, 26 Sep 2018 21:38:15 +0200 (CEST) Received: from wuerfel.lan ([109.193.40.16]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1MMoOy-1gNsyj1pIa-00ImP7; Wed, 26 Sep 2018 21:37:53 +0200 From: Arnd Bergmann To: Mark Brown Date: Wed, 26 Sep 2018 21:37:40 +0200 Message-Id: <20180926193750.2468414-1-arnd@arndb.de> X-Mailer: git-send-email 2.18.0 X-Provags-ID: V03:K1:ta/u0qgWp0cmBz/Syz+o2PFf8tnus0PbJDhOwnfrQ2MQVvO0EWE IEuLWswjfu3lv10DsFfnijVua6FQvTbrLLxJ/3E9F6sxr4+uyqRYm10YiMJqNzNsyruwHjK iGHsq1PJlSkHJlkmck7x6RbBbT0y+ZISjb5ncTpuWV97d9yEYbSnd1dp2ZMYjZb82eqGMTe b8cQPiJcPbD7MX6q+oUPw== X-UI-Out-Filterresults: notjunk:1; V01:K0:I89YepxwDdw=:Rn2dZ4ApVZBRng68itqPrb zqq0gmfPzQ61jJfHXEF0gUYJ9DNi1MoxAkCr5wKE3MWGKrNbQwj/EP1MbgIyD+RKdE8ApLood DSiAXqvWao9gakxyed4HpJJtTsnbEaWATk/g7SYikuTdLgiiPv8dLrOv8CaN7z9zzeiEOliYC pcfiPjg1gZgllv1zZP7sL34GRbXHxHVieZWil2/FvMIqaAvy6dWla3yDt8207Qd7hXQVvwJT/ Sq1Nr5oMxzk3u5Ca4c8FpwzuUlXMOQ4uzlPi3rVofbX9yPxmtL8FjcfNkn0FVf2Cmza4nnYeo AzeBa6qnGuNaHpWzv4pDkcyz1ThFneAO7s18jRp8n5hH0HWoUo1BwXzgSvsByYPGs+SogVMKu AaAhokwoD0RRd/SORTVl6VjkHRCDOcuWSIKOuni/b5EWSwFZeug0Q9ZJfq3EEVFnsTLL4RDZt WDRSjpLX/pWE6dKb8ApeZ5bc40rymkGVUPWbuh7GDRWFicnCYV5C7JESaRiotf5+yfJZXZe3s IKLjFmu8Oo6haie0ICVpxS2WdRYojalqDSubP6DNciteTvVzsg7Y5/Vpv8NUvyFAuJ9eppbnQ 0z5TF1dCfz/kLVTZPaWVWBva9c7dx/r/w8uN8X74/stG2PZR8jf2hkLaIBmZ94s4T3qkTSNEk X0qdL7+eqGATreqOSpWBqOtUAAs6QhTuslgVyZNQWqvOcB54/Q0OK1XGQL1CRFevwBU4= Cc: alsa-devel@alsa-project.org, Charles Keepax , Kuninori Morimoto , Arnd Bergmann , Marcel Ziswiler , patches@opensource.cirrus.com, Takashi Iwai , Liam Girdwood , Fabio Estevam , Robert Jarzmik , linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH] ASoC: wm9712: fix unused variable warning X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org The 'ret' variable is now only used in an #ifdef, and causes a warning if it is declared outside of that block: sound/soc/codecs/wm9712.c: In function 'wm9712_soc_probe': sound/soc/codecs/wm9712.c:641:6: error: unused variable 'ret' [-Werror=unused-variable] Fixes: 2ed1a8e0ce8d ("ASoC: wm9712: add ac97 new bus support") Signed-off-by: Arnd Bergmann --- sound/soc/codecs/wm9712.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.18.0 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel Acked-by: Charles Keepax diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c index ade34c26ad2f..e873baa9e778 100644 --- a/sound/soc/codecs/wm9712.c +++ b/sound/soc/codecs/wm9712.c @@ -638,13 +638,14 @@ static int wm9712_soc_probe(struct snd_soc_component *component) { struct wm9712_priv *wm9712 = snd_soc_component_get_drvdata(component); struct regmap *regmap; - int ret; if (wm9712->mfd_pdata) { wm9712->ac97 = wm9712->mfd_pdata->ac97; regmap = wm9712->mfd_pdata->regmap; } else { #ifdef CONFIG_SND_SOC_AC97_BUS + int ret; + wm9712->ac97 = snd_soc_new_ac97_component(component, WM9712_VENDOR_ID, WM9712_VENDOR_ID_MASK); if (IS_ERR(wm9712->ac97)) {