[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>
This commit is contained in:
committed by
David S. Miller
parent
58b82150da
commit
e431b8c004
@@ -428,15 +428,15 @@ errout:
|
||||
|
||||
static int
|
||||
tca_get_fill(struct sk_buff *skb, struct tc_action *a, u32 pid, u32 seq,
|
||||
unsigned flags, int event, int bind, int ref)
|
||||
u16 flags, int event, int bind, int ref)
|
||||
{
|
||||
struct tcamsg *t;
|
||||
struct nlmsghdr *nlh;
|
||||
unsigned char *b = skb->tail;
|
||||
struct rtattr *x;
|
||||
|
||||
nlh = NLMSG_PUT(skb, pid, seq, event, sizeof(*t));
|
||||
nlh->nlmsg_flags = flags;
|
||||
nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*t), flags);
|
||||
|
||||
t = NLMSG_DATA(nlh);
|
||||
t->tca_family = AF_UNSPEC;
|
||||
|
||||
@@ -669,7 +669,7 @@ err:
|
||||
}
|
||||
|
||||
static int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event,
|
||||
unsigned flags)
|
||||
u16 flags)
|
||||
{
|
||||
struct tcamsg *t;
|
||||
struct nlmsghdr *nlh;
|
||||
@@ -684,8 +684,7 @@ static int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event,
|
||||
|
||||
b = (unsigned char *)skb->tail;
|
||||
|
||||
nlh = NLMSG_PUT(skb, pid, seq, event, sizeof(*t));
|
||||
nlh->nlmsg_flags = flags;
|
||||
nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*t), flags);
|
||||
t = NLMSG_DATA(nlh);
|
||||
t->tca_family = AF_UNSPEC;
|
||||
|
||||
|
Reference in New Issue
Block a user