From: kbuild test robot <lkp@intel.com>
To: Dan Murphy <dmurphy@ti.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Mark Brown <broonie@kernel.org>
Subject: sound/soc/codecs/tlv320adcx140.c:751:2: note: in expansion of macro 'if'
Date: Tue, 19 May 2020 16:46:14 +0800 [thread overview]
Message-ID: <202005191611.FncF7jqq%lkp@intel.com> (raw)
[-- 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 --]
next reply other threads:[~2020-05-19 9:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-19 8:46 kbuild test robot [this message]
2020-05-24 18:26 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=202005191611.FncF7jqq%lkp@intel.com \
--to=lkp@intel.com \
--cc=broonie@kernel.org \
--cc=dmurphy@ti.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome