Skip to content

Commit

Permalink
PCI: cpqphp: Remove unreachable path
Browse files Browse the repository at this point in the history
register & 0x0B == 0x04 is never true, the code will always take the
(identical) 0x00 path anyway. Remove the dead code paths.

Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=44151
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
  • Loading branch information
Alan Cox authored and Bjorn Helgaas committed Sep 10, 2012
1 parent f8ba65e commit b161dab
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions drivers/pci/hotplug/cpqphp_ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2890,27 +2890,8 @@ static int configure_new_function(struct controller *ctrl, struct pci_func *func
func->mem_head = mem_node;
} else
return -ENOMEM;
} else if ((temp_register & 0x0BL) == 0x04) {
/* Map memory */
base = temp_register & 0xFFFFFFF0;
base = ~base + 1;

dbg("CND: length = 0x%x\n", base);
mem_node = get_resource(&(resources->mem_head), base);

/* allocate the resource to the board */
if (mem_node) {
base = mem_node->base;

mem_node->next = func->mem_head;
func->mem_head = mem_node;
} else
return -ENOMEM;
} else if ((temp_register & 0x0BL) == 0x06) {
/* Those bits are reserved, we can't handle this */
return 1;
} else {
/* Requesting space below 1M */
/* Reserved bits or requesting space below 1M */
return NOT_ENOUGH_RESOURCES;
}

Expand Down

0 comments on commit b161dab

Please sign in to comment.