Skip to content

Commit

Permalink
[NET] SCHED: Fix whitespace errors.
Browse files Browse the repository at this point in the history
Signed-off-by: YOSHIFUJI Hideaki <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
yoshfuji authored and David S. Miller committed Feb 11, 2007
1 parent 7612713 commit 10297b9
Show file tree
Hide file tree
Showing 33 changed files with 207 additions and 207 deletions.
34 changes: 17 additions & 17 deletions net/sched/act_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ int tcf_hash_release(struct tcf_common *p, int bind,
p->tcfc_bindcnt--;

p->tcfc_refcnt--;
if (p->tcfc_bindcnt <= 0 && p->tcfc_refcnt <= 0) {
if (p->tcfc_bindcnt <= 0 && p->tcfc_refcnt <= 0) {
tcf_hash_destroy(p, hinfo);
ret = 1;
}
Expand Down Expand Up @@ -362,7 +362,7 @@ static struct tc_action_ops *tc_lookup_action_id(u32 type)
#endif

int tcf_action_exec(struct sk_buff *skb, struct tc_action *act,
struct tcf_result *res)
struct tcf_result *res)
{
struct tc_action *a;
int ret = -1;
Expand Down Expand Up @@ -473,7 +473,7 @@ tcf_action_dump(struct sk_buff *skb, struct tc_action *act, int bind, int ref)
}

struct tc_action *tcf_action_init_1(struct rtattr *rta, struct rtattr *est,
char *name, int ovr, int bind, int *err)
char *name, int ovr, int bind, int *err)
{
struct tc_action *a;
struct tc_action_ops *a_o;
Expand Down Expand Up @@ -553,7 +553,7 @@ struct tc_action *tcf_action_init_1(struct rtattr *rta, struct rtattr *est,
}

struct tc_action *tcf_action_init(struct rtattr *rta, struct rtattr *est,
char *name, int ovr, int bind, int *err)
char *name, int ovr, int bind, int *err)
{
struct rtattr *tb[TCA_ACT_MAX_PRIO+1];
struct tc_action *head = NULL, *act, *act_prev = NULL;
Expand Down Expand Up @@ -590,7 +590,7 @@ int tcf_action_copy_stats(struct sk_buff *skb, struct tc_action *a,
int err = 0;
struct gnet_dump d;
struct tcf_act_hdr *h = a->priv;

if (h == NULL)
goto errout;

Expand Down Expand Up @@ -632,7 +632,7 @@ int tcf_action_copy_stats(struct sk_buff *skb, struct tc_action *a,

static int
tca_get_fill(struct sk_buff *skb, struct tc_action *a, u32 pid, u32 seq,
u16 flags, int event, int bind, int ref)
u16 flags, int event, int bind, int ref)
{
struct tcamsg *t;
struct nlmsghdr *nlh;
Expand All @@ -645,15 +645,15 @@ tca_get_fill(struct sk_buff *skb, struct tc_action *a, u32 pid, u32 seq,
t->tca_family = AF_UNSPEC;
t->tca__pad1 = 0;
t->tca__pad2 = 0;

x = (struct rtattr*) skb->tail;
RTA_PUT(skb, TCA_ACT_TAB, 0, NULL);

if (tcf_action_dump(skb, a, bind, ref) < 0)
goto rtattr_failure;

x->rta_len = skb->tail - (u8*)x;

nlh->nlmsg_len = skb->tail - b;
return skb->len;

Expand Down Expand Up @@ -852,7 +852,7 @@ tca_action_gd(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int event)
}

if (tca_get_fill(skb, head, pid, n->nlmsg_seq, 0, event,
0, 1) <= 0) {
0, 1) <= 0) {
kfree_skb(skb);
ret = -EINVAL;
goto err;
Expand All @@ -861,7 +861,7 @@ tca_action_gd(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int event)
/* now do the delete */
tcf_action_destroy(head, 0);
ret = rtnetlink_send(skb, pid, RTNLGRP_TC,
n->nlmsg_flags&NLM_F_ECHO);
n->nlmsg_flags&NLM_F_ECHO);
if (ret > 0)
return 0;
return ret;
Expand All @@ -872,7 +872,7 @@ tca_action_gd(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int event)
}

static int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event,
u16 flags)
u16 flags)
{
struct tcamsg *t;
struct nlmsghdr *nlh;
Expand Down Expand Up @@ -900,10 +900,10 @@ static int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event,
goto rtattr_failure;

x->rta_len = skb->tail - (u8*)x;

nlh->nlmsg_len = skb->tail - b;
NETLINK_CB(skb).dst_group = RTNLGRP_TC;

err = rtnetlink_send(skb, pid, RTNLGRP_TC, flags&NLM_F_ECHO);
if (err > 0)
err = 0;
Expand All @@ -915,7 +915,7 @@ static int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event,
return -1;
}


