Thread (45 messages) flat view 45 messages, 7 authors, 2012-07-03

Re: [PATCH net-next 01/10] net/mlx4_core: Change resource tracking mechanism to use red-black tree

From: David Miller <davem@davemloft.net>
Date: 2012-07-01 10:17:49

From: Or Gerlitz <redacted>
Date: Sun,  1 Jul 2012 12:43:34 +0300
quoted hunk ↗ jump to hunk
@@ -733,7 +776,7 @@ static int qp_res_start_move_to(struct mlx4_dev *dev, int slave, int qpn,
 	int err = 0;
 
 	spin_lock_irq(mlx4_tlock(dev));
-	r = radix_tree_lookup(&tracker->res_tree[RES_QP], qpn);
+	r = (struct res_qp *)res_tracker_lookup(&tracker->res_tree[RES_QP], qpn);
 	if (!r)
 		err = -ENOENT;
 	else if (r->com.owner != slave)
Casts are terrible, return "void *" from res_tracker_lookup() just as
radix_tree_lookup() does.

Also you have indentation problems all over this patch.  When you have
a multi-line function call the first non-whitespace character on the
second and subsequent lines should line up with the first column after
the openning parenthesis on the first line.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help