Commit 0f0f1518 authored by Rolf Eike Beer's avatar Rolf Eike Beer Committed by Deepak Saxena

[PATCH] PCI Express Hotplug: kill more useless casts

This patch does two things:
-remove casts of pointers which are void* or already the correct type for the
 target
-if we dereferenced a struct member and copied this to it's own variable use
 this and don't dereference the member again
parent 38e0cb9d
This diff is collapsed.
...@@ -69,7 +69,7 @@ int pciehp_configure_device (struct controller* ctrl, struct pci_func* func) ...@@ -69,7 +69,7 @@ int pciehp_configure_device (struct controller* ctrl, struct pci_func* func)
if (func->pci_dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) { if (func->pci_dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
pci_read_config_byte(func->pci_dev, PCI_SECONDARY_BUS, &bus); pci_read_config_byte(func->pci_dev, PCI_SECONDARY_BUS, &bus);
child = (struct pci_bus*) pci_add_new_bus(func->pci_dev->bus, (func->pci_dev), bus); child = pci_add_new_bus(func->pci_dev->bus, (func->pci_dev), bus);
pci_do_scan_bus(child); pci_do_scan_bus(child);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment