* [linux-next:master 1332/1999] drivers/thunderbolt/ctl.c:165:22: warning: Uninitialized variables: iter.kref, iter.ctl, iter.request, iter.request_size, iter.request_type, iter.response, iter.response_size, iter.response_type, iter.npackets, iter.match, iter.copy, iter.callback, iter.c...
@ 2022-04-05 16:29 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-04-05 16:29 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 4450 bytes --]
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: Jakob Koschel <jakobkoschel@gmail.com>
CC: Mika Westerberg <mika.westerberg@linux.intel.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 3ccc916812598a88b427859679ffd1641e67d4a2
commit: 03941ed91c7231e4973fb50de6c349974405df4e [1332/1999] thunderbolt: Replace usage of found with dedicated list iterator variable
:::::: branch date: 11 hours ago
:::::: commit date: 31 hours ago
compiler: sparc-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 warnings: (new ones prefixed by >>)
>> drivers/thunderbolt/debugfs.c:674:18: warning: Local variable 'debugfs_dir' shadows outer variable [shadowVariable]
struct dentry *debugfs_dir;
^
drivers/thunderbolt/debugfs.c:665:17: note: Shadowed declaration
struct dentry *debugfs_dir;
^
drivers/thunderbolt/debugfs.c:674:18: note: Shadow variable
struct dentry *debugfs_dir;
^
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> drivers/thunderbolt/tb.h:604:6: warning: Null pointer dereference: sw [ctunullpointer]
if (sw->is_unplugged)
^
drivers/thunderbolt/debugfs.c:377:10: note: Calling function cap_show, 2nd argument is null
cap_show(s, NULL, port, cap, header.basic.cap, vsec_id, length);
^
drivers/thunderbolt/debugfs.c:291:10: note: Calling function tb_sw_read, 1st argument is null
ret = tb_sw_read(sw, data, TB_CFG_SWITCH, cap + offset, dwords);
^
drivers/thunderbolt/tb.h:604:6: note: Dereferencing argument sw that is null
if (sw->is_unplugged)
^
--
>> drivers/thunderbolt/ctl.c:165:22: warning: Uninitialized variables: iter.kref, iter.ctl, iter.request, iter.request_size, iter.request_type, iter.response, iter.response_size, iter.response_type, iter.npackets, iter.match, iter.copy, iter.callback, iter.callback_data, iter.flags, iter.work, iter.result, iter.list [uninitvar]
tb_cfg_request_get(iter);
^
--
>> drivers/tty/tty_buffer.c:133:2: warning: There is an unknown macro here somewhere. Configuration is required. If llist_for_each_entry_safe is a macro then please configure it. [unknownMacro]
llist_for_each_entry_safe(p, next, llist, free)
^
--
>> drivers/tty/vt/selection.c:90:32: warning: Parameter 'vc' can be declared with const [constParameter]
bool vc_is_sel(struct vc_data *vc)
^
--
>> drivers/tty/tty_io.c:545:61: warning: Parameter 'tty' can be declared with const [constParameter]
static struct file *tty_release_redirect(struct tty_struct *tty)
^
vim +165 drivers/thunderbolt/ctl.c
d7f781bfdbf4eb Mika Westerberg 2017-06-06 157
d7f781bfdbf4eb Mika Westerberg 2017-06-06 158 static struct tb_cfg_request *
d7f781bfdbf4eb Mika Westerberg 2017-06-06 159 tb_cfg_request_find(struct tb_ctl *ctl, struct ctl_pkg *pkg)
d7f781bfdbf4eb Mika Westerberg 2017-06-06 160 {
03941ed91c7231 Jakob Koschel 2022-03-24 161 struct tb_cfg_request *req = NULL, *iter;
d7f781bfdbf4eb Mika Westerberg 2017-06-06 162
d7f781bfdbf4eb Mika Westerberg 2017-06-06 163 mutex_lock(&pkg->ctl->request_queue_lock);
03941ed91c7231 Jakob Koschel 2022-03-24 164 list_for_each_entry(iter, &pkg->ctl->request_queue, list) {
03941ed91c7231 Jakob Koschel 2022-03-24 @165 tb_cfg_request_get(iter);
03941ed91c7231 Jakob Koschel 2022-03-24 166 if (iter->match(iter, pkg)) {
03941ed91c7231 Jakob Koschel 2022-03-24 167 req = iter;
d7f781bfdbf4eb Mika Westerberg 2017-06-06 168 break;
d7f781bfdbf4eb Mika Westerberg 2017-06-06 169 }
03941ed91c7231 Jakob Koschel 2022-03-24 170 tb_cfg_request_put(iter);
d7f781bfdbf4eb Mika Westerberg 2017-06-06 171 }
d7f781bfdbf4eb Mika Westerberg 2017-06-06 172 mutex_unlock(&pkg->ctl->request_queue_lock);
d7f781bfdbf4eb Mika Westerberg 2017-06-06 173
03941ed91c7231 Jakob Koschel 2022-03-24 174 return req;
d7f781bfdbf4eb Mika Westerberg 2017-06-06 175 }
d7f781bfdbf4eb Mika Westerberg 2017-06-06 176
--
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-05 16:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-05 16:29 [linux-next:master 1332/1999] drivers/thunderbolt/ctl.c:165:22: warning: Uninitialized variables: iter.kref, iter.ctl, iter.request, iter.request_size, iter.request_type, iter.response, iter.response_size, iter.response_type, iter.npackets, iter.match, iter.copy, iter.callback, iter.c 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.