static int
tcf_action_add(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int ovr)
{
Expand Down Expand Up @@ -999,13 +999,13 @@ find_dump_kind(struct nlmsghdr *n)
return NULL;

if (rtattr_parse(tb, TCA_ACT_MAX_PRIO, RTA_DATA(tb1),
NLMSG_ALIGN(RTA_PAYLOAD(tb1))) < 0)
NLMSG_ALIGN(RTA_PAYLOAD(tb1))) < 0)
return NULL;
if (tb[0] == NULL)
return NULL;

if (rtattr_parse(tb2, TCA_ACT_MAX, RTA_DATA(tb[0]),
RTA_PAYLOAD(tb[0])) < 0)
RTA_PAYLOAD(tb[0])) < 0)
return NULL;
kind = tb2[TCA_ACT_KIND-1];

Expand Down Expand Up @@ -1043,7 +1043,7 @@ tc_dump_action(struct sk_buff *skb, struct netlink_callback *cb)
}

nlh = NLMSG_PUT(skb, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq,
cb->nlh->nlmsg_type, sizeof(*t));
cb->nlh->nlmsg_type, sizeof(*t));
t = NLMSG_DATA(nlh);
t->tca_family = AF_UNSPEC;
t->tca__pad1 = 0;
Expand Down
2 changes: 1 addition & 1 deletion net/sched/act_gact.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ static g_rand gact_rand[MAX_RAND]= { NULL, gact_net_rand, gact_determ };
#endif /* CONFIG_GACT_PROB */

