BCC: lkp@intel.com CC: oe-kbuild-all@lists.linux.dev In-Reply-To: <20230104064342.2094-4-kiseok.jo@irondevice.com> References: <20230104064342.2094-4-kiseok.jo@irondevice.com> TO: Kiseok Jo TO: Mark Brown CC: alsa-devel@alsa-project.org CC: application@irondevice.com CC: Kiseok Jo Hi Kiseok, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on broonie-sound/for-next] [also build test WARNING on robh/for-next linus/master v6.2-rc2 next-20230105] [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#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Kiseok-Jo/ASoC-sma1303-Add-driver-for-Iron-Device-SMA1303-Amp/20230104-150052 base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next patch link: https://lore.kernel.org/r/20230104064342.2094-4-kiseok.jo%40irondevice.com patch subject: [PATCH 3/3] ASOC: sma1303: change the overall contents :::::: branch date: 2 days ago :::::: commit date: 2 days ago config: ia64-randconfig-m041-20230101 compiler: ia64-linux-gcc (GCC) 12.1.0 If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot | Reported-by: Dan Carpenter smatch warnings: sound/soc/codecs/sma1303.c:257 sma1303_regmap_write() error: uninitialized symbol 'ret'. sound/soc/codecs/sma1303.c:275 sma1303_regmap_update_bits() error: uninitialized symbol 'ret'. sound/soc/codecs/sma1303.c:293 sma1303_regmap_read() error: uninitialized symbol 'ret'. sound/soc/codecs/sma1303.c:684 sma1303_add_component_controls() error: not allocating enough for = 'name' 8 vs 3 sound/soc/codecs/sma1303.c:1539 sma1303_i2c_probe() warn: unsigned 'value' is never less than zero. vim +/ret +257 sound/soc/codecs/sma1303.c 287cf116194f9c Kiseok Jo 2023-01-04 241 287cf116194f9c Kiseok Jo 2023-01-04 242 static int sma1303_regmap_write(struct sma1303_priv *sma1303, 0b15568ccfb962 Kiseok Jo 2023-01-04 243 unsigned int reg, unsigned int val) 0b15568ccfb962 Kiseok Jo 2023-01-04 244 { 287cf116194f9c Kiseok Jo 2023-01-04 245 int ret; 287cf116194f9c Kiseok Jo 2023-01-04 246 int cnt = sma1303->retry_cnt; 0b15568ccfb962 Kiseok Jo 2023-01-04 247 287cf116194f9c Kiseok Jo 2023-01-04 248 while (cnt--) { 287cf116194f9c Kiseok Jo 2023-01-04 249 ret = regmap_write(sma1303->regmap, reg, val); 0b15568ccfb962 Kiseok Jo 2023-01-04 250 if (ret < 0) { 287cf116194f9c Kiseok Jo 2023-01-04 251 dev_err(sma1303->dev, "Failed to write [0x%02X]\n", reg); 287cf116194f9c Kiseok Jo 2023-01-04 252 if (gCallback.set_i2c_err) 287cf116194f9c Kiseok Jo 2023-01-04 253 gCallback.set_i2c_err(sma1303->dev, ret); 287cf116194f9c Kiseok Jo 2023-01-04 254 } else 287cf116194f9c Kiseok Jo 2023-01-04 255 break; 0b15568ccfb962 Kiseok Jo 2023-01-04 256 } 0b15568ccfb962 Kiseok Jo 2023-01-04 @257 return ret; 0b15568ccfb962 Kiseok Jo 2023-01-04 258 } 0b15568ccfb962 Kiseok Jo 2023-01-04 259 287cf116194f9c Kiseok Jo 2023-01-04 260 static int sma1303_regmap_update_bits(struct sma1303_priv *sma1303, 0b15568ccfb962 Kiseok Jo 2023-01-04 261 unsigned int reg, unsigned int mask, unsigned int val) 0b15568ccfb962 Kiseok Jo 2023-01-04 262 { 287cf116194f9c Kiseok Jo 2023-01-04 263 int ret; 287cf116194f9c Kiseok Jo 2023-01-04 264 int cnt = sma1303->retry_cnt; 0b15568ccfb962 Kiseok Jo 2023-01-04 265 287cf116194f9c Kiseok Jo 2023-01-04 266 while (cnt--) { 287cf116194f9c Kiseok Jo 2023-01-04 267 ret = regmap_update_bits(sma1303->regmap, reg, mask, val); 0b15568ccfb962 Kiseok Jo 2023-01-04 268 if (ret < 0) { 287cf116194f9c Kiseok Jo 2023-01-04 269 dev_err(sma1303->dev, "Failed to update [0x%02X]\n", reg); 287cf116194f9c Kiseok Jo 2023-01-04 270 if (gCallback.set_i2c_err) 287cf116194f9c Kiseok Jo 2023-01-04 271 gCallback.set_i2c_err(sma1303->dev, ret); 287cf116194f9c Kiseok Jo 2023-01-04 272 } else 287cf116194f9c Kiseok Jo 2023-01-04 273 break; 0b15568ccfb962 Kiseok Jo 2023-01-04 274 } 0b15568ccfb962 Kiseok Jo 2023-01-04 @275 return ret; 0b15568ccfb962 Kiseok Jo 2023-01-04 276 } 0b15568ccfb962 Kiseok Jo 2023-01-04 277 287cf116194f9c Kiseok Jo 2023-01-04 278 static int sma1303_regmap_read(struct sma1303_priv *sma1303, 287cf116194f9c Kiseok Jo 2023-01-04 279 unsigned int reg, unsigned int *val) 0b15568ccfb962 Kiseok Jo 2023-01-04 280 { 287cf116194f9c Kiseok Jo 2023-01-04 281 int ret; 287cf116194f9c Kiseok Jo 2023-01-04 282 int cnt = sma1303->retry_cnt; 0b15568ccfb962 Kiseok Jo 2023-01-04 283 287cf116194f9c Kiseok Jo 2023-01-04 284 while (cnt--) { 287cf116194f9c Kiseok Jo 2023-01-04 285 ret = regmap_read(sma1303->regmap, reg, val); 0b15568ccfb962 Kiseok Jo 2023-01-04 286 if (ret < 0) { 287cf116194f9c Kiseok Jo 2023-01-04 287 dev_err(sma1303->dev, "Failed to read [0x%02X]\n", reg); 287cf116194f9c Kiseok Jo 2023-01-04 288 if (gCallback.set_i2c_err) 287cf116194f9c Kiseok Jo 2023-01-04 289 gCallback.set_i2c_err(sma1303->dev, ret); 287cf116194f9c Kiseok Jo 2023-01-04 290 } else 287cf116194f9c Kiseok Jo 2023-01-04 291 break; 0b15568ccfb962 Kiseok Jo 2023-01-04 292 } 287cf116194f9c Kiseok Jo 2023-01-04 @293 return ret; 0b15568ccfb962 Kiseok Jo 2023-01-04 294 } 0b15568ccfb962 Kiseok Jo 2023-01-04 295 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests