diff options
author | Jamal Hadi Salim <hadi@cyberus.ca> | 2005-06-19 01:55:31 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-06-19 01:55:31 -0400 |
commit | e431b8c004af6be03783dddea31b6e514118051d (patch) | |
tree | 8868ed04de7026ddad6201a5c04d38c12e6a3509 /net/sched | |
parent | 58b82150da90681a4179db1bc94d412938e81b31 (diff) |
[NETLINK]: Explicit typing
This patch converts "unsigned flags" to use more explict types like u16
instead and incrementally introduces NLMSG_NEW().
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/act_api.c | 11 | ||||
-rw-r--r-- | net/sched/cls_api.c | 5 | ||||
-rw-r--r-- | net/sched/sch_api.c | 10 |
3 files changed, 11 insertions, 15 deletions
diff --git a/net/sched/act_api.c b/net/sched/act_api.c index 914c85ff8fe6..9594206e6035 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c | |||
@@ -428,15 +428,15 @@ errout: | |||
428 | 428 | ||
429 | static int | 429 | static int |
430 | tca_get_fill(struct sk_buff *skb, struct tc_action *a, u32 pid, u32 seq, | 430 | tca_get_fill(struct sk_buff *skb, struct tc_action *a, u32 pid, u32 seq, |
431 | unsigned flags, int event, int bind, int ref) | 431 | u16 flags, int event, int bind, int ref) |
432 | { | 432 | { |
433 | struct tcamsg *t; | 433 | struct tcamsg *t; |
434 | struct nlmsghdr *nlh; | 434 | struct nlmsghdr *nlh; |
435 | unsigned char *b = skb->tail; | 435 | unsigned char *b = skb->tail; |
436 | struct rtattr *x; | 436 | struct rtattr *x; |
437 | 437 | ||
438 | nlh = NLMSG_PUT(skb, pid, seq, event, sizeof(*t)); | 438 | nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*t), flags); |
439 | nlh->nlmsg_flags = flags; | 439 | |
440 | t = NLMSG_DATA(nlh); | 440 | t = NLMSG_DATA(nlh); |
441 | t->tca_family = AF_UNSPEC; | 441 | t->tca_family = AF_UNSPEC; |
442 | 442 | ||
@@ -669,7 +669,7 @@ err: | |||
669 | } | 669 | } |
670 | 670 | ||
671 | static int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event, | 671 | static int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event, |
672 | unsigned flags) | 672 | u16 flags) |
673 | { | 673 | { |
674 | struct tcamsg *t; | 674 | struct tcamsg *t; |
675 | struct nlmsghdr *nlh; | 675 | struct nlmsghdr *nlh; |
@@ -684,8 +684,7 @@ static int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event, | |||
684 | 684 | ||
685 | b = (unsigned char *)skb->tail; | 685 | b = (unsigned char *)skb->tail; |
686 | 686 | ||
687 | nlh = NLMSG_PUT(skb, pid, seq, event, sizeof(*t)); | 687 | nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*t), flags); |
688 | nlh->nlmsg_flags = flags; | ||
689 | t = NLMSG_DATA(nlh); | 688 | t = NLMSG_DATA(nlh); |
690 | t->tca_family = AF_UNSPEC; | 689 | t->tca_family = AF_UNSPEC; |
691 | 690 | ||
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 56e66c3fe0fa..1616bf5c9627 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c | |||
@@ -322,14 +322,13 @@ errout: | |||
322 | 322 | ||
323 | static int | 323 | static int |
324 | tcf_fill_node(struct sk_buff *skb, struct tcf_proto *tp, unsigned long fh, | 324 | tcf_fill_node(struct sk_buff *skb, struct tcf_proto *tp, unsigned long fh, |
325 | u32 pid, u32 seq, unsigned flags, int event) | 325 | u32 pid, u32 seq, u16 flags, int event) |
326 | { | 326 | { |
327 | struct tcmsg *tcm; | 327 | struct tcmsg *tcm; |
328 | struct nlmsghdr *nlh; | 328 | struct nlmsghdr *nlh; |
329 | unsigned char *b = skb->tail; | 329 | unsigned char *b = skb->tail; |
330 | 330 | ||
331 | nlh = NLMSG_PUT(skb, pid, seq, event, sizeof(*tcm)); | 331 | nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*tcm), flags); |
332 | nlh->nlmsg_flags = flags; | ||
333 | tcm = NLMSG_DATA(nlh); | 332 | tcm = NLMSG_DATA(nlh); |
334 | tcm->tcm_family = AF_UNSPEC; | 333 | tcm->tcm_family = AF_UNSPEC; |
335 | tcm->tcm_ifindex = tp->q->dev->ifindex; | 334 | tcm->tcm_ifindex = tp->q->dev->ifindex; |
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 07977f8f2679..97c1c75d5c78 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c | |||
@@ -760,15 +760,14 @@ graft: | |||
760 | } | 760 | } |
761 | 761 | ||
762 | static int tc_fill_qdisc(struct sk_buff *skb, struct Qdisc *q, u32 clid, | 762 | static int tc_fill_qdisc(struct sk_buff *skb, struct Qdisc *q, u32 clid, |
763 | u32 pid, u32 seq, unsigned flags, int event) | 763 | u32 pid, u32 seq, u16 flags, int event) |
764 | { | 764 | { |
765 | struct tcmsg *tcm; | 765 | struct tcmsg *tcm; |
766 | struct nlmsghdr *nlh; | 766 | struct nlmsghdr *nlh; |
767 | unsigned char *b = skb->tail; | 767 | unsigned char *b = skb->tail; |
768 | struct gnet_dump d; | 768 | struct gnet_dump d; |
769 | 769 | ||
770 | nlh = NLMSG_PUT(skb, pid, seq, event, sizeof(*tcm)); | 770 | nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*tcm), flags); |
771 | nlh->nlmsg_flags = flags; | ||
772 | tcm = NLMSG_DATA(nlh); | 771 | tcm = NLMSG_DATA(nlh); |
773 | tcm->tcm_family = AF_UNSPEC; | 772 | tcm->tcm_family = AF_UNSPEC; |
774 | tcm->tcm_ifindex = q->dev->ifindex; | 773 | tcm->tcm_ifindex = q->dev->ifindex; |
@@ -997,7 +996,7 @@ out: | |||
997 | 996 | ||
998 | static int tc_fill_tclass(struct sk_buff *skb, struct Qdisc *q, | 997 | static int tc_fill_tclass(struct sk_buff *skb, struct Qdisc *q, |
999 | unsigned long cl, | 998 | unsigned long cl, |
1000 | u32 pid, u32 seq, unsigned flags, int event) | 999 | u32 pid, u32 seq, u16 flags, int event) |
1001 | { | 1000 | { |
1002 | struct tcmsg *tcm; | 1001 | struct tcmsg *tcm; |
1003 | struct nlmsghdr *nlh; | 1002 | struct nlmsghdr *nlh; |
@@ -1005,8 +1004,7 @@ static int tc_fill_tclass(struct sk_buff *skb, struct Qdisc *q, | |||
1005 | struct gnet_dump d; | 1004 | struct gnet_dump d; |
1006 | struct Qdisc_class_ops *cl_ops = q->ops->cl_ops; | 1005 | struct Qdisc_class_ops *cl_ops = q->ops->cl_ops; |
1007 | 1006 | ||
1008 | nlh = NLMSG_PUT(skb, pid, seq, event, sizeof(*tcm)); | 1007 | nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*tcm), flags); |
1009 | nlh->nlmsg_flags = flags; | ||
1010 | tcm = NLMSG_DATA(nlh); | 1008 | tcm = NLMSG_DATA(nlh); |
1011 | tcm->tcm_family = AF_UNSPEC; | 1009 | tcm->tcm_family = AF_UNSPEC; |
1012 | tcm->tcm_ifindex = q->dev->ifindex; | 1010 | tcm->tcm_ifindex = q->dev->ifindex; |