static int tcf_gact_init(struct rtattr *rta, struct rtattr *est,
struct tc_action *a, int ovr, int bind)
struct tc_action *a, int ovr, int bind)
{
struct rtattr *tb[TCA_GACT_MAX];
struct tc_gact *parm;
Expand Down
4 changes: 2 additions & 2 deletions net/sched/act_ipt.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ static int ipt_init_target(struct ipt_entry_target *t, char *table, unsigned int
}
if (t->u.kernel.target->checkentry
&& !t->u.kernel.target->checkentry(table, NULL,
t->u.kernel.target, t->data,
t->u.kernel.target, t->data,
hook)) {
module_put(t->u.kernel.target->me);
ret = -EINVAL;
Expand All @@ -83,7 +83,7 @@ static void ipt_destroy_target(struct ipt_entry_target *t)
{
if (t->u.kernel.target->destroy)
t->u.kernel.target->destroy(t->u.kernel.target, t->data);
module_put(t->u.kernel.target->me);
module_put(t->u.kernel.target->me);
}

static int tcf_ipt_release(struct tcf_ipt *ipt, int bind)
Expand Down
10 changes: 5 additions & 5 deletions net/sched/act_pedit.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ static int tcf_pedit(struct sk_buff *skb, struct tc_action *a,
if (tkey->offmask) {
if (skb->len > tkey->at) {
char *j = pptr + tkey->at;
offset += ((*j & tkey->offmask) >>
tkey->shift);
offset += ((*j & tkey->offmask) >>
tkey->shift);
} else {
goto bad;
}
Expand All @@ -176,7 +176,7 @@ static int tcf_pedit(struct sk_buff *skb, struct tc_action *a,
*ptr = ((*ptr & tkey->mask) ^ tkey->val);
munged++;
}

if (munged)
skb->tc_verd = SET_TC_MUNGED(skb->tc_verd);
goto done;
Expand All @@ -200,8 +200,8 @@ static int tcf_pedit_dump(struct sk_buff *skb, struct tc_action *a,
struct tcf_pedit *p = a->priv;
struct tc_pedit *opt;
struct tcf_t t;
int s;
int s;

s = sizeof(*opt) + p->tcfp_nkeys * sizeof(struct tc_pedit_key);

/* netlink spinlocks held above us - must use ATOMIC */
Expand Down
12 changes: 6 additions & 6 deletions net/sched/act_police.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ struct tc_police_compat

#ifdef CONFIG_NET_CLS_ACT
static int tcf_act_police_walker(struct sk_buff *skb, struct netlink_callback *cb,
int type, struct tc_action *a)
int type, struct tc_action *a)
{
struct tcf_common *p;
int err = 0, index = -1, i = 0, s_i = 0, n_i = 0;
Expand Down Expand Up @@ -112,7 +112,7 @@ void tcf_police_destroy(struct tcf_police *p)
{
unsigned int h = tcf_hash(p->tcf_index, POL_TAB_MASK);
struct tcf_common **p1p;

for (p1p = &tcf_police_ht[h]; *p1p; p1p = &(*p1p)->tcfc_next) {
if (*p1p == &p->common) {
write_lock_bh(&police_lock);
Expand All @@ -135,7 +135,7 @@ void tcf_police_destroy(struct tcf_police *p)

#ifdef CONFIG_NET_CLS_ACT
static int tcf_act_police_locate(struct rtattr *rta, struct rtattr *est,
struct tc_action *a, int ovr, int bind)
struct tc_action *a, int ovr, int bind)
{
unsigned h;
int ret = 0, err;
Expand Down Expand Up @@ -269,7 +269,7 @@ static int tcf_act_police_cleanup(struct tc_action *a, int bind)
}

static int tcf_act_police(struct sk_buff *skb, struct tc_action *a,
struct tcf_result *res)
struct tcf_result *res)
{
struct tcf_police *police = a->priv;
psched_time_t now;
Expand Down Expand Up @@ -606,12 +606,12 @@ int tcf_police_dump(struct sk_buff *skb, struct tcf_police *police)
int tcf_police_dump_stats(struct sk_buff *skb, struct tcf_police *police)
{
struct gnet_dump d;

if (gnet_stats_start_copy_compat(skb, TCA_STATS2, TCA_STATS,
TCA_XSTATS, police->tcf_stats_lock,
&d) < 0)
goto errout;

if (gnet_stats_copy_basic(&d, &police->tcf_bstats) < 0 ||
#ifdef CONFIG_NET_ESTIMATOR
gnet_stats_copy_rate_est(&d, &police->tcf_rate_est) < 0 ||
Expand Down
6 changes: 3 additions & 3 deletions net/sched/act_simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ static int tcf_simp(struct sk_buff *skb, struct tc_action *a, struct tcf_result
d->tcf_bstats.bytes += skb->len;
d->tcf_bstats.packets++;

/* print policy string followed by _ then packet count
* Example if this was the 3rd packet and the string was "hello"
* then it would look like "hello_3" (without quotes)
/* print policy string followed by _ then packet count
* Example if this was the 3rd packet and the string was "hello"
* then it would look like "hello_3" (without quotes)
**/
printk("simple: %s_%d\n",
(char *)d->tcfd_defdata, d->tcf_bstats.packets);
Expand Down
14 changes: 7 additions & 7 deletions net/sched/cls_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
goto errout;
} else {
switch (n->nlmsg_type) {
case RTM_NEWTFILTER:
case RTM_NEWTFILTER:
err = -EEXIST;
if (n->nlmsg_flags&NLM_F_EXCL)
goto errout;
Expand Down Expand Up @@ -481,11 +481,11 @@ tcf_exts_destroy(struct tcf_proto *tp, struct tcf_exts *exts)

int
tcf_exts_validate(struct tcf_proto *tp, struct rtattr **tb,
struct rtattr *rate_tlv, struct tcf_exts *exts,
struct tcf_ext_map *map)
struct rtattr *rate_tlv, struct tcf_exts *exts,
struct tcf_ext_map *map)
{
memset(exts, 0, sizeof(*exts));

#ifdef CONFIG_NET_CLS_ACT
{
int err;
Expand All @@ -511,7 +511,7 @@ tcf_exts_validate(struct tcf_proto *tp, struct rtattr **tb,
#elif defined CONFIG_NET_CLS_POLICE
if (map->police && tb[map->police-1]) {
struct tcf_police *p;

p = tcf_police_locate(tb[map->police-1], rate_tlv);
if (p == NULL)
return -EINVAL;
Expand All @@ -530,7 +530,7 @@ tcf_exts_validate(struct tcf_proto *tp, struct rtattr **tb,

void
tcf_exts_change(struct tcf_proto *tp, struct tcf_exts *dst,
struct tcf_exts *src)
struct tcf_exts *src)
{
#ifdef CONFIG_NET_CLS_ACT
if (src->action) {
Expand Down Expand Up @@ -597,7 +597,7 @@ rtattr_failure: __attribute__ ((unused))

int
tcf_exts_dump_stats(struct sk_buff *skb, struct tcf_exts *exts,
struct tcf_ext_map *map)
struct tcf_ext_map *map)
{
#ifdef CONFIG_NET_CLS_ACT
if (exts->action)
Expand Down
6 changes: 3 additions & 3 deletions net/sched/cls_basic.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ static void basic_destroy(struct tcf_proto *tp)
{
struct basic_head *head = (struct basic_head *) xchg(&tp->root, NULL);
struct basic_filter *f, *n;

list_for_each_entry_safe(f, n, &head->flist, link) {
list_del(&f->link);
basic_delete_filter(tp, f);
Expand Down Expand Up @@ -157,7 +157,7 @@ static inline int basic_set_parms(struct tcf_proto *tp, struct basic_filter *f,
}

static int basic_change(struct tcf_proto *tp, unsigned long base, u32 handle,
struct rtattr **tca, unsigned long *arg)
struct rtattr **tca, unsigned long *arg)
{
int err = -EINVAL;
struct basic_head *head = (struct basic_head *) tp->root;
Expand Down Expand Up @@ -292,7 +292,7 @@ static int __init init_basic(void)
return register_tcf_proto_ops(&cls_basic_ops);
}

static void __exit exit_basic(void)
static void __exit exit_basic(void)
{
unregister_tcf_proto_ops(&cls_basic_ops);
}
Expand Down
4 changes: 2 additions & 2 deletions net/sched/cls_fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ static __inline__ int fw_hash(u32 handle)
else if (HTSIZE == 256) {
u8 *t = (u8 *) &handle;
return t[0] ^ t[1] ^ t[2] ^ t[3];
} else
} else
return handle & (HTSIZE - 1);
}

Expand Down Expand Up @@ -407,7 +407,7 @@ static int __init init_fw(void)
return register_tcf_proto_ops(&cls_fw_ops);
}

static void __exit exit_fw(void)
static void __exit exit_fw(void)
{
unregister_tcf_proto_ops(&cls_fw_ops);
}
Expand Down
8 changes: 4 additions & 4 deletions net/sched/cls_rsvp.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ static struct tcf_ext_map rsvp_ext_map = {
else if (r > 0) \
return r; \
}

static int rsvp_classify(struct sk_buff *skb, struct tcf_proto *tp,
struct tcf_result *res)
{
Expand Down Expand Up @@ -347,7 +347,7 @@ static int tunnel_bts(struct rsvp_head *data)
{
int n = data->tgenerator>>5;
u32 b = 1<<(data->tgenerator&0x1F);

if (data->tmap[n]&b)
return 0;
data->tmap[n] |= b;
Expand Down Expand Up @@ -547,7 +547,7 @@ static int rsvp_change(struct tcf_proto *tp, unsigned long base,
s->next = *sp;
wmb();
*sp = s;

goto insert;

errout:
Expand Down Expand Up @@ -654,7 +654,7 @@ static int __init init_rsvp(void)
return register_tcf_proto_ops(&RSVP_OPS);
}

static void __exit exit_rsvp(void)
static void __exit exit_rsvp(void)
{
unregister_tcf_proto_ops(&RSVP_OPS);
}
Expand Down
Loading

0 comments on commit 10297b9

Please sign in to comment.