Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2433677imm; Sat, 29 Sep 2018 19:32:51 -0700 (PDT) X-Google-Smtp-Source: ACcGV61yqydHd2r0ASu2HlkQy8SsnvFSYaHCTJPfGxuTftWAbbIK5NaDnBzfGjzpopvH6ZfMOifz X-Received: by 2002:a62:1b45:: with SMTP id b66-v6mr5297352pfb.94.1538274771198; Sat, 29 Sep 2018 19:32:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538274771; cv=none; d=google.com; s=arc-20160816; b=XH4lHVEUTxtAddoyc2PKR9qv4OLmSMlvfoPtHpkKYweVNUMHr0MwtE1Zud9Nt3P70R MRha9ZcpEBugifcxVzMS0uKTwkvdphRLhplsCFDfh5jiVwkiL4Gf8tUvmrUm2ZKRWYy4 ov46sn+WLnIT11RhmEnZhvTL3X3Tbe2MdtzDACooSCuHKf0Cx5mwzL3pbKEmJFbhU4bE D5QzEu2N8CseunfQCPZiOASeU60HCJVP0B2z/ibTqVmzZ8D8AgGJMPXG05ntFkz2CTU5 Z0n+0UyeXVg2oAtznXF4ChECGpBov7HHCC23WhDF1xkpPJ/p+SYpejcEKe0bofqi3mlb gsgQ== 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:in-reply-to :references:subject:cc:to:mime-version:user-agent:from:date :message-id; bh=plyn33g854Rk8QsEHvvuldqPNP3d/g/swz2e5UFd5AQ=; b=sjysphyKWnswkNZrP79DobSZNpO8xWz3RAF8nt0MBwjqoIPyZ692ZX9oi5G1mjwZRE TAHIdsM5wYNRhrLssZDaqR9zZvmPz4k3XC7TVTnfBRB1xz22onqRKJN4AANxD7unNfDI sKlirF+S0QTgpfKV5ZSbiE3mwkpb7Vlk27XXlu1FNIIaHPnorOdaDUmlXLp5jEvARUmU MI94YM7Rgl7exvMysx7pq0aGunYN40Q72hbApzoCOCB5R8WG9GQGpMqyylI7r7XP1kiS VA7MlCfEGAcsC+wFWsCt6B54u2g/ACWl2tLkK3MmCf1o5ejQVtCFjk8T0+0vVu5YQ6Hg enSA== 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 207-v6si8606095pgf.245.2018.09.29.19.32.34; Sat, 29 Sep 2018 19:32:51 -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 S1727465AbeI3JD3 (ORCPT + 99 others); Sun, 30 Sep 2018 05:03:29 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:57182 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726348AbeI3JD3 (ORCPT ); Sun, 30 Sep 2018 05:03:29 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 65B2E43D6A40E; Sun, 30 Sep 2018 10:32:26 +0800 (CST) Received: from [127.0.0.1] (10.177.29.68) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.399.0; Sun, 30 Sep 2018 10:32:21 +0800 Message-ID: <5BB035B4.3030201@huawei.com> Date: Sun, 30 Sep 2018 10:32:20 +0800 From: zhong jiang User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Joe Perches CC: , , , , Subject: Re: [PATCH] ASoC: wm8731: Fix a unused function gcc warning References: <1538271918-24033-1-git-send-email-zhongjiang@huawei.com> <0e30a0ab635f0348bcf582efe018e53334a276fe.camel@perches.com> In-Reply-To: <0e30a0ab635f0348bcf582efe018e53334a276fe.camel@perches.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.29.68] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/9/30 10:17, Joe Perches wrote: > 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. > Yep, Thanks, Will repost in v2. Sincerely, zhong jiang