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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sun, 30 Sep 2018 13:33:34 +0800
From:   kbuild test robot <lkp@...el.com>
To:     zhong jiang <zhongjiang@...wei.com>
Cc:     kbuild-all@...org, broonie@...nel.org, joe@...ches.com,
        perex@...ex.cz, tiwai@...e.com, lgirdwood@...il.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] ASoC: wm8731: Fix a unused function gcc warning

Hi zhong,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on asoc/for-next]
[also build test ERROR on v4.19-rc5 next-20180928]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/zhong-jiang/ASoC-wm8731-Fix-a-unused-function-gcc-warning/20180930-104811
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: x86_64-randconfig-j3-09262047 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   sound/soc/codecs/wm8731.c: In function 'wm8731_i2c_probe':
   sound/soc/codecs/wm8731.c:765:2: error: implicit declaration of function 'wm8731_request_supplies' [-Werror=implicit-function-declaration]
     ret = wm8731_request_supplies(&i2c->dev, wm8731);
     ^
>> sound/soc/codecs/wm8731.c:777:2: error: implicit declaration of function 'wm8731_hw_init' [-Werror=implicit-function-declaration]
     ret = wm8731_hw_init(&i2c->dev, wm8731);
     ^
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:__ffs
   Cyclomatic Complexity 1 include/linux/err.h:PTR_ERR
   Cyclomatic Complexity 1 include/linux/err.h:IS_ERR
   Cyclomatic Complexity 1 include/linux/device.h:devm_kzalloc
   Cyclomatic Complexity 1 include/linux/device.h:dev_get_drvdata
   Cyclomatic Complexity 1 include/linux/device.h:dev_set_drvdata
   Cyclomatic Complexity 1 include/linux/i2c.h:i2c_set_clientdata
   Cyclomatic Complexity 3 include/linux/clk.h:clk_prepare_enable
   Cyclomatic Complexity 1 include/linux/clk.h:clk_disable_unprepare
   Cyclomatic Complexity 1 include/sound/pcm.h:hw_param_mask_c
   Cyclomatic Complexity 1 include/sound/pcm.h:hw_param_interval_c
   Cyclomatic Complexity 1 include/sound/pcm.h:params_rate
   Cyclomatic Complexity 3 include/sound/pcm_params.h:snd_mask_min
   Cyclomatic Complexity 1 include/sound/pcm_params.h:params_format
   Cyclomatic Complexity 1 include/sound/pcm_params.h:params_width
   Cyclomatic Complexity 1 include/sound/soc-dapm.h:snd_soc_dapm_get_bias_level
   Cyclomatic Complexity 2 include/sound/soc.h:snd_soc_dapm_to_component
   Cyclomatic Complexity 1 include/sound/soc.h:snd_soc_component_get_dapm
   Cyclomatic Complexity 1 include/sound/soc.h:snd_soc_component_get_bias_level
   Cyclomatic Complexity 1 include/sound/soc.h:snd_soc_component_get_drvdata
   Cyclomatic Complexity 1 include/sound/soc.h:snd_soc_kcontrol_component
   Cyclomatic Complexity 1 sound/soc/codecs/wm8731.c:wm8731_volatile
   Cyclomatic Complexity 1 sound/soc/codecs/wm8731.c:wm8731_get_deemph
   Cyclomatic Complexity 1 sound/soc/codecs/wm8731.c:wm8731_check_osc
   Cyclomatic Complexity 4 sound/soc/codecs/wm8731.c:get_coeff
   Cyclomatic Complexity 1 sound/soc/codecs/wm8731.c:wm8731_i2c_remove
   Cyclomatic Complexity 8 sound/soc/codecs/wm8731.c:wm8731_i2c_probe
   Cyclomatic Complexity 12 sound/soc/codecs/wm8731.c:wm8731_set_dai_fmt
   Cyclomatic Complexity 2 sound/soc/codecs/wm8731.c:wm8731_mute
   Cyclomatic Complexity 4 sound/soc/codecs/wm8731.c:wm8731_set_deemph
   Cyclomatic Complexity 4 sound/soc/codecs/wm8731.c:wm8731_hw_params
   Cyclomatic Complexity 8 sound/soc/codecs/wm8731.c:wm8731_set_dai_sysclk
   Cyclomatic Complexity 2 sound/soc/codecs/wm8731.c:wm8731_startup
   Cyclomatic Complexity 9 sound/soc/codecs/wm8731.c:wm8731_set_bias_level
   Cyclomatic Complexity 3 sound/soc/codecs/wm8731.c:wm8731_put_deemph
   Cyclomatic Complexity 2 sound/soc/codecs/wm8731.c:wm8731_modinit
   Cyclomatic Complexity 1 sound/soc/codecs/wm8731.c:wm8731_exit
   cc1: some warnings being treated as errors

vim +/wm8731_hw_init +777 sound/soc/codecs/wm8731.c

a8035c8f0 Mark Brown        2009-02-16  735  
b65ab73e5 Fabio Estevam     2013-11-21  736  #if IS_ENABLED(CONFIG_I2C)
7a79e94e9 Bill Pemberton    2012-12-07  737  static int wm8731_i2c_probe(struct i2c_client *i2c,
a8035c8f0 Mark Brown        2009-02-16  738  			    const struct i2c_device_id *id)
a8035c8f0 Mark Brown        2009-02-16  739  {
5998102b9 Mark Brown        2009-02-16  740  	struct wm8731_priv *wm8731;
f0fba2ad1 Liam Girdwood     2010-03-17  741  	int ret;
5998102b9 Mark Brown        2009-02-16  742  
f1992dde7 Mark Brown        2012-05-12  743  	wm8731 = devm_kzalloc(&i2c->dev, sizeof(struct wm8731_priv),
f1992dde7 Mark Brown        2012-05-12  744  			      GFP_KERNEL);
5998102b9 Mark Brown        2009-02-16  745  	if (wm8731 == NULL)
5998102b9 Mark Brown        2009-02-16  746  		return -ENOMEM;
a8035c8f0 Mark Brown        2009-02-16  747  
99d422341 Songjun Wu        2015-03-12  748  	wm8731->mclk = devm_clk_get(&i2c->dev, "mclk");
99d422341 Songjun Wu        2015-03-12  749  	if (IS_ERR(wm8731->mclk)) {
99d422341 Songjun Wu        2015-03-12  750  		ret = PTR_ERR(wm8731->mclk);
99d422341 Songjun Wu        2015-03-12  751  		if (ret == -ENOENT) {
99d422341 Songjun Wu        2015-03-12  752  			wm8731->mclk = NULL;
99d422341 Songjun Wu        2015-03-12  753  			dev_warn(&i2c->dev, "Assuming static MCLK\n");
99d422341 Songjun Wu        2015-03-12  754  		} else {
99d422341 Songjun Wu        2015-03-12  755  			dev_err(&i2c->dev, "Failed to get MCLK: %d\n",
99d422341 Songjun Wu        2015-03-12  756  				ret);
99d422341 Songjun Wu        2015-03-12  757  			return ret;
99d422341 Songjun Wu        2015-03-12  758  		}
99d422341 Songjun Wu        2015-03-12  759  	}
99d422341 Songjun Wu        2015-03-12  760  
8a6cf30bf Manuel Lauss      2015-01-19  761  	mutex_init(&wm8731->lock);
8a6cf30bf Manuel Lauss      2015-01-19  762  
6702dfcc5 Sergey Kiselev    2015-06-05  763  	i2c_set_clientdata(i2c, wm8731);
6702dfcc5 Sergey Kiselev    2015-06-05  764  
6702dfcc5 Sergey Kiselev    2015-06-05 @765  	ret = wm8731_request_supplies(&i2c->dev, wm8731);
6702dfcc5 Sergey Kiselev    2015-06-05  766  	if (ret != 0)
6702dfcc5 Sergey Kiselev    2015-06-05  767  		return ret;
6702dfcc5 Sergey Kiselev    2015-06-05  768  
f1992dde7 Mark Brown        2012-05-12  769  	wm8731->regmap = devm_regmap_init_i2c(i2c, &wm8731_regmap);
05d448e2c Mark Brown        2011-11-21  770  	if (IS_ERR(wm8731->regmap)) {
05d448e2c Mark Brown        2011-11-21  771  		ret = PTR_ERR(wm8731->regmap);
05d448e2c Mark Brown        2011-11-21  772  		dev_err(&i2c->dev, "Failed to allocate register map: %d\n",
05d448e2c Mark Brown        2011-11-21  773  			ret);
f1992dde7 Mark Brown        2012-05-12  774  		return ret;
05d448e2c Mark Brown        2011-11-21  775  	}
05d448e2c Mark Brown        2011-11-21  776  
6702dfcc5 Sergey Kiselev    2015-06-05 @777  	ret = wm8731_hw_init(&i2c->dev, wm8731);
6702dfcc5 Sergey Kiselev    2015-06-05  778  	if (ret != 0)
6702dfcc5 Sergey Kiselev    2015-06-05  779  		return ret;
a8035c8f0 Mark Brown        2009-02-16  780  
cde596c7c Kuninori Morimoto 2018-01-29  781  	ret = devm_snd_soc_register_component(&i2c->dev,
cde596c7c Kuninori Morimoto 2018-01-29  782  			&soc_component_dev_wm8731, &wm8731_dai, 1);
05d448e2c Mark Brown        2011-11-21  783  	if (ret != 0) {
05d448e2c Mark Brown        2011-11-21  784  		dev_err(&i2c->dev, "Failed to register CODEC: %d\n", ret);
f1992dde7 Mark Brown        2012-05-12  785  		return ret;
05d448e2c Mark Brown        2011-11-21  786  	}
05d448e2c Mark Brown        2011-11-21  787  
05d448e2c Mark Brown        2011-11-21  788  	return 0;
a8035c8f0 Mark Brown        2009-02-16  789  }
a8035c8f0 Mark Brown        2009-02-16  790  

:::::: The code at line 777 was first introduced by commit
:::::: 6702dfcc571d962df499f7466f54e07d044e6cd1 ASoC: wm8731: initialize the hardware when loading the codec driver

:::::: TO: Sergey Kiselev <sergey.kiselev@...el.com>
:::::: CC: Mark Brown <broonie@...nel.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (36592 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