* [sashal-stable:pending-5.17 23/787] drivers/bus/mhi/core/init.c:87:16: warning: Uninitialized variable: index [uninitvar]
@ 2022-04-02 22:18 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-04-02 22:18 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 2130 bytes --]
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
TO: Sasha Levin <sashal@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git pending-5.17
head: 910f479048304416d2f70a98fb84a9466e56c169
commit: b7a792309fd10eaabb0476bc2f1c632d8383c0b9 [23/787] bus: mhi: Fix pm_state conversion to string
:::::: branch date: 21 hours ago
:::::: commit date: 34 hours ago
compiler: s390-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> drivers/bus/mhi/core/init.c:87:16: warning: Uninitialized variable: index [uninitvar]
if (!state || index >= ARRAY_SIZE(mhi_pm_state_str))
^
drivers/bus/mhi/core/init.c:84:6: note: Assuming condition is false
if (state)
^
drivers/bus/mhi/core/init.c:87:16: note: Uninitialized variable: index
if (!state || index >= ARRAY_SIZE(mhi_pm_state_str))
^
vim +87 drivers/bus/mhi/core/init.c
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20 79
b7a792309fd10e Paul Davey 2022-03-01 80 const char *to_mhi_pm_state_str(u32 state)
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20 81 {
b7a792309fd10e Paul Davey 2022-03-01 82 int index;
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20 83
b7a792309fd10e Paul Davey 2022-03-01 84 if (state)
b7a792309fd10e Paul Davey 2022-03-01 85 index = __fls(state);
b7a792309fd10e Paul Davey 2022-03-01 86
b7a792309fd10e Paul Davey 2022-03-01 @87 if (!state || index >= ARRAY_SIZE(mhi_pm_state_str))
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20 88 return "Invalid State";
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20 89
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20 90 return mhi_pm_state_str[index];
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20 91 }
a6e2e3522f2914 Manivannan Sadhasivam 2020-02-20 92
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-04-02 22:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-02 22:18 [sashal-stable:pending-5.17 23/787] drivers/bus/mhi/core/init.c:87:16: warning: Uninitialized variable: index [uninitvar] kernel test robot
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.