From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [plbossart-sound:sdw/fix-pm-runtime 5286/5315] sound/soc/codecs/rt711-sdca.c:163 rt711_sdca_calibration() error: uninitialized symbol 'ret'.
Date: Tue, 27 Oct 2020 15:08:27 +0800 [thread overview]
Message-ID: <202010271523.gVdMmCSf-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 7320 bytes --]
CC: kbuild-all(a)lists.01.org
CC: "Pierre-Louis Bossart" <pierre-louis.bossart@linux.intel.com>
tree: https://github.com/plbossart/sound sdw/fix-pm-runtime
head: 7ed374e18f6bc2d248c89da5da55957d497a3fb5
commit: f8922c964f7ec00616497e556c68eef9d6a5252c [5286/5315] ASoC: rt711-sdca: Add RT711 SDCA vendor-specific driver
:::::: branch date: 8 hours ago
:::::: commit date: 7 days ago
config: i386-randconfig-m021-20201026 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
sound/soc/codecs/rt711-sdca.c:163 rt711_sdca_calibration() error: uninitialized symbol 'ret'.
vim +/ret +163 sound/soc/codecs/rt711-sdca.c
f8922c964f7ec0 Shuming Fan 2020-10-20 82
f8922c964f7ec0 Shuming Fan 2020-10-20 83 static int rt711_sdca_calibration(struct rt711_sdca_priv *rt711)
f8922c964f7ec0 Shuming Fan 2020-10-20 84 {
f8922c964f7ec0 Shuming Fan 2020-10-20 85 unsigned int val, loop_rc = 0, loop_dc = 0;
f8922c964f7ec0 Shuming Fan 2020-10-20 86 struct device *dev;
f8922c964f7ec0 Shuming Fan 2020-10-20 87 struct regmap *regmap = rt711->regmap;
f8922c964f7ec0 Shuming Fan 2020-10-20 88 int ret, chk_cnt = 100;
f8922c964f7ec0 Shuming Fan 2020-10-20 89
f8922c964f7ec0 Shuming Fan 2020-10-20 90 mutex_lock(&rt711->calibrate_mutex);
f8922c964f7ec0 Shuming Fan 2020-10-20 91 dev = regmap_get_device(regmap);
f8922c964f7ec0 Shuming Fan 2020-10-20 92
f8922c964f7ec0 Shuming Fan 2020-10-20 93 regmap_read(rt711->regmap, RT711_RC_CAL_STATUS, &val);
f8922c964f7ec0 Shuming Fan 2020-10-20 94 /* RC calibration */
f8922c964f7ec0 Shuming Fan 2020-10-20 95 if (!(val & 0x40))
f8922c964f7ec0 Shuming Fan 2020-10-20 96 rt711_sdca_index_update_bits(rt711, RT711_VENDOR_ANALOG_CTL,
f8922c964f7ec0 Shuming Fan 2020-10-20 97 RT711_MISC_POWER_CTL0, 0x0010, 0x0010);
f8922c964f7ec0 Shuming Fan 2020-10-20 98
f8922c964f7ec0 Shuming Fan 2020-10-20 99 for (loop_rc = 0; loop_rc < chk_cnt && !(val & 0x40); loop_rc++) {
f8922c964f7ec0 Shuming Fan 2020-10-20 100 usleep_range(10000, 11000);
f8922c964f7ec0 Shuming Fan 2020-10-20 101 ret = regmap_read(rt711->regmap, RT711_RC_CAL_STATUS, &val);
f8922c964f7ec0 Shuming Fan 2020-10-20 102 if (ret < 0)
f8922c964f7ec0 Shuming Fan 2020-10-20 103 goto _cali_fail_;
f8922c964f7ec0 Shuming Fan 2020-10-20 104 }
f8922c964f7ec0 Shuming Fan 2020-10-20 105 if (loop_rc == chk_cnt)
f8922c964f7ec0 Shuming Fan 2020-10-20 106 dev_err(dev, "%s, RC calibration time-out!\n", __func__);
f8922c964f7ec0 Shuming Fan 2020-10-20 107
f8922c964f7ec0 Shuming Fan 2020-10-20 108 /* HP calibration by manual mode setting */
f8922c964f7ec0 Shuming Fan 2020-10-20 109 rt711_sdca_index_update_bits(rt711, RT711_VENDOR_REG,
f8922c964f7ec0 Shuming Fan 2020-10-20 110 RT711_FSM_CTL, 0x2000, 0x2000);
f8922c964f7ec0 Shuming Fan 2020-10-20 111
f8922c964f7ec0 Shuming Fan 2020-10-20 112 /* Calibration manual mode */
f8922c964f7ec0 Shuming Fan 2020-10-20 113 rt711_sdca_index_update_bits(rt711, RT711_VENDOR_REG,
f8922c964f7ec0 Shuming Fan 2020-10-20 114 RT711_FSM_CTL, 0xf, RT711_CALI_CTL);
f8922c964f7ec0 Shuming Fan 2020-10-20 115
f8922c964f7ec0 Shuming Fan 2020-10-20 116 /* reset HP calibration */
f8922c964f7ec0 Shuming Fan 2020-10-20 117 rt711_sdca_index_update_bits(rt711, RT711_VENDOR_CALI,
f8922c964f7ec0 Shuming Fan 2020-10-20 118 RT711_DAC_DC_CALI_CTL1, RT711_DAC_DC_FORCE_CALI_RST, 0x00);
f8922c964f7ec0 Shuming Fan 2020-10-20 119 rt711_sdca_index_update_bits(rt711, RT711_VENDOR_CALI,
f8922c964f7ec0 Shuming Fan 2020-10-20 120 RT711_DAC_DC_CALI_CTL1, RT711_DAC_DC_FORCE_CALI_RST,
f8922c964f7ec0 Shuming Fan 2020-10-20 121 RT711_DAC_DC_FORCE_CALI_RST);
f8922c964f7ec0 Shuming Fan 2020-10-20 122
f8922c964f7ec0 Shuming Fan 2020-10-20 123 /* cal_clk_en_reg */
f8922c964f7ec0 Shuming Fan 2020-10-20 124 if (rt711->hw_ver == RT711_VER_VD0)
f8922c964f7ec0 Shuming Fan 2020-10-20 125 rt711_sdca_index_update_bits(rt711, RT711_VENDOR_CALI,
f8922c964f7ec0 Shuming Fan 2020-10-20 126 RT711_DAC_DC_CALI_CTL1, RT711_DAC_DC_CALI_CLK_EN,
f8922c964f7ec0 Shuming Fan 2020-10-20 127 RT711_DAC_DC_CALI_CLK_EN);
f8922c964f7ec0 Shuming Fan 2020-10-20 128
f8922c964f7ec0 Shuming Fan 2020-10-20 129 /* trigger */
f8922c964f7ec0 Shuming Fan 2020-10-20 130 rt711_sdca_index_update_bits(rt711, RT711_VENDOR_CALI,
f8922c964f7ec0 Shuming Fan 2020-10-20 131 RT711_DAC_DC_CALI_CTL1, RT711_DAC_DC_CALI_TRIGGER,
f8922c964f7ec0 Shuming Fan 2020-10-20 132 RT711_DAC_DC_CALI_TRIGGER);
f8922c964f7ec0 Shuming Fan 2020-10-20 133
f8922c964f7ec0 Shuming Fan 2020-10-20 134 /* wait for calibration process */
f8922c964f7ec0 Shuming Fan 2020-10-20 135 rt711_sdca_index_read(rt711, RT711_VENDOR_CALI,
f8922c964f7ec0 Shuming Fan 2020-10-20 136 RT711_DAC_DC_CALI_CTL1, &val);
f8922c964f7ec0 Shuming Fan 2020-10-20 137
f8922c964f7ec0 Shuming Fan 2020-10-20 138 for (loop_dc = 0; loop_dc < chk_cnt &&
f8922c964f7ec0 Shuming Fan 2020-10-20 139 (val & RT711_DAC_DC_CALI_TRIGGER); loop_dc++) {
f8922c964f7ec0 Shuming Fan 2020-10-20 140 usleep_range(10000, 11000);
f8922c964f7ec0 Shuming Fan 2020-10-20 141 ret = rt711_sdca_index_read(rt711, RT711_VENDOR_CALI,
f8922c964f7ec0 Shuming Fan 2020-10-20 142 RT711_DAC_DC_CALI_CTL1, &val);
f8922c964f7ec0 Shuming Fan 2020-10-20 143 if (ret < 0)
f8922c964f7ec0 Shuming Fan 2020-10-20 144 goto _cali_fail_;
f8922c964f7ec0 Shuming Fan 2020-10-20 145 }
f8922c964f7ec0 Shuming Fan 2020-10-20 146 if (loop_dc == chk_cnt)
f8922c964f7ec0 Shuming Fan 2020-10-20 147 dev_err(dev, "%s, calibration time-out!\n", __func__);
f8922c964f7ec0 Shuming Fan 2020-10-20 148
f8922c964f7ec0 Shuming Fan 2020-10-20 149 if (loop_dc == chk_cnt || loop_rc == chk_cnt)
f8922c964f7ec0 Shuming Fan 2020-10-20 150 ret = -ETIMEDOUT;
f8922c964f7ec0 Shuming Fan 2020-10-20 151
f8922c964f7ec0 Shuming Fan 2020-10-20 152 _cali_fail_:
f8922c964f7ec0 Shuming Fan 2020-10-20 153 /* enable impedance sense */
f8922c964f7ec0 Shuming Fan 2020-10-20 154 rt711_sdca_index_update_bits(rt711, RT711_VENDOR_REG,
f8922c964f7ec0 Shuming Fan 2020-10-20 155 RT711_FSM_CTL, RT711_FSM_IMP_EN, RT711_FSM_IMP_EN);
f8922c964f7ec0 Shuming Fan 2020-10-20 156
f8922c964f7ec0 Shuming Fan 2020-10-20 157 /* release HP-JD and trigger FSM */
f8922c964f7ec0 Shuming Fan 2020-10-20 158 rt711_sdca_index_write(rt711, RT711_VENDOR_REG,
f8922c964f7ec0 Shuming Fan 2020-10-20 159 RT711_DIGITAL_MISC_CTRL4, 0x201b);
f8922c964f7ec0 Shuming Fan 2020-10-20 160
f8922c964f7ec0 Shuming Fan 2020-10-20 161 mutex_unlock(&rt711->calibrate_mutex);
f8922c964f7ec0 Shuming Fan 2020-10-20 162 dev_dbg(dev, "%s calibration complete, ret=%d\n", __func__, ret);
f8922c964f7ec0 Shuming Fan 2020-10-20 @163 return ret;
f8922c964f7ec0 Shuming Fan 2020-10-20 164 }
f8922c964f7ec0 Shuming Fan 2020-10-20 165
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 39274 bytes --]
next reply other threads:[~2020-10-27 7:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-27 7:08 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-10-28 3:23 [plbossart-sound:sdw/fix-pm-runtime 5286/5315] sound/soc/codecs/rt711-sdca.c:163 rt711_sdca_calibration() error: uninitialized symbol 'ret' kernel 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=202010271523.gVdMmCSf-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.