* Re: [PATCH v1 12/12] i2c: qcom-geni: Enable I2C on SA8255p Qualcomm platforms
[not found] <20251122050018.283669-13-praveen.talari@oss.qualcomm.com>
@ 2025-11-23 11:46 ` kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-11-23 11:46 UTC (permalink / raw)
To: Praveen Talari, Andi Shyti, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Mukesh Kumar Savaliya, Viken Dadhaniya,
Bjorn Andersson, Konrad Dybcio, linux-arm-msm, linux-i2c,
devicetree, linux-kernel
Cc: llvm, oe-kbuild-all, psodagud, djaggi, quic_msavaliy,
quic_vtanuku, quic_arandive, quic_shazhuss
Hi Praveen,
kernel test robot noticed the following build warnings:
[auto build test WARNING on d724c6f85e80a23ed46b7ebc6e38b527c09d64f5]
url: https://github.com/intel-lab-lkp/linux/commits/Praveen-Talari/soc-qcom-geni-se-Refactor-geni_icc_get-and-make-qup-memory-ICC-path-optional/20251122-130449
base: d724c6f85e80a23ed46b7ebc6e38b527c09d64f5
patch link: https://lore.kernel.org/r/20251122050018.283669-13-praveen.talari%40oss.qualcomm.com
patch subject: [PATCH v1 12/12] i2c: qcom-geni: Enable I2C on SA8255p Qualcomm platforms
config: loongarch-randconfig-002-20251123 (https://download.01.org/0day-ci/archive/20251123/202511231944.MieDLdu8-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251123/202511231944.MieDLdu8-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202511231944.MieDLdu8-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/i2c/busses/i2c-qcom-geni.c:1176:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
1176 | if (gi2c->dev_data->power_state) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/i2c/busses/i2c-qcom-geni.c:1185:9: note: uninitialized use occurs here
1185 | return ret;
| ^~~
drivers/i2c/busses/i2c-qcom-geni.c:1176:2: note: remove the 'if' if its condition is always true
1176 | if (gi2c->dev_data->power_state) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/i2c/busses/i2c-qcom-geni.c:1171:9: note: initialize the variable 'ret' to silence this warning
1171 | int ret;
| ^
| = 0
drivers/i2c/busses/i2c-qcom-geni.c:1193:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
1193 | if (gi2c->dev_data->power_state) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/i2c/busses/i2c-qcom-geni.c:1202:9: note: uninitialized use occurs here
1202 | return ret;
| ^~~
drivers/i2c/busses/i2c-qcom-geni.c:1193:2: note: remove the 'if' if its condition is always true
1193 | if (gi2c->dev_data->power_state) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/i2c/busses/i2c-qcom-geni.c:1190:9: note: initialize the variable 'ret' to silence this warning
1190 | int ret;
| ^
| = 0
2 warnings generated.
vim +1176 drivers/i2c/busses/i2c-qcom-geni.c
1168
1169 static int __maybe_unused geni_i2c_runtime_suspend(struct device *dev)
1170 {
1171 int ret;
1172 struct geni_i2c_dev *gi2c = dev_get_drvdata(dev);
1173
1174 disable_irq(gi2c->irq);
1175
> 1176 if (gi2c->dev_data->power_state) {
1177 ret = gi2c->dev_data->power_state(&gi2c->se, false);
1178 if (ret) {
1179 enable_irq(gi2c->irq);
1180 return ret;
1181 }
1182 }
1183
1184 gi2c->suspended = 1;
1185 return ret;
1186 }
1187
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread