From: zhong jiang <zhongjiang@huawei.com>
To: Joe Perches <joe@perches.com>
Cc: <broonie@kernel.org>, <perex@perex.cz>, <tiwai@suse.com>,
<lgirdwood@gmail.com>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ASoC: wm8731: Fix a unused function gcc warning
Date: Sun, 30 Sep 2018 10:32:20 +0800 [thread overview]
Message-ID: <5BB035B4.3030201@huawei.com> (raw)
In-Reply-To: <0e30a0ab635f0348bcf582efe018e53334a276fe.camel@perches.com>
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
next prev parent reply other threads:[~2018-09-30 2:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-30 1:45 [PATCH] ASoC: wm8731: Fix a unused function gcc warning zhong jiang
2018-09-30 2:17 ` Joe Perches
2018-09-30 2:32 ` zhong jiang [this message]
2018-09-30 2:25 ` kbuild test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5BB035B4.3030201@huawei.com \
--to=zhongjiang@huawei.com \
--cc=broonie@kernel.org \
--cc=joe@perches.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.