Lines Matching refs:next
121 slot = slot->next; in cpqhp_find_slot()
307 if (!((*head)->next)) in sort_by_size()
314 if (((*head)->next) && in sort_by_size()
315 ((*head)->length > (*head)->next->length)) { in sort_by_size()
318 *head = (*head)->next; in sort_by_size()
319 current_res->next = (*head)->next; in sort_by_size()
320 (*head)->next = current_res; in sort_by_size()
325 while (current_res->next && current_res->next->next) { in sort_by_size()
326 if (current_res->next->length > current_res->next->next->length) { in sort_by_size()
328 next_res = current_res->next; in sort_by_size()
329 current_res->next = current_res->next->next; in sort_by_size()
330 current_res = current_res->next; in sort_by_size()
331 next_res->next = current_res->next; in sort_by_size()
332 current_res->next = next_res; in sort_by_size()
334 current_res = current_res->next; in sort_by_size()
355 if (!((*head)->next)) in sort_by_max_size()
362 if (((*head)->next) && in sort_by_max_size()
363 ((*head)->length < (*head)->next->length)) { in sort_by_max_size()
366 *head = (*head)->next; in sort_by_max_size()
367 current_res->next = (*head)->next; in sort_by_max_size()
368 (*head)->next = current_res; in sort_by_max_size()
373 while (current_res->next && current_res->next->next) { in sort_by_max_size()
374 if (current_res->next->length < current_res->next->next->length) { in sort_by_max_size()
376 next_res = current_res->next; in sort_by_max_size()
377 current_res->next = current_res->next->next; in sort_by_max_size()
378 current_res = current_res->next; in sort_by_max_size()
379 next_res->next = current_res->next; in sort_by_max_size()
380 current_res->next = next_res; in sort_by_max_size()
382 current_res = current_res->next; in sort_by_max_size()
446 split_node->next = node; in do_pre_bridge_resource_split()
454 *head = node->next; in do_pre_bridge_resource_split()
457 while (prevnode->next != node) in do_pre_bridge_resource_split()
458 prevnode = prevnode->next; in do_pre_bridge_resource_split()
460 prevnode->next = node->next; in do_pre_bridge_resource_split()
462 node->next = NULL; in do_pre_bridge_resource_split()
487 while (node->next) { in do_bridge_resource_split()
489 node = node->next; in do_bridge_resource_split()
542 for (node = *head; node; node = node->next) { in get_io_resource()
567 split_node->next = node->next; in get_io_resource()
568 node->next = split_node; in get_io_resource()
586 split_node->next = node->next; in get_io_resource()
587 node->next = split_node; in get_io_resource()
598 *head = node->next; in get_io_resource()
601 while (prevnode->next != node) in get_io_resource()
602 prevnode = prevnode->next; in get_io_resource()
604 prevnode->next = node->next; in get_io_resource()
606 node->next = NULL; in get_io_resource()
636 for (max = *head; max; max = max->next) { in get_max_resource()
663 split_node->next = max->next; in get_max_resource()
664 max->next = split_node; in get_max_resource()
681 split_node->next = max->next; in get_max_resource()
682 max->next = split_node; in get_max_resource()
692 *head = max->next; in get_max_resource()
694 while (temp && temp->next != max) in get_max_resource()
695 temp = temp->next; in get_max_resource()
698 temp->next = max->next; in get_max_resource()
701 max->next = NULL; in get_max_resource()
733 for (node = *head; node; node = node->next) { in get_resource()
760 split_node->next = node->next; in get_resource()
761 node->next = split_node; in get_resource()
780 split_node->next = node->next; in get_resource()
781 node->next = split_node; in get_resource()
788 *head = node->next; in get_resource()
791 while (prevnode->next != node) in get_resource()
792 prevnode = prevnode->next; in get_resource()
794 prevnode->next = node->next; in get_resource()
796 node->next = NULL; in get_resource()
824 dbg("*head->next = %p\n", (*head)->next); in cpqhp_resource_sort_and_combine()
826 if (!(*head)->next) in cpqhp_resource_sort_and_combine()
830 dbg("*head->next->base = 0x%x\n", (*head)->next->base); in cpqhp_resource_sort_and_combine()
835 if (((*head)->next) && in cpqhp_resource_sort_and_combine()
836 ((*head)->base > (*head)->next->base)) { in cpqhp_resource_sort_and_combine()
838 (*head) = (*head)->next; in cpqhp_resource_sort_and_combine()
839 node1->next = (*head)->next; in cpqhp_resource_sort_and_combine()
840 (*head)->next = node1; in cpqhp_resource_sort_and_combine()
846 while (node1->next && node1->next->next) { in cpqhp_resource_sort_and_combine()
847 if (node1->next->base > node1->next->next->base) { in cpqhp_resource_sort_and_combine()
849 node2 = node1->next; in cpqhp_resource_sort_and_combine()
850 node1->next = node1->next->next; in cpqhp_resource_sort_and_combine()
851 node1 = node1->next; in cpqhp_resource_sort_and_combine()
852 node2->next = node1->next; in cpqhp_resource_sort_and_combine()
853 node1->next = node2; in cpqhp_resource_sort_and_combine()
855 node1 = node1->next; in cpqhp_resource_sort_and_combine()
861 while (node1 && node1->next) { in cpqhp_resource_sort_and_combine()
862 if ((node1->base + node1->length) == node1->next->base) { in cpqhp_resource_sort_and_combine()
865 node1->length += node1->next->length; in cpqhp_resource_sort_and_combine()
866 node2 = node1->next; in cpqhp_resource_sort_and_combine()
867 node1->next = node1->next->next; in cpqhp_resource_sort_and_combine()
870 node1 = node1->next; in cpqhp_resource_sort_and_combine()
956 struct pci_func *next; in cpqhp_slot_create() local
962 new_slot->next = NULL; in cpqhp_slot_create()
968 next = cpqhp_slot_list[busnumber]; in cpqhp_slot_create()
969 while (next->next != NULL) in cpqhp_slot_create()
970 next = next->next; in cpqhp_slot_create()
971 next->next = new_slot; in cpqhp_slot_create()
985 struct pci_func *next; in slot_remove() local
990 next = cpqhp_slot_list[old_slot->bus]; in slot_remove()
991 if (next == NULL) in slot_remove()
994 if (next == old_slot) { in slot_remove()
995 cpqhp_slot_list[old_slot->bus] = old_slot->next; in slot_remove()
1001 while ((next->next != old_slot) && (next->next != NULL)) in slot_remove()
1002 next = next->next; in slot_remove()
1004 if (next->next == old_slot) { in slot_remove()
1005 next->next = old_slot->next; in slot_remove()
1024 struct pci_func *next; in bridge_slot_remove() local
1030 next = cpqhp_slot_list[tempBus]; in bridge_slot_remove()
1032 while (!slot_remove(next)) in bridge_slot_remove()
1033 next = cpqhp_slot_list[tempBus]; in bridge_slot_remove()
1036 next = cpqhp_slot_list[bridge->bus]; in bridge_slot_remove()
1038 if (next == NULL) in bridge_slot_remove()
1041 if (next == bridge) { in bridge_slot_remove()
1042 cpqhp_slot_list[bridge->bus] = bridge->next; in bridge_slot_remove()
1046 while ((next->next != bridge) && (next->next != NULL)) in bridge_slot_remove()
1047 next = next->next; in bridge_slot_remove()
1049 if (next->next != bridge) in bridge_slot_remove()
1051 next->next = bridge->next; in bridge_slot_remove()
1079 while (func->next != NULL) { in cpqhp_slot_find()
1080 func = func->next; in cpqhp_slot_find()
1129 for (slot = ctrl->slot; slot; slot = slot->next) { in set_controller_speed()
1740 for (ctrl = cpqhp_ctrl_list; ctrl; ctrl = ctrl->next) in event_thread()
2402 io_node->length, io_node->next); in configure_new_function()
2405 mem_node->length, mem_node->next); in configure_new_function()
2408 p_mem_node->length, p_mem_node->next); in configure_new_function()
2456 bus_node->next = NULL; in configure_new_function()
2461 io_node->next = NULL; in configure_new_function()
2474 mem_node->next = NULL; in configure_new_function()
2484 p_mem_node->next = NULL; in configure_new_function()
2554 hold_bus_node->next = func->bus_head; in configure_new_function()
2596 hold_IO_node->next = func->io_head; in configure_new_function()
2613 hold_IO_node->next = func->io_head; in configure_new_function()
2618 hold_IO_node->next = func->io_head; in configure_new_function()
2646 hold_mem_node->next = func->mem_head; in configure_new_function()
2665 hold_mem_node->next = func->mem_head; in configure_new_function()
2670 hold_mem_node->next = func->mem_head; in configure_new_function()
2699 hold_p_mem_node->next = func->p_mem_head; in configure_new_function()
2716 hold_p_mem_node->next = func->p_mem_head; in configure_new_function()
2721 hold_p_mem_node->next = func->p_mem_head; in configure_new_function()
2773 io_node->base, io_node->length, io_node->next); in configure_new_function()
2778 io_node->next = func->io_head; in configure_new_function()
2792 p_mem_node->next = func->p_mem_head; in configure_new_function()
2808 mem_node->next = func->mem_head; in configure_new_function()