From e6e9a9a455fd19f00250634bc0405e69396bd522 Mon Sep 17 00:00:00 2001 From: Nam Cao Date: Fri, 3 May 2024 21:23:21 +0200 Subject: PCI: hotplug: Document unchecked return value of pci_hp_add_bridge() Some hotplug drivers do not check the return value of pci_hp_add_bridge(). This may be problematic if the driver proceeds after pci_hp_add_bridge() fails. Link: https://lore.kernel.org/r/16a2442ea6ee896987a44df3ed509e4cfde44475.1714762038.git.namcao@linutronix.de Signed-off-by: Nam Cao Signed-off-by: Bjorn Helgaas --- drivers/pci/hotplug/TODO | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers/pci') diff --git a/drivers/pci/hotplug/TODO b/drivers/pci/hotplug/TODO index fdb8dd6ea24d..f0a1746c3c88 100644 --- a/drivers/pci/hotplug/TODO +++ b/drivers/pci/hotplug/TODO @@ -6,6 +6,8 @@ cpcihp: ->set_power callbacks in struct cpci_hp_controller_ops. Why were they introduced? Can they be removed from the struct? +* Returned code from pci_hp_add_bridge() is not checked. + cpqphp: * The driver spawns a kthread cpqhp_event_thread() which is woken by the @@ -16,6 +18,8 @@ cpqphp: * A large portion of cpqphp_ctrl.c and cpqphp_pci.c concerns resource management. Doesn't this duplicate functionality in the core? +* Returned code from pci_hp_add_bridge() is not checked. + ibmphp: * Implementations of hotplug_slot_ops callbacks such as get_adapter_present() @@ -43,6 +47,8 @@ ibmphp: * A large portion of ibmphp_res.c and ibmphp_pci.c concerns resource management. Doesn't this duplicate functionality in the core? +* Returned code from pci_hp_add_bridge() is not checked. + sgi_hotplug: * Several functions access the pci_slot member in struct hotplug_slot even -- cgit v1.2.3 From b023c1c97f8a84f3ee5502cee2a7b62bc3f447a8 Mon Sep 17 00:00:00 2001 From: Nam Cao Date: Fri, 3 May 2024 21:23:22 +0200 Subject: PCI: hotplug: Remove obsolete sgi_hotplug TODO notes Commit c7532b601e77 ("PCI/hotplug: remove the sgi_hotplug driver") deleted the driver. Remove the remaining TODO notes as well. Link: https://lore.kernel.org/r/26784ee39fbb3fbd0fe96508158d74419018e6ad.1714762038.git.namcao@linutronix.de Signed-off-by: Nam Cao Signed-off-by: Bjorn Helgaas --- drivers/pci/hotplug/TODO | 8 -------- 1 file changed, 8 deletions(-) (limited to 'drivers/pci') diff --git a/drivers/pci/hotplug/TODO b/drivers/pci/hotplug/TODO index f0a1746c3c88..9d428b0ea524 100644 --- a/drivers/pci/hotplug/TODO +++ b/drivers/pci/hotplug/TODO @@ -49,14 +49,6 @@ ibmphp: * Returned code from pci_hp_add_bridge() is not checked. -sgi_hotplug: - -* Several functions access the pci_slot member in struct hotplug_slot even - though pci_hotplug.h declares it private. See sn_hp_destroy() for an - example. Either the pci_slot member should no longer be declared private - or sgi_hotplug should store a pointer to it in struct slot. Probably the - former. - shpchp: * There is only a single implementation of struct hpc_ops. Can the struct be -- cgit v1.2.3