net/*: use linux/kernel.h swap()

tcp_sack_swap seems unnecessary so I pushed swap to the caller.
Also removed comment that seemed then pointless, and added include
when not already there. Compile tested.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Ilpo Järvinen
2009-03-21 13:36:17 -07:00
committed by David S. Miller
parent a3ac80a130
commit a0bffffc14
4 changed files with 8 additions and 37 deletions

View File

@@ -236,7 +236,6 @@ static int tbf_change(struct Qdisc* sch, struct nlattr *opt)
struct tc_tbf_qopt *qopt;
struct qdisc_rate_table *rtab = NULL;
struct qdisc_rate_table *ptab = NULL;
struct qdisc_rate_table *tmp;
struct Qdisc *child = NULL;
int max_size,n;
@@ -295,13 +294,9 @@ static int tbf_change(struct Qdisc* sch, struct nlattr *opt)
q->tokens = q->buffer;
q->ptokens = q->mtu;
tmp = q->R_tab;
q->R_tab = rtab;
rtab = tmp;
swap(q->R_tab, rtab);
swap(q->P_tab, ptab);
tmp = q->P_tab;
q->P_tab = ptab;
ptab = tmp;
sch_tree_unlock(sch);
err = 0;
done: