/* do_bridge_resource_split - find one node of resources that aren't in use @head: list head @alignment: max node size (?)  */
static struct pci_resource* do_bridge_resource_split(struct pci_resource **head, u32 alignment)
/* do_bridge_resource_split - find one node of resources that aren't in use @head: list head @alignment: max node size (?)  */
static struct pci_resource* do_bridge_resource_split(struct pci_resource **head, u32 alignment)
{
	struct pci_resource *prevnode = NULL;
	struct pci_resource *node;
	u32 rc;
	u32 temp_dword;
	rc = cpqhp_resource_sort_and_combine(head);
	if (rc)
		return NULL;
	node = *head;
	while (node->next) {
		prevnode = node;
		node = node->next;
		kfree(prevnode);
	}
	if (node->length < alignment)
		goto error;
	if (node->base & (alignment - 1)) {
		temp_dword = (node->base | (alignment-1)) + 1;
		if ((node->length - (temp_dword - node->base)) < alignment)
			goto error;
		node->length -= (temp_dword - node->base);
		node->base = temp_dword;
	}
	if (node->length & (alignment - 1))
		goto error;
	return node;
error:
	kfree(node);
	return NULL;
}