Re: [PATCH v9 1/2] i2c: octeon: refactor common i2c operations

From: kernel test robot
Date: Wed Oct 09 2024 - 21:52:51 EST


Hi Aryan,

kernel test robot noticed the following build warnings:

[auto build test WARNING on andi-shyti/i2c/i2c-host]
[also build test WARNING on linus/master v6.12-rc2 next-20241009]
[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/Aryan-Srivastava/i2c-octeon-refactor-common-i2c-operations/20241007-104113
base: https://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git i2c/i2c-host
patch link: https://lore.kernel.org/r/20241007023900.3924763-2-aryan.srivastava%40alliedtelesis.co.nz
patch subject: [PATCH v9 1/2] i2c: octeon: refactor common i2c operations
config: x86_64-allmodconfig (https://download.01.org/0day-ci/archive/20241010/202410100921.WVORo97f-lkp@xxxxxxxxx/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/20241010/202410100921.WVORo97f-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410100921.WVORo97f-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/i2c/busses/i2c-octeon-core.c:517:3: warning: variable 'cmd' is uninitialized when used here [-Wuninitialized]
517 | cmd |= SW_TWSI_OP_10_IA;
| ^~~
drivers/i2c/busses/i2c-octeon-core.c:514:9: note: initialize the variable 'cmd' to silence this warning
514 | u64 cmd;
| ^
| = 0
1 warning generated.

Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for MODVERSIONS
Depends on [n]: MODULES [=y] && !COMPILE_TEST [=y]
Selected by [y]:
- RANDSTRUCT_FULL [=y] && (CC_HAS_RANDSTRUCT [=y] || GCC_PLUGINS [=n]) && MODULES [=y]


vim +/cmd +517 drivers/i2c/busses/i2c-octeon-core.c

ad83665b4687f5 Jan Glauber 2016-08-24 509
dcdb10ccc89293 Aryan Srivastava 2024-10-07 510 /* Generic consideration for extended internal addresses in i2c hlc r/w ops */
dcdb10ccc89293 Aryan Srivastava 2024-10-07 511 static bool octeon_i2c_hlc_ext(struct octeon_i2c *i2c, struct i2c_msg msg, u64 *cmd_in, u64 *ext)
dcdb10ccc89293 Aryan Srivastava 2024-10-07 512 {
dcdb10ccc89293 Aryan Srivastava 2024-10-07 513 bool set_ext = false;
dcdb10ccc89293 Aryan Srivastava 2024-10-07 514 u64 cmd;
ad83665b4687f5 Jan Glauber 2016-08-24 515
dcdb10ccc89293 Aryan Srivastava 2024-10-07 516 if (msg.flags & I2C_M_TEN)
ad83665b4687f5 Jan Glauber 2016-08-24 @517 cmd |= SW_TWSI_OP_10_IA;
ad83665b4687f5 Jan Glauber 2016-08-24 518 else
ad83665b4687f5 Jan Glauber 2016-08-24 519 cmd |= SW_TWSI_OP_7_IA;
ad83665b4687f5 Jan Glauber 2016-08-24 520
dcdb10ccc89293 Aryan Srivastava 2024-10-07 521 if (msg.len == 2) {
dcdb10ccc89293 Aryan Srivastava 2024-10-07 522 cmd |= SW_TWSI_EIA;
dcdb10ccc89293 Aryan Srivastava 2024-10-07 523 *ext = (u64)msg.buf[0] << SW_TWSI_IA_SHIFT;
dcdb10ccc89293 Aryan Srivastava 2024-10-07 524 cmd |= (u64)msg.buf[1] << SW_TWSI_IA_SHIFT;
dcdb10ccc89293 Aryan Srivastava 2024-10-07 525 set_ext = true;
dcdb10ccc89293 Aryan Srivastava 2024-10-07 526 } else {
dcdb10ccc89293 Aryan Srivastava 2024-10-07 527 cmd |= (u64)msg.buf[0] << SW_TWSI_IA_SHIFT;
dcdb10ccc89293 Aryan Srivastava 2024-10-07 528 }
dcdb10ccc89293 Aryan Srivastava 2024-10-07 529
dcdb10ccc89293 Aryan Srivastava 2024-10-07 530 *cmd_in |= cmd;
dcdb10ccc89293 Aryan Srivastava 2024-10-07 531 return set_ext;
dcdb10ccc89293 Aryan Srivastava 2024-10-07 532 }
dcdb10ccc89293 Aryan Srivastava 2024-10-07 533

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki