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()
957 struct pci_func *next; in cpqhp_slot_create() local
963 new_slot->next = NULL; in cpqhp_slot_create()
969 next = cpqhp_slot_list[busnumber]; in cpqhp_slot_create()
970 while (next->next != NULL) in cpqhp_slot_create()
971 next = next->next; in cpqhp_slot_create()
972 next->next = new_slot; in cpqhp_slot_create()
986 struct pci_func *next; in slot_remove() local
991 next = cpqhp_slot_list[old_slot->bus]; in slot_remove()
992 if (next == NULL) in slot_remove()
995 if (next == old_slot) { in slot_remove()
996 cpqhp_slot_list[old_slot->bus] = old_slot->next; in slot_remove()
1002 while ((next->next != old_slot) && (next->next != NULL)) in slot_remove()
1003 next = next->next; in slot_remove()
1005 if (next->next == old_slot) { in slot_remove()
1006 next->next = old_slot->next; in slot_remove()
1025 struct pci_func *next; in bridge_slot_remove() local
1031 next = cpqhp_slot_list[tempBus]; in bridge_slot_remove()
1033 while (!slot_remove(next)) in bridge_slot_remove()
1034 next = cpqhp_slot_list[tempBus]; in bridge_slot_remove()
1037 next = cpqhp_slot_list[bridge->bus]; in bridge_slot_remove()
1039 if (next == NULL) in bridge_slot_remove()
1042 if (next == bridge) { in bridge_slot_remove()
1043 cpqhp_slot_list[bridge->bus] = bridge->next; in bridge_slot_remove()
1047 while ((next->next != bridge) && (next->next != NULL)) in bridge_slot_remove()
1048 next = next->next; in bridge_slot_remove()
1050 if (next->next != bridge) in bridge_slot_remove()
1052 next->next = bridge->next; in bridge_slot_remove()
1080 while (func->next != NULL) { in cpqhp_slot_find()
1081 func = func->next; in cpqhp_slot_find()
1130 for (slot = ctrl->slot; slot; slot = slot->next) { in set_controller_speed()
1743 for (ctrl = cpqhp_ctrl_list; ctrl; ctrl = ctrl->next) in event_thread()
2414 io_node->length, io_node->next); in configure_new_function()
2417 mem_node->length, mem_node->next); in configure_new_function()
2420 p_mem_node->length, p_mem_node->next); in configure_new_function()
2468 bus_node->next = NULL; in configure_new_function()
2473 io_node->next = NULL; in configure_new_function()
2486 mem_node->next = NULL; in configure_new_function()
2496 p_mem_node->next = NULL; in configure_new_function()
2566 hold_bus_node->next = func->bus_head; in configure_new_function()
2608 hold_IO_node->next = func->io_head; in configure_new_function()
2625 hold_IO_node->next = func->io_head; in configure_new_function()
2630 hold_IO_node->next = func->io_head; in configure_new_function()
2658 hold_mem_node->next = func->mem_head; in configure_new_function()
2677 hold_mem_node->next = func->mem_head; in configure_new_function()
2682 hold_mem_node->next = func->mem_head; in configure_new_function()
2711 hold_p_mem_node->next = func->p_mem_head; in configure_new_function()
2728 hold_p_mem_node->next = func->p_mem_head; in configure_new_function()
2733 hold_p_mem_node->next = func->p_mem_head; in configure_new_function()
2785 io_node->base, io_node->length, io_node->next); in configure_new_function()
2790 io_node->next = func->io_head; in configure_new_function()
2804 p_mem_node->next = func->p_mem_head; in configure_new_function()
2820 mem_node->next = func->mem_head; in configure_new_function()