linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* sound/soc/codecs/tlv320adcx140.c:751:2: note: in expansion of macro 'if'
@ 2020-05-24 18:26 kbuild test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kbuild test robot @ 2020-05-24 18:26 UTC (permalink / raw)
  To: Dan Murphy; +Cc: kbuild-all, linux-kernel, Mark Brown

[-- Attachment #1: Type: text/plain, Size: 7093 bytes --]

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@intel.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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28828 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* sound/soc/codecs/tlv320adcx140.c:751:2: note: in expansion of macro 'if'
@ 2020-05-19  8:46 kbuild test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kbuild test robot @ 2020-05-19  8:46 UTC (permalink / raw)
  To: Dan Murphy; +Cc: kbuild-all, linux-kernel, Mark Brown

[-- Attachment #1: Type: text/plain, Size: 6628 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   642b151f45dd54809ea00ecd3976a56c1ec9b53d
commit: 2e4249f58074ec93746df3a902d1835b7edfef49 ASoC: tlv320adcx140: Fix mic_bias and vref device tree verification
date:   3 months ago
config: nds32-randconfig-m001-20200519 (attached as .config)

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 30491 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-24 18:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-24 18:26 sound/soc/codecs/tlv320adcx140.c:751:2: note: in expansion of macro 'if' kbuild test robot
  -- strict thread matches above, loose matches on Subject: below --
2020-05-19  8:46 kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).