[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20120701.031746.1509824948499955130.davem@davemloft.net>
Date: Sun, 01 Jul 2012 03:17:46 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: ogerlitz@...lanox.com
Cc: roland@...nel.org, yevgenyp@...lanox.com, oren@...lanox.com,
netdev@...r.kernel.org, hadarh@...lanox.co.il
Subject: Re: [PATCH net-next 01/10] net/mlx4_core: Change resource tracking
mechanism to use red-black tree
From: Or Gerlitz <ogerlitz@...lanox.com>
Date: Sun, 1 Jul 2012 12:43:34 +0300
> @@ -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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists