Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2427668imm; Sat, 29 Sep 2018 19:19:28 -0700 (PDT) X-Google-Smtp-Source: ACcGV60Nkn/oW+sE40zugXc/odGK8pli3+H1HKGAcGpRGKcZrDtfu9kCQpbtcFYHxpJMTD6c2hq/ X-Received: by 2002:a63:d048:: with SMTP id s8-v6mr4785037pgi.311.1538273968039; Sat, 29 Sep 2018 19:19:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538273968; cv=none; d=google.com; s=arc-20160816; b=cXfQHI5/lQ7+PmPUT1zzwDPEorcv0J1FhVXSffYn+WJLas4RNfZJS+5/xcaCZ94rfz wb+B3SlkhdKPTMBK/yDuZAXRBvlT3SZ2wmCWcggQZpekB23bkdhs8sXCKGlu1de25Oy3 5hUGaU7UdNuvzFNcijbVUVwjxPB46Hi8MHsRnGJI9rdB5Emq1ZJyWRtA0abrzdfdOiyN SdSVqIy6QrZvycEYikS+O710glSKH4MDTxZ7cEU/WCHl7PKXqGA/RQOK/+RKj6yTRhjG C3B0mxXemhmdlQw0N+eBIX8+15M4dJDnai2kA5Sxt2NFJ7ZK0Re5u07uw7HMffSS/ToC 6Luw== 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:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=vNFpYSvqHIbw1UVqyA4xFWYA7J4q8s82I1lTfJ5iEtk=; b=ppesGB+w48eqxr2cuHIYEEmliFdKfPACdSO74N6V1Jnd0D4rUVSS2U3Tft/Og/mM4u qpAJuD2qYn6VFptsUlQUv+XSlslpFreNTH6SZUpKzkYEYasxsbKITqwk/oLvX4yz08d/ B3n6HQRvZOAEUNw17OQudPzlcE+c6iyRPAOeuZjysncM1+fmN6RUF5mMjgq3jTwEgF7t o6WtYLFZHtGwCiGfilqb4bL9DqJTh1wYM9yhDzXYNrSiJqxAY+gabV2wFkJIx5kmnnOK u2BcvqnukJSnu1V1nurxGIkNai8/gARPHwoPKDnIej22xpO9Rbbz/GNys2Wm7LWqFrep SRCw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o2-v6si4799908pgj.111.2018.09.29.19.19.13; Sat, 29 Sep 2018 19:19:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727574AbeI3ItE (ORCPT + 99 others); Sun, 30 Sep 2018 04:49:04 -0400 Received: from smtprelay0202.hostedemail.com ([216.40.44.202]:35527 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727436AbeI3ItE (ORCPT ); Sun, 30 Sep 2018 04:49:04 -0400 Received: from smtprelay.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by smtpgrave05.hostedemail.com (Postfix) with ESMTP id 9852718024AFB for ; Sun, 30 Sep 2018 02:18:07 +0000 (UTC) Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay04.hostedemail.com (Postfix) with ESMTP id 4EAAD180A885F; Sun, 30 Sep 2018 02:18:02 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::,RULES_HIT:41:355:379:541:599:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2198:2199:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3872:4321:5007:6120:6691:7901:10004:10400:10848:11026:11232:11473:11658:11914:12043:12438:12740:12760:12895:13069:13161:13229:13311:13357:13439:14659:14721:21080:21451:21627:30054:30091,0,RBL:47.151.153.53:@perches.com:.lbl8.mailshell.net-62.14.0.100 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:29,LUA_SUMMARY:none X-HE-Tag: pig96_803c423437d2d X-Filterd-Recvd-Size: 2155 Received: from XPS-9350.home (unknown [47.151.153.53]) (Authenticated sender: joe@perches.com) by omf15.hostedemail.com (Postfix) with ESMTPA; Sun, 30 Sep 2018 02:18:01 +0000 (UTC) Message-ID: <0e30a0ab635f0348bcf582efe018e53334a276fe.camel@perches.com> Subject: Re: [PATCH] ASoC: wm8731: Fix a unused function gcc warning From: Joe Perches To: zhong jiang , broonie@kernel.org Cc: perex@perex.cz, tiwai@suse.com, lgirdwood@gmail.com, linux-kernel@vger.kernel.org Date: Sat, 29 Sep 2018 19:17:59 -0700 In-Reply-To: <1538271918-24033-1-git-send-email-zhongjiang@huawei.com> References: <1538271918-24033-1-git-send-email-zhongjiang@huawei.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2018-09-30 at 09:45 +0800, zhong jiang wrote: > Fix the following compile warning: > > sound/soc/codecs/wm8731.c:575:12: warning: 'wm8731_request_supplies' defined but not used [-Wunused-function] > sound/soc/codecs/wm8731.c:600:12: warning: 'wm8731_hw_init' defined but not used [-Wunused-function] [] > diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c [] > @@ -36,12 +36,15 @@ > #include "wm8731.h" > > #define WM8731_NUM_SUPPLIES 4 > + > +#if defined(CONFIG_I2C) || defined(CONFIG_SPI_MASTER) > static const char *wm8731_supply_names[WM8731_NUM_SUPPLIES] = { > "AVDD", > "HPVDD", > "DCVDD", > "DBVDD", > }; > +#endif > > /* codec private data */ > struct wm8731_priv { > @@ -572,6 +575,7 @@ static int wm8731_startup(struct snd_pcm_substream *substream, > .symmetric_rates = 1, > }; > > +#if defined(CONFIG_I2C) || defined(CONFIG_SPI_MASTER) > static int wm8731_request_supplies(struct device *dev, > struct wm8731_priv *wm8731) > { > @@ -627,6 +631,7 @@ static int wm8731_hw_init(struct device *dev, struct wm8731_priv *wm8731) > > return ret; > } > +#endif It would be better to move the declaration of wm8731_supply_ fnames into the second #if block so there would only be a single #if block.