From: kernel test robot <lkp@intel.com>
To: "Thomas Weißschuh " <linux@weissschuh.net>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [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
Date: Wed, 24 Jun 2026 12:07:51 +0800 [thread overview]
Message-ID: <202606241242.MfC5ItwK-lkp@intel.com> (raw)
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
reply other threads:[~2026-06-24 4:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202606241242.MfC5ItwK-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux@weissschuh.net \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox