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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Mon, 25 May 2020 02:26:48 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Dan Murphy <dmurphy@...com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Mark Brown <broonie@...nel.org>
Subject: sound/soc/codecs/tlv320adcx140.c:751:2: note: in expansion of macro
 'if'

Hi Dan,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   98790bbac4db1697212ce9462ec35ca09c4a2810
commit: 2e4249f58074ec93746df3a902d1835b7edfef49 ASoC: tlv320adcx140: Fix mic_bias and vref device tree verification
date:   3 months ago
config: openrisc-randconfig-r001-20200524 (attached as .config)
compiler: or1k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 2e4249f58074ec93746df3a902d1835b7edfef49
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=openrisc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@...el.com>

All warnings (new ones prefixed by >>, old ones prefixed by <<):

sound/soc/codecs/tlv320adcx140.c: In function 'adcx140_reset':
sound/soc/codecs/tlv320adcx140.c:551:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
551 |  int ret = 0;
|      ^~~
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/module.h:12,
from sound/soc/codecs/tlv320adcx140.c:5:
sound/soc/codecs/tlv320adcx140.c: In function 'adcx140_codec_probe':
sound/soc/codecs/tlv320adcx140.c:751:18: warning: comparison is always false due to limited range of data type [-Wtype-limits]
751 |  if (bias_source < ADCX140_MIC_BIAS_VAL_VREF ||
|                  ^
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
|                                                    ^~~~
>> sound/soc/codecs/tlv320adcx140.c:751:2: note: in expansion of macro 'if'
751 |  if (bias_source < ADCX140_MIC_BIAS_VAL_VREF ||
|  ^~
sound/soc/codecs/tlv320adcx140.c:751:18: warning: comparison is always false due to limited range of data type [-Wtype-limits]
751 |  if (bias_source < ADCX140_MIC_BIAS_VAL_VREF ||
|                  ^
include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
|                                                             ^~~~
>> sound/soc/codecs/tlv320adcx140.c:751:2: note: in expansion of macro 'if'
751 |  if (bias_source < ADCX140_MIC_BIAS_VAL_VREF ||
|  ^~
sound/soc/codecs/tlv320adcx140.c:751:18: warning: comparison is always false due to limited range of data type [-Wtype-limits]
751 |  if (bias_source < ADCX140_MIC_BIAS_VAL_VREF ||
|                  ^
include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
69 |  (cond) ?              |   ^~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
|                            ^~~~~~~~~~~~~~
>> sound/soc/codecs/tlv320adcx140.c:751:2: note: in expansion of macro 'if'
751 |  if (bias_source < ADCX140_MIC_BIAS_VAL_VREF ||
|  ^~
sound/soc/codecs/tlv320adcx140.c:762:18: warning: comparison is always false due to limited range of data type [-Wtype-limits]
762 |  if (vref_source < ADCX140_MIC_BIAS_VREF_275V ||
|                  ^
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
|                                                    ^~~~
sound/soc/codecs/tlv320adcx140.c:762:2: note: in expansion of macro 'if'
762 |  if (vref_source < ADCX140_MIC_BIAS_VREF_275V ||
|  ^~
sound/soc/codecs/tlv320adcx140.c:762:18: warning: comparison is always false due to limited range of data type [-Wtype-limits]
762 |  if (vref_source < ADCX140_MIC_BIAS_VREF_275V ||
|                  ^
include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
|                                                             ^~~~
sound/soc/codecs/tlv320adcx140.c:762:2: note: in expansion of macro 'if'
762 |  if (vref_source < ADCX140_MIC_BIAS_VREF_275V ||
|  ^~
sound/soc/codecs/tlv320adcx140.c:762:18: warning: comparison is always false due to limited range of data type [-Wtype-limits]
762 |  if (vref_source < ADCX140_MIC_BIAS_VREF_275V ||
|                  ^
include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
69 |  (cond) ?              |   ^~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
|                            ^~~~~~~~~~~~~~
sound/soc/codecs/tlv320adcx140.c:762:2: note: in expansion of macro 'if'
762 |  if (vref_source < ADCX140_MIC_BIAS_VREF_275V ||
|  ^~

vim +/if +751 sound/soc/codecs/tlv320adcx140.c

   737	
   738	static int adcx140_codec_probe(struct snd_soc_component *component)
   739	{
   740		struct adcx140_priv *adcx140 = snd_soc_component_get_drvdata(component);
   741		int sleep_cfg_val = ADCX140_WAKE_DEV;
   742		u8 bias_source;
   743		u8 vref_source;
   744		int ret;
   745	
   746		ret = device_property_read_u8(adcx140->dev, "ti,mic-bias-source",
   747					      &bias_source);
   748		if (ret)
   749			bias_source = ADCX140_MIC_BIAS_VAL_VREF;
   750	
 > 751		if (bias_source < ADCX140_MIC_BIAS_VAL_VREF ||
   752		    bias_source > ADCX140_MIC_BIAS_VAL_AVDD) {
   753			dev_err(adcx140->dev, "Mic Bias source value is invalid\n");
   754			return -EINVAL;
   755		}
   756	
   757		ret = device_property_read_u8(adcx140->dev, "ti,vref-source",
   758					      &vref_source);
   759		if (ret)
   760			vref_source = ADCX140_MIC_BIAS_VREF_275V;
   761	
   762		if (vref_source < ADCX140_MIC_BIAS_VREF_275V ||
   763		    vref_source > ADCX140_MIC_BIAS_VREF_1375V) {
   764			dev_err(adcx140->dev, "Mic Bias source value is invalid\n");
   765			return -EINVAL;
   766		}
   767	
   768		bias_source |= vref_source;
   769	
   770		ret = adcx140_reset(adcx140);
   771		if (ret)
   772			goto out;
   773	
   774		if(adcx140->supply_areg == NULL)
   775			sleep_cfg_val |= ADCX140_AREG_INTERNAL;
   776	
   777		ret = regmap_write(adcx140->regmap, ADCX140_SLEEP_CFG, sleep_cfg_val);
   778		if (ret) {
   779			dev_err(adcx140->dev, "setting sleep config failed %d\n", ret);
   780			goto out;
   781		}
   782	
   783		/* 8.4.3: Wait >= 1ms after entering active mode. */
   784		usleep_range(1000, 100000);
   785	
   786		ret = regmap_update_bits(adcx140->regmap, ADCX140_BIAS_CFG,
   787					ADCX140_MIC_BIAS_VAL_MSK |
   788					ADCX140_MIC_BIAS_VREF_MSK, bias_source);
   789		if (ret)
   790			dev_err(adcx140->dev, "setting MIC bias failed %d\n", ret);
   791	out:
   792		return ret;
   793	}
   794	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

Powered by blists - more mailing lists