* [thomas-weissschuh:b4/b4-sysfs-const-attr-prep-easy 57/57] drivers/pci/hotplug/pci_hotplug_core.c:255:63: warning: variable 'slot' is uninitialized when used here
@ 2026-06-24 4:07 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-06-24 4:07 UTC (permalink / raw)
To: Thomas Weißschuh ; +Cc: llvm, oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/thomas.weissschuh/linux.git b4/b4-sysfs-const-attr-prep-easy
head: 67a3c6abb9033d2ce2a9ac12d4cfb9530148b38f
commit: 67a3c6abb9033d2ce2a9ac12d4cfb9530148b38f [57/57] hotplug
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20260624/202606241242.MfC5ItwK-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project a9b492db3d50683e446cd1a5c9ffaf4e92cb77a7)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260624/202606241242.MfC5ItwK-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/202606241242.MfC5ItwK-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/pci/hotplug/pci_hotplug_core.c:255:63: warning: variable 'slot' is uninitialized when used here [-Wuninitialized]
255 | if (attr == &hotplug_slot_attr_power.attr && !has_power_file(slot))
| ^~~~
drivers/pci/hotplug/pci_hotplug_core.c:253:27: note: initialize the variable 'slot' to silence this warning
253 | struct hotplug_slot *slot;
| ^
| = NULL
1 warning generated.
vim +/slot +255 drivers/pci/hotplug/pci_hotplug_core.c
250
251 static umode_t hotplug_slot_attr_is_visible(struct kobject *kobj, const struct attribute *attr, int idx)
252 {
253 struct hotplug_slot *slot;
254
> 255 if (attr == &hotplug_slot_attr_power.attr && !has_power_file(slot))
256 return 0;
257
258 if (attr == &hotplug_slot_attr_attention.attr && !has_attention_file(slot))
259 return 0;
260
261 if (attr == &hotplug_slot_attr_latch.attr && !has_latch_file(slot))
262 return 0;
263
264 if (attr == &hotplug_slot_attr_presence.attr && !has_adapter_file(slot))
265 return 0;
266
267 if (attr == &hotplug_slot_attr_test.attr && !has_test_file(slot))
268 return 0;
269
270 return attr->mode;
271 }
272
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-24 4:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-24 4:07 [thomas-weissschuh:b4/b4-sysfs-const-attr-prep-easy 57/57] drivers/pci/hotplug/pci_hotplug_core.c:255:63: warning: variable 'slot' is uninitialized when used here kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox