From: kernel test robot <lkp@intel.com>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, broonie@kernel.org
Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
kbuild-all@lists.01.org, robh@kernel.org, lgirdwood@gmail.com,
linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com,
lee.jones@linaro.org
Subject: Re: [PATCH 3/4] ASoC: codecs: wcd934x: add mbhc support
Date: Tue, 11 May 2021 05:12:18 +0800 [thread overview]
Message-ID: <202105110538.opKWBvbF-lkp@intel.com> (raw)
In-Reply-To: <20210510101201.7281-4-srinivas.kandagatla@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 6213 bytes --]
Hi Srinivas,
I love your patch! Perhaps something to improve:
[auto build test WARNING on asoc/for-next]
[also build test WARNING on lee-mfd/for-mfd-next robh/for-next v5.13-rc1 next-20210510]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Srinivas-Kandagatla/ASoC-codecs-wcd934x-add-Headset-and-button-detection-support/20210510-181344
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: powerpc64-randconfig-r025-20210510 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 492173d42b32cb91d5d0d72d5ed84fcab80d059a)
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
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://github.com/0day-ci/linux/commit/97c9f617d94c14ca286bf4542d74b0968a5176c8
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Srinivas-Kandagatla/ASoC-codecs-wcd934x-add-Headset-and-button-detection-support/20210510-181344
git checkout 97c9f617d94c14ca286bf4542d74b0968a5176c8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> sound/soc/codecs/wcd-mbhc-v2.c:552:8: warning: variable 'jack_type' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized]
case MBHC_PLUG_TYPE_GND_MIC_SWAP:
^~~~~~~~~~~~~~~~~~~~~~~~~~~
sound/soc/codecs/wcd-mbhc-v2.c:564:33: note: uninitialized use occurs here
wcd_mbhc_report_plug(mbhc, 0, jack_type);
^~~~~~~~~
sound/soc/codecs/wcd-mbhc-v2.c:503:2: note: variable 'jack_type' is declared here
enum snd_jack_types jack_type;
^
1 warning generated.
--
>> sound/soc/codecs/wcd934x.c:2532:9: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
return ret;
^~~
sound/soc/codecs/wcd934x.c:2448:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
1 warning generated.
vim +/ret +2532 sound/soc/codecs/wcd934x.c
2441
2442 static int wcd934x_micbias_control(struct snd_soc_component *component,
2443 int micb_num, int req, bool is_dapm)
2444 {
2445 struct wcd934x_codec *wcd934x = snd_soc_component_get_drvdata(component);
2446 int micb_index = micb_num - 1;
2447 u16 micb_reg;
2448 int ret;
2449
2450 switch (micb_num) {
2451 case MIC_BIAS_1:
2452 micb_reg = WCD934X_ANA_MICB1;
2453 break;
2454 case MIC_BIAS_2:
2455 micb_reg = WCD934X_ANA_MICB2;
2456 break;
2457 case MIC_BIAS_3:
2458 micb_reg = WCD934X_ANA_MICB3;
2459 break;
2460 case MIC_BIAS_4:
2461 micb_reg = WCD934X_ANA_MICB4;
2462 break;
2463 default:
2464 dev_err(component->dev, "%s: Invalid micbias number: %d\n",
2465 __func__, micb_num);
2466 return -EINVAL;
2467 };
2468 mutex_lock(&wcd934x->micb_lock);
2469
2470 switch (req) {
2471 case MICB_PULLUP_ENABLE:
2472 wcd934x->pullup_ref[micb_index]++;
2473 if ((wcd934x->pullup_ref[micb_index] == 1) &&
2474 (wcd934x->micb_ref[micb_index] == 0))
2475 snd_soc_component_write_field(component, micb_reg,
2476 WCD934X_ANA_MICB_EN_MASK,
2477 WCD934X_MICB_PULL_UP);
2478 break;
2479 case MICB_PULLUP_DISABLE:
2480 if (wcd934x->pullup_ref[micb_index] > 0)
2481 wcd934x->pullup_ref[micb_index]--;
2482
2483 if ((wcd934x->pullup_ref[micb_index] == 0) &&
2484 (wcd934x->micb_ref[micb_index] == 0))
2485 snd_soc_component_write_field(component, micb_reg,
2486 WCD934X_ANA_MICB_EN_MASK, 0);
2487 break;
2488 case MICB_ENABLE:
2489 wcd934x->micb_ref[micb_index]++;
2490 if (wcd934x->micb_ref[micb_index] == 1) {
2491 snd_soc_component_write_field(component, micb_reg,
2492 WCD934X_ANA_MICB_EN_MASK,
2493 WCD934X_MICB_ENABLE);
2494 if (micb_num == MIC_BIAS_2)
2495 wcd_mbhc_event_notify(wcd934x->mbhc,
2496 WCD_EVENT_POST_MICBIAS_2_ON);
2497 }
2498
2499 if (micb_num == MIC_BIAS_2 && is_dapm)
2500 wcd_mbhc_event_notify(wcd934x->mbhc,
2501 WCD_EVENT_POST_DAPM_MICBIAS_2_ON);
2502 break;
2503 case MICB_DISABLE:
2504 if (wcd934x->micb_ref[micb_index] > 0)
2505 wcd934x->micb_ref[micb_index]--;
2506
2507 if ((wcd934x->micb_ref[micb_index] == 0) &&
2508 (wcd934x->pullup_ref[micb_index] > 0))
2509 snd_soc_component_write_field(component, micb_reg,
2510 WCD934X_ANA_MICB_EN_MASK,
2511 WCD934X_MICB_PULL_UP);
2512 else if ((wcd934x->micb_ref[micb_index] == 0) &&
2513 (wcd934x->pullup_ref[micb_index] == 0)) {
2514 if (micb_num == MIC_BIAS_2)
2515 wcd_mbhc_event_notify(wcd934x->mbhc,
2516 WCD_EVENT_PRE_MICBIAS_2_OFF);
2517
2518 snd_soc_component_write_field(component, micb_reg,
2519 WCD934X_ANA_MICB_EN_MASK, 0);
2520 if (micb_num == MIC_BIAS_2)
2521 wcd_mbhc_event_notify(wcd934x->mbhc,
2522 WCD_EVENT_POST_MICBIAS_2_OFF);
2523 }
2524 if (is_dapm && micb_num == MIC_BIAS_2)
2525 wcd_mbhc_event_notify(wcd934x->mbhc,
2526 WCD_EVENT_POST_DAPM_MICBIAS_2_OFF);
2527 break;
2528 };
2529
2530 mutex_unlock(&wcd934x->micb_lock);
2531
> 2532 return ret;
2533 }
2534
---
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: 38901 bytes --]
next prev parent reply other threads:[~2021-05-10 21:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-10 10:11 [PATCH 0/4] ASoC: codecs: wcd934x: add Headset and button detection support Srinivas Kandagatla
2021-05-10 10:11 ` [PATCH 1/4] ASoC: dt-bindings: wcd934x: add bindings for Headset Button detection Srinivas Kandagatla
2021-05-10 16:45 ` Rob Herring
2021-05-11 9:02 ` Srinivas Kandagatla
2021-05-10 10:11 ` [PATCH 2/4] ASoC: codecs: wcd: add multi button Headset detection support Srinivas Kandagatla
2021-05-10 10:12 ` [PATCH 3/4] ASoC: codecs: wcd934x: add mbhc support Srinivas Kandagatla
2021-05-10 21:12 ` kernel test robot [this message]
2021-05-10 10:12 ` [PATCH 4/4] ASoC: qcom: sdm845: add jack support for WCD934x Srinivas Kandagatla
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=202105110538.opKWBvbF-lkp@intel.com \
--to=lkp@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=clang-built-linux@googlegroups.com \
--cc=devicetree@vger.kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=lee.jones@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=srinivas.kandagatla@linaro.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;
as well as URLs for NNTP newsgroup(s).