]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PCI: hotplug: Drop superfluous pci_hotplug_slot_list
authorLukas Wunner <lukas@wunner.de>
Tue, 25 Feb 2025 17:06:01 +0000 (18:06 +0100)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 4 Mar 2025 23:00:12 +0000 (17:00 -0600)
commit5c8265fa63e4c60cd80f28bb0a682cf97b8a60e9
tree9bac7a7be84517d767fed82ec2c24abfcef1b0d7
parent8ff4574cf73dba061d4a07e3b6094c5ecb2d2efe
PCI: hotplug: Drop superfluous pci_hotplug_slot_list

The PCI hotplug core keeps a list of all registered slots.  Its sole
purpose is to WARN() on slot removal if another slot is using the same
name.

But this can never happen because already on slot creation, an error is
returned and multiple messages are emitted if a slot's name is
duplicated:

  pci_hp_register()
    __pci_hp_register()
      __pci_hp_initialize()
        pci_create_slot()
          kobject_init_and_add()
            kobject_add_varg()
              kobject_add_internal()
                create_dir()
                  sysfs_create_dir_ns()
                    kernfs_create_dir_ns()
                      sysfs_warn_dup()
                        pr_warn("cannot create duplicate filename ...")
                pr_err("%s failed for %s with -EEXIST, ...");

Drop the superfluous list.

Link: https://lore.kernel.org/r/603735bc50eb370bc7f1c358441ac671360bab25.1740501868.git.lukas@wunner.de
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/hotplug/pci_hotplug_core.c
include/linux/pci_hotplug.h