lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5BB035B4.3030201@huawei.com>
Date:   Sun, 30 Sep 2018 10:32:20 +0800
From:   zhong jiang <zhongjiang@...wei.com>
To:     Joe Perches <joe@...ches.com>
CC:     <broonie@...nel.org>, <perex@...ex.cz>, <tiwai@...e.com>,
        <lgirdwood@...il.com>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ASoC: wm8731: Fix a unused function gcc warning

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