Lines Matching defs:node

147 static void mc_node_add(mc_dlist_t *node, mc_dlist_t **head, mc_dlist_t **tail);
148 static void mc_node_del(mc_dlist_t *node, mc_dlist_t **head, mc_dlist_t **tail);
350 /* get the soft state pointer for this device node */
786 * Gets the reg property from the memory node. This provides the various
804 ("mc-us3i: cannot find memory node under root\n"));
1434 * The new node is added at the tail and is not sorted.
1436 * Input: The pointer of node to be added, head and tail of the list
1440 mc_node_add(mc_dlist_t *node, mc_dlist_t **head, mc_dlist_t **tail)
1442 DPRINTF(MC_LIST_DEBUG, ("mc_node_add: node->id %d head %p tail %p\n",
1443 node->id, (void *) *head, (void *) *tail));
1446 node->prev = *tail;
1447 node->next = (*tail)->next;
1448 (*tail)->next = node;
1449 *tail = node;
1451 node->next = node->prev = NULL;
1452 *head = *tail = node;
1457 * Input: The pointer of node to be deleted, head and tail of the list
1459 * Deleted node will be at the following positions
1467 mc_node_del(mc_dlist_t *node, mc_dlist_t **head, mc_dlist_t **tail)
1469 if (node->next == NULL) {
1470 /* deleted node is at the tail of list */
1471 *tail = node->prev;
1473 node->next->prev = node->prev;
1476 if (node->prev == NULL) {
1477 /* deleted node is at the head of list */
1478 *head = node->next;
1480 node->prev->next = node->next;
1487 * Return: pointer of found node
1492 mc_dlist_t *node;
1494 node = head;
1495 while (node != NULL) {
1497 node->id, id));
1498 if (node->id == id)
1500 node = node->next;
1502 return (node);