Lines Matching refs:next

121 		slot = slot->next;
307 if (!((*head)->next))
314 if (((*head)->next) &&
315 ((*head)->length > (*head)->next->length)) {
318 *head = (*head)->next;
319 current_res->next = (*head)->next;
320 (*head)->next = current_res;
325 while (current_res->next && current_res->next->next) {
326 if (current_res->next->length > current_res->next->next->length) {
328 next_res = current_res->next;
329 current_res->next = current_res->next->next;
330 current_res = current_res->next;
331 next_res->next = current_res->next;
332 current_res->next = next_res;
334 current_res = current_res->next;
355 if (!((*head)->next))
362 if (((*head)->next) &&
363 ((*head)->length < (*head)->next->length)) {
366 *head = (*head)->next;
367 current_res->next = (*head)->next;
368 (*head)->next = current_res;
373 while (current_res->next && current_res->next->next) {
374 if (current_res->next->length < current_res->next->next->length) {
376 next_res = current_res->next;
377 current_res->next = current_res->next->next;
378 current_res = current_res->next;
379 next_res->next = current_res->next;
380 current_res->next = next_res;
382 current_res = current_res->next;
446 split_node->next = node;
454 *head = node->next;
457 while (prevnode->next != node)
458 prevnode = prevnode->next;
460 prevnode->next = node->next;
462 node->next = NULL;
487 while (node->next) {
489 node = node->next;
542 for (node = *head; node; node = node->next) {
567 split_node->next = node->next;
568 node->next = split_node;
586 split_node->next = node->next;
587 node->next = split_node;
598 *head = node->next;
601 while (prevnode->next != node)
602 prevnode = prevnode->next;
604 prevnode->next = node->next;
606 node->next = NULL;
636 for (max = *head; max; max = max->next) {
638 * instead we'll continue to the next.
663 split_node->next = max->next;
664 max->next = split_node;
681 split_node->next = max->next;
682 max->next = split_node;
692 *head = max->next;
694 while (temp && temp->next != max)
695 temp = temp->next;
698 temp->next = max->next;
701 max->next = NULL;
733 for (node = *head; node; node = node->next) {
760 split_node->next = node->next;
761 node->next = split_node;
780 split_node->next = node->next;
781 node->next = split_node;
788 *head = node->next;
791 while (prevnode->next != node)
792 prevnode = prevnode->next;
794 prevnode->next = node->next;
796 node->next = NULL;
824 dbg("*head->next = %p\n", (*head)->next);
826 if (!(*head)->next)
830 dbg("*head->next->base = 0x%x\n", (*head)->next->base);
835 if (((*head)->next) &&
836 ((*head)->base > (*head)->next->base)) {
838 (*head) = (*head)->next;
839 node1->next = (*head)->next;
840 (*head)->next = node1;
846 while (node1->next && node1->next->next) {
847 if (node1->next->base > node1->next->next->base) {
849 node2 = node1->next;
850 node1->next = node1->next->next;
851 node1 = node1->next;
852 node2->next = node1->next;
853 node1->next = node2;
855 node1 = node1->next;
861 while (node1 && node1->next) {
862 if ((node1->base + node1->length) == node1->next->base) {
865 node1->length += node1->next->length;
866 node2 = node1->next;
867 node1->next = node1->next->next;
870 node1 = node1->next;
956 struct pci_func *next;
962 new_slot->next = NULL;
968 next = cpqhp_slot_list[busnumber];
969 while (next->next != NULL)
970 next = next->next;
971 next->next = new_slot;
985 struct pci_func *next;
990 next = cpqhp_slot_list[old_slot->bus];
991 if (next == NULL)
994 if (next == old_slot) {
995 cpqhp_slot_list[old_slot->bus] = old_slot->next;
1001 while ((next->next != old_slot) && (next->next != NULL))
1002 next = next->next;
1004 if (next->next == old_slot) {
1005 next->next = old_slot->next;
1024 struct pci_func *next;
1030 next = cpqhp_slot_list[tempBus];
1032 while (!slot_remove(next))
1033 next = cpqhp_slot_list[tempBus];
1036 next = cpqhp_slot_list[bridge->bus];
1038 if (next == NULL)
1041 if (next == bridge) {
1042 cpqhp_slot_list[bridge->bus] = bridge->next;
1046 while ((next->next != bridge) && (next->next != NULL))
1047 next = next->next;
1049 if (next->next != bridge)
1051 next->next = bridge->next;
1079 while (func->next != NULL) {
1080 func = func->next;
1129 for (slot = ctrl->slot; slot; slot = slot->next) {
1562 /* next, we will instantiate the linux pci_dev structures (with
1740 for (ctrl = cpqhp_ctrl_list; ctrl; ctrl = ctrl->next)
2113 /* Get ready for next iteration */
2164 /* Get ready for next iteration */
2174 /* Get ready for next iteration */
2258 /* The following loop skips to the next present function
2401 dbg("(base, len, next) (%x, %x, %p)\n", io_node->base,
2402 io_node->length, io_node->next);
2404 dbg("(base, len, next) (%x, %x, %p)\n", mem_node->base,
2405 mem_node->length, mem_node->next);
2407 dbg("(base, len, next) (%x, %x, %p)\n", p_mem_node->base,
2408 p_mem_node->length, p_mem_node->next);
2456 bus_node->next = NULL;
2461 io_node->next = NULL;
2474 mem_node->next = NULL;
2484 p_mem_node->next = NULL;
2554 hold_bus_node->next = func->bus_head;
2596 hold_IO_node->next = func->io_head;
2613 hold_IO_node->next = func->io_head;
2618 hold_IO_node->next = func->io_head;
2646 hold_mem_node->next = func->mem_head;
2665 hold_mem_node->next = func->mem_head;
2670 hold_mem_node->next = func->mem_head;
2699 hold_p_mem_node->next = func->p_mem_head;
2716 hold_p_mem_node->next = func->p_mem_head;
2721 hold_p_mem_node->next = func->p_mem_head;
2772 dbg("Got io_node start = %8.8x, length = %8.8x next (%p)\n",
2773 io_node->base, io_node->length, io_node->next);
2778 io_node->next = func->io_head;
2792 p_mem_node->next = func->p_mem_head;
2808 mem_node->next = func->mem_head;