Lines Matching refs:next

135 		slot = slot->next;  in cpqhp_find_slot()
321 if (!((*head)->next)) in sort_by_size()
328 if (((*head)->next) && in sort_by_size()
329 ((*head)->length > (*head)->next->length)) { in sort_by_size()
332 *head = (*head)->next; in sort_by_size()
333 current_res->next = (*head)->next; in sort_by_size()
334 (*head)->next = current_res; in sort_by_size()
339 while (current_res->next && current_res->next->next) { in sort_by_size()
340 if (current_res->next->length > current_res->next->next->length) { in sort_by_size()
342 next_res = current_res->next; in sort_by_size()
343 current_res->next = current_res->next->next; in sort_by_size()
344 current_res = current_res->next; in sort_by_size()
345 next_res->next = current_res->next; in sort_by_size()
346 current_res->next = next_res; in sort_by_size()
348 current_res = current_res->next; in sort_by_size()
369 if (!((*head)->next)) in sort_by_max_size()
376 if (((*head)->next) && in sort_by_max_size()
377 ((*head)->length < (*head)->next->length)) { in sort_by_max_size()
380 *head = (*head)->next; in sort_by_max_size()
381 current_res->next = (*head)->next; in sort_by_max_size()
382 (*head)->next = current_res; in sort_by_max_size()
387 while (current_res->next && current_res->next->next) { in sort_by_max_size()
388 if (current_res->next->length < current_res->next->next->length) { in sort_by_max_size()
390 next_res = current_res->next; in sort_by_max_size()
391 current_res->next = current_res->next->next; in sort_by_max_size()
392 current_res = current_res->next; in sort_by_max_size()
393 next_res->next = current_res->next; in sort_by_max_size()
394 current_res->next = next_res; in sort_by_max_size()
396 current_res = current_res->next; in sort_by_max_size()
460 split_node->next = node; in do_pre_bridge_resource_split()
468 *head = node->next; in do_pre_bridge_resource_split()
471 while (prevnode->next != node) in do_pre_bridge_resource_split()
472 prevnode = prevnode->next; in do_pre_bridge_resource_split()
474 prevnode->next = node->next; in do_pre_bridge_resource_split()
476 node->next = NULL; in do_pre_bridge_resource_split()
501 while (node->next) { in do_bridge_resource_split()
503 node = node->next; in do_bridge_resource_split()
556 for (node = *head; node; node = node->next) { in get_io_resource()
581 split_node->next = node->next; in get_io_resource()
582 node->next = split_node; in get_io_resource()
600 split_node->next = node->next; in get_io_resource()
601 node->next = split_node; in get_io_resource()
612 *head = node->next; in get_io_resource()
615 while (prevnode->next != node) in get_io_resource()
616 prevnode = prevnode->next; in get_io_resource()
618 prevnode->next = node->next; in get_io_resource()
620 node->next = NULL; in get_io_resource()
650 for (max = *head; max; max = max->next) { in get_max_resource()
677 split_node->next = max->next; in get_max_resource()
678 max->next = split_node; in get_max_resource()
695 split_node->next = max->next; in get_max_resource()
696 max->next = split_node; in get_max_resource()
706 *head = max->next; in get_max_resource()
708 while (temp && temp->next != max) in get_max_resource()
709 temp = temp->next; in get_max_resource()
712 temp->next = max->next; in get_max_resource()
715 max->next = NULL; in get_max_resource()
747 for (node = *head; node; node = node->next) { in get_resource()
774 split_node->next = node->next; in get_resource()
775 node->next = split_node; in get_resource()
794 split_node->next = node->next; in get_resource()
795 node->next = split_node; in get_resource()
802 *head = node->next; in get_resource()
805 while (prevnode->next != node) in get_resource()
806 prevnode = prevnode->next; in get_resource()
808 prevnode->next = node->next; in get_resource()
810 node->next = NULL; in get_resource()
838 dbg("*head->next = %p\n",(*head)->next); in cpqhp_resource_sort_and_combine()
840 if (!(*head)->next) in cpqhp_resource_sort_and_combine()
844 dbg("*head->next->base = 0x%x\n",(*head)->next->base); in cpqhp_resource_sort_and_combine()
849 if (((*head)->next) && in cpqhp_resource_sort_and_combine()
850 ((*head)->base > (*head)->next->base)) { in cpqhp_resource_sort_and_combine()
852 (*head) = (*head)->next; in cpqhp_resource_sort_and_combine()
853 node1->next = (*head)->next; in cpqhp_resource_sort_and_combine()
854 (*head)->next = node1; in cpqhp_resource_sort_and_combine()
860 while (node1->next && node1->next->next) { in cpqhp_resource_sort_and_combine()
861 if (node1->next->base > node1->next->next->base) { in cpqhp_resource_sort_and_combine()
863 node2 = node1->next; in cpqhp_resource_sort_and_combine()
864 node1->next = node1->next->next; in cpqhp_resource_sort_and_combine()
865 node1 = node1->next; in cpqhp_resource_sort_and_combine()
866 node2->next = node1->next; in cpqhp_resource_sort_and_combine()
867 node1->next = node2; in cpqhp_resource_sort_and_combine()
869 node1 = node1->next; in cpqhp_resource_sort_and_combine()
875 while (node1 && node1->next) { in cpqhp_resource_sort_and_combine()
876 if ((node1->base + node1->length) == node1->next->base) { in cpqhp_resource_sort_and_combine()
879 node1->length += node1->next->length; in cpqhp_resource_sort_and_combine()
880 node2 = node1->next; in cpqhp_resource_sort_and_combine()
881 node1->next = node1->next->next; in cpqhp_resource_sort_and_combine()
884 node1 = node1->next; in cpqhp_resource_sort_and_combine()
971 struct pci_func *next; in cpqhp_slot_create() local
977 new_slot->next = NULL; in cpqhp_slot_create()
983 next = cpqhp_slot_list[busnumber]; in cpqhp_slot_create()
984 while (next->next != NULL) in cpqhp_slot_create()
985 next = next->next; in cpqhp_slot_create()
986 next->next = new_slot; in cpqhp_slot_create()
1000 struct pci_func *next; in slot_remove() local
1005 next = cpqhp_slot_list[old_slot->bus]; in slot_remove()
1006 if (next == NULL) in slot_remove()
1009 if (next == old_slot) { in slot_remove()
1010 cpqhp_slot_list[old_slot->bus] = old_slot->next; in slot_remove()
1016 while ((next->next != old_slot) && (next->next != NULL)) in slot_remove()
1017 next = next->next; in slot_remove()
1019 if (next->next == old_slot) { in slot_remove()
1020 next->next = old_slot->next; in slot_remove()
1039 struct pci_func *next; in bridge_slot_remove() local
1045 next = cpqhp_slot_list[tempBus]; in bridge_slot_remove()
1047 while (!slot_remove(next)) in bridge_slot_remove()
1048 next = cpqhp_slot_list[tempBus]; in bridge_slot_remove()
1051 next = cpqhp_slot_list[bridge->bus]; in bridge_slot_remove()
1053 if (next == NULL) in bridge_slot_remove()
1056 if (next == bridge) { in bridge_slot_remove()
1057 cpqhp_slot_list[bridge->bus] = bridge->next; in bridge_slot_remove()
1061 while ((next->next != bridge) && (next->next != NULL)) in bridge_slot_remove()
1062 next = next->next; in bridge_slot_remove()
1064 if (next->next != bridge) in bridge_slot_remove()
1066 next->next = bridge->next; in bridge_slot_remove()
1094 while (func->next != NULL) { in cpqhp_slot_find()
1095 func = func->next; in cpqhp_slot_find()
1144 for (slot = ctrl->slot; slot; slot = slot->next) { in set_controller_speed()
1758 for (ctrl = cpqhp_ctrl_list; ctrl; ctrl=ctrl->next) in event_thread()
2460 io_node->length, io_node->next); in configure_new_function()
2463 mem_node->length, mem_node->next); in configure_new_function()
2466 p_mem_node->length, p_mem_node->next); in configure_new_function()
2514 bus_node->next = NULL; in configure_new_function()
2519 io_node->next = NULL; in configure_new_function()
2532 mem_node->next = NULL; in configure_new_function()
2542 p_mem_node->next = NULL; in configure_new_function()
2612 hold_bus_node->next = func->bus_head; in configure_new_function()
2654 hold_IO_node->next = func->io_head; in configure_new_function()
2671 hold_IO_node->next = func->io_head; in configure_new_function()
2676 hold_IO_node->next = func->io_head; in configure_new_function()
2704 hold_mem_node->next = func->mem_head; in configure_new_function()
2723 hold_mem_node->next = func->mem_head; in configure_new_function()
2728 hold_mem_node->next = func->mem_head; in configure_new_function()
2757 hold_p_mem_node->next = func->p_mem_head; in configure_new_function()
2774 hold_p_mem_node->next = func->p_mem_head; in configure_new_function()
2779 hold_p_mem_node->next = func->p_mem_head; in configure_new_function()
2829 io_node->base, io_node->length, io_node->next); in configure_new_function()
2836 io_node->next = func->io_head; in configure_new_function()
2852 p_mem_node->next = func->p_mem_head; in configure_new_function()
2868 mem_node->next = func->mem_head; in configure_new_function()