From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com
Subject: drivers/net/wwan/t7xx/t7xx_pci.c:124:15: warning: Uninitialized variable: entity->id [uninitvar]
Date: Mon, 16 Jan 2023 19:24:54 +0800 [thread overview]
Message-ID: <202301161933.JsK1Yuiv-lkp@intel.com> (raw)
::::::
:::::: Manual check reason: "low confidence static check warning: drivers/net/wwan/t7xx/t7xx_pci.c:124:15: warning: Uninitialized variable: entity->id [uninitvar]"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Haijun Liu <haijun.liu@mediatek.com>
CC: Chandrashekar Devegowda <chandrashekar.devegowda@intel.com>
CC: Ricardo Martinez <ricardo.martinez@linux.intel.com>
CC: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5dc4c995db9eb45f6373a956eb1f69460e69e6d4
commit: 46e8f49ed7b3063f51e28f3ea2084b3da29c1503 net: wwan: t7xx: Introduce power management
date: 8 months ago
:::::: branch date: 20 hours ago
:::::: commit date: 8 months ago
compiler: csky-linux-gcc (GCC) 12.1.0
reproduce (cppcheck warning):
# apt-get install cppcheck
git checkout 46e8f49ed7b3063f51e28f3ea2084b3da29c1503
cppcheck --quiet --enable=style,performance,portability --template=gcc FILE
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> drivers/net/wwan/t7xx/t7xx_pci.c:124:15: warning: Uninitialized variable: entity->id [uninitvar]
if (entity->id == pm_entity->id) {
^
drivers/net/wwan/t7xx/t7xx_pci.c:141:15: warning: Uninitialized variable: entity->id [uninitvar]
if (entity->id == pm_entity->id) {
^
>> drivers/net/wwan/t7xx/t7xx_pci.c:382:15: warning: Uninitialized variable: entity->resume_early [uninitvar]
if (entity->resume_early)
^
drivers/net/wwan/t7xx/t7xx_pci.c:309:42: note: Assuming condition is false
if (atomic_read(&t7xx_dev->md_pm_state) <= MTK_PM_INIT) {
^
drivers/net/wwan/t7xx/t7xx_pci.c:382:15: note: Uninitialized variable: entity->resume_early
if (entity->resume_early)
^
vim +124 drivers/net/wwan/t7xx/t7xx_pci.c
46e8f49ed7b306 Haijun Liu 2022-05-06 117
46e8f49ed7b306 Haijun Liu 2022-05-06 118 int t7xx_pci_pm_entity_register(struct t7xx_pci_dev *t7xx_dev, struct md_pm_entity *pm_entity)
46e8f49ed7b306 Haijun Liu 2022-05-06 119 {
46e8f49ed7b306 Haijun Liu 2022-05-06 120 struct md_pm_entity *entity;
46e8f49ed7b306 Haijun Liu 2022-05-06 121
46e8f49ed7b306 Haijun Liu 2022-05-06 122 mutex_lock(&t7xx_dev->md_pm_entity_mtx);
46e8f49ed7b306 Haijun Liu 2022-05-06 123 list_for_each_entry(entity, &t7xx_dev->md_pm_entities, entity) {
46e8f49ed7b306 Haijun Liu 2022-05-06 @124 if (entity->id == pm_entity->id) {
46e8f49ed7b306 Haijun Liu 2022-05-06 125 mutex_unlock(&t7xx_dev->md_pm_entity_mtx);
46e8f49ed7b306 Haijun Liu 2022-05-06 126 return -EEXIST;
46e8f49ed7b306 Haijun Liu 2022-05-06 127 }
46e8f49ed7b306 Haijun Liu 2022-05-06 128 }
46e8f49ed7b306 Haijun Liu 2022-05-06 129
46e8f49ed7b306 Haijun Liu 2022-05-06 130 list_add_tail(&pm_entity->entity, &t7xx_dev->md_pm_entities);
46e8f49ed7b306 Haijun Liu 2022-05-06 131 mutex_unlock(&t7xx_dev->md_pm_entity_mtx);
46e8f49ed7b306 Haijun Liu 2022-05-06 132 return 0;
46e8f49ed7b306 Haijun Liu 2022-05-06 133 }
46e8f49ed7b306 Haijun Liu 2022-05-06 134
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
next reply other threads:[~2023-01-16 11:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-16 11:24 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-08-21 7:32 drivers/net/wwan/t7xx/t7xx_pci.c:124:15: warning: Uninitialized variable: entity->id [uninitvar] 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=202301161933.JsK1Yuiv-lkp@intel.com \
--to=lkp@intel.com \
--cc=oe-kbuild@lists.linux.dev \
/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.