rb_entry
node = rb_entry(rb, type, field); \
iter_node = rb_entry(parent, type, field); \
((ptr) != NULL ? rb_entry(ptr, type, member) : NULL)
RB_PROTOTYPE(iommu_gas_entries_tree, iommu_map_entry, rb_entry,
RB_ENTRY(iommu_map_entry) rb_entry; /* Links for domain entries */
if ((child = RB_LEFT(entry, rb_entry)) != NULL) {
if ((child = RB_RIGHT(entry, rb_entry)) != NULL) {
RB_GENERATE(iommu_gas_entries_tree, iommu_map_entry, rb_entry,
l = RB_LEFT(entry, rb_entry);
r = RB_RIGHT(entry, rb_entry);
if (RB_RIGHT(entry, rb_entry) != NULL)
else if (RB_LEFT(entry, rb_entry) != NULL)
nbr = RB_LEFT(entry, rb_entry);
nbr = RB_PARENT(entry, rb_entry);
if ((next = RB_RIGHT(curr, rb_entry)) != NULL &&
while ((next = RB_LEFT(curr, rb_entry)) != NULL &&
while ((next = RB_PARENT(curr, rb_entry)) != NULL &&
curr == RB_RIGHT(next, rb_entry))
first = RB_PARENT(first, rb_entry);
if ((first = RB_LEFT(curr, rb_entry)) != NULL &&
if ((first = RB_RIGHT(curr, rb_entry)) != NULL &&
first = RB_PARENT(first, rb_entry);
if ((first = RB_LEFT(curr, rb_entry)) != NULL &&
if ((first = RB_RIGHT(curr, rb_entry)) != NULL &&
curr = RB_PARENT(curr, rb_entry);
curr = RB_LEFT(curr, rb_entry);
curr = RB_RIGHT(curr, rb_entry);
if ((first = RB_LEFT(curr, rb_entry)) != NULL &&
if ((first = RB_RIGHT(curr, rb_entry)) != NULL &&
RB_UPDATE_AUGMENT(entry, rb_entry);
RB_UPDATE_AUGMENT(entry, rb_entry);
fs_rule = rb_entry(p, struct res_fs_rule, com.node);
rb_entry(node, struct id_map_entry, node);
ent = rb_entry(parent, struct id_map_entry, node);
rb_entry(rb_first(sl_id_map),
rb_entry(nd, struct id_map_entry, node);
group = rb_entry(p, struct mcast_group, node);
group = rb_entry(p, struct mcast_group, node);
group = rb_entry(node, struct mcast_group, node);
cur_group = rb_entry(parent, struct mcast_group, node);
tfp = rb_entry(parent, struct mlx5_fw_page, rb_node);
tfp = rb_entry(tmp, struct mlx5_fw_page, rb_node);
fwp = rb_entry(p, struct mlx5_fw_page, rb_node);
fwp = rb_entry(p, struct mlx5_fw_page, rb_node);
cur_cm_id_priv = rb_entry(parent, struct cm_id_private,
cm_id_priv = rb_entry(node, struct cm_id_private, service_node);
cur_timewait_info = rb_entry(parent, struct cm_timewait_info,
timewait_info = rb_entry(node, struct cm_timewait_info,
cur_timewait_info = rb_entry(parent, struct cm_timewait_info,
cur_cm_id_priv = rb_entry(parent, struct cm_id_private,
group = rb_entry(node, struct mcast_group, node);
cur_group = rb_entry(parent, struct mcast_group, node);
group = rb_entry(node, struct mcast_group, node);
scan = rb_entry(parent, struct xrcd_table_entry, node);
entry = rb_entry(p, struct xrcd_table_entry, node);
path = rb_entry(n, struct ipoib_path, rb_node);
tpath = rb_entry(pn, struct ipoib_path, rb_node);
path = rb_entry(n, struct ipoib_path, rb_node);
mcast = rb_entry(n, struct ipoib_mcast, rb_node);
tmcast = rb_entry(pn, struct ipoib_mcast, rb_node);
mcast = rb_entry(n, struct ipoib_mcast, rb_node);
l = RB_LEFT(entry, rb_entry);
r = RB_RIGHT(entry, rb_entry);