linux/drivers/pci/hotplug
Rolf Eike Beer ac9e989187 PCI: Change memory allocation for acpiphp slots
Change memory allocation for acpiphp slots

Change the "struct slot" that acpiphp uses for managing it's slots to
directly contain the memory for the needed struct hotplug_slot_info and
the slot's name. This way we need only two memory allocations per slot
instead of four.

While we are at it: make_slot_name() is just a wrapper around snprintf()
knowing the right arguments to call it. Since the function makes just one
function call and is only called from one place I inlined it by hand.

Finally this fixes a possible bug waiting for someone to hit it. There were
two unused local variables in acpiphp_register_hotplug_slot(). gcc did not
find them because they were used in memory allocations with sizeof(*var).
They had the same types as the target of the allocation, but nevertheless
this was just weird.

Signed-off-by: Rolf Eike Beer <eike-hotplug@sf-tec.de>
Acked-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01 14:36:59 -08:00
..
Kconfig Still more typo fixes 2006-10-03 22:36:44 +02:00
Makefile ACPIPHP: use ACPI dock driver 2006-06-28 03:08:06 -04:00
acpi_pcihp.c PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
acpiphp.h PCI: Change memory allocation for acpiphp slots 2006-12-01 14:36:59 -08:00
acpiphp_core.c PCI: Change memory allocation for acpiphp slots 2006-12-01 14:36:59 -08:00
acpiphp_glue.c acpiphp: fix use of list_for_each macro 2006-12-01 14:36:58 -08:00
acpiphp_ibm.c PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
cpci_hotplug.h [PATCH] PCI Hotplug: CPCI update 2005-05-17 14:31:11 -07:00
cpci_hotplug_core.c PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
cpci_hotplug_pci.c PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
cpcihp_generic.c cpcihp_generic: prevent loading without "bridge" parameter 2006-10-18 11:36:12 -07:00
cpcihp_zt5550.c [PATCH] irq-flags: pci: Use the new IRQF_ constants 2006-07-02 13:58:52 -07:00
cpcihp_zt5550.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
cpqphp.h PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
cpqphp_core.c PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
cpqphp_ctrl.c PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
cpqphp_nvram.c PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
cpqphp_nvram.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
cpqphp_pci.c PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
cpqphp_sysfs.c PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
fakephp.c PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
ibmphp.h PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
ibmphp_core.c [PATCH] PCI Hotplug: fake NULL pointer dereferences in IBM Hot Plug Controller Driver 2006-06-19 14:13:24 -07:00
ibmphp_ebda.c [PATCH] ibmphp: remove TRUE and FALSE 2006-03-23 14:35:17 -08:00
ibmphp_hpc.c [PATCH] ibmphp: remove TRUE and FALSE 2006-03-23 14:35:17 -08:00
ibmphp_pci.c [PATCH] ibmphp: remove TRUE and FALSE 2006-03-23 14:35:17 -08:00
ibmphp_res.c [PATCH] ibmphp: remove TRUE and FALSE 2006-03-23 14:35:17 -08:00
pci_hotplug_core.c PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
pciehp.h PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
pciehp_core.c pciehp - add missing locking 2006-10-18 11:36:10 -07:00
pciehp_ctrl.c pciehp: Remove unnecessary check in pciehp_ctrl.c 2006-10-18 11:36:10 -07:00
pciehp_hpc.c pciehp - add missing locking 2006-10-18 11:36:10 -07:00
pciehp_pci.c [PATCH] pciehp: Add missing pci_dev_put 2006-06-19 14:13:23 -07:00
pcihp_skeleton.c PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
rpadlpar.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
rpadlpar_core.c [PATCH] sem2mutex: misc static one-file mutexes 2006-03-26 08:56:55 -08:00
rpadlpar_sysfs.c PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
rpaphp.h [PATCH] Fix up rpaphp driver for pci hotplug header move 2006-10-20 17:56:39 -07:00
rpaphp_core.c PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
rpaphp_pci.c [PATCH] powerpc/PCI hotplug: cleanup: add prefix 2006-01-31 18:00:13 -08:00
rpaphp_slot.c [PATCH] PCI: kzalloc() conversion in drivers/pci 2006-03-23 14:35:17 -08:00
sgi_hotplug.c Altix: SN ACPI hotplug support. 2006-12-01 14:36:58 -08:00
shpchp.h PCI Hotplug: move pci_hotplug.h to include/linux/ 2006-10-18 11:36:12 -07:00
shpchp_core.c SHPCHP: fix __must_check warnings 2006-09-26 17:43:53 -07:00
shpchp_ctrl.c [PATCH] shpchp: Cleanup improper info messages 2006-06-19 14:13:24 -07:00
shpchp_hpc.c PCI hotplug: ioremap balanced with iounmap 2006-10-18 11:36:11 -07:00
shpchp_pci.c [PATCH] acpi_pcihp: Add support for _HPX 2006-06-19 14:13:22 -07:00
shpchp_sysfs.c SHPCHP: fix __must_check warnings 2006-09-26 17:43:53 -07:00