cleanup: remove unused parameter from fill method in fib_rules_ops.
Subsystems (3)
PATCH 1/1 cleanup: remove unused parameter from fill method in fib_rules_ops.
Hi,
The netlink message header (struct nlmsghdr) is an unused parameter in fill method of fib_rules_ops struct.
This patch removes this parameter from this method and fixes the places where this method is called.
(include/net/fib_rules.h)
Regards,
Rami Rosen
include/net/fib_rules.h +0 -1
@@ -54,7 +54,6 @@ struct fib_rules_ops struct fib_rule_hdr *, struct nlattr **);int (*fill)(struct fib_rule *,struct sk_buff *, -struct nlmsghdr *,struct fib_rule_hdr *);u32 (*default_pref)(struct fib_rules_ops *ops);size_t (*nlmsg_payload)(struct fib_rule *);
net/core/fib_rules.c +1 -1
@@ -500,7 +500,7 @@ static int fib_nl_fill_rule(struct sk_buff *skb, struct fib_rule *rule,if (rule->target)NLA_PUT_U32 (skb,FRA_GOTO , rule->target); -if (ops->fill (rule, skb, nlh, frh) <0 ) +if (ops->fill (rule, skb, frh) <0 ) goto nla_put_failure;return nlmsg_end (skb, nlh);
net/decnet/dn_rules.c +1 -1
@@ -192,7 +192,7 @@ unsigned dnet_addr_type(__le16 addr) }static int dn_fib_rule_fill (struct fib_rule *rule,struct sk_buff *skb, -struct nlmsghdr *nlh,struct fib_rule_hdr *frh) +struct fib_rule_hdr *frh) {struct dn_fib_rule *r = (struct dn_fib_rule *)rule;
net/ipv4/fib_rules.c +1 -1
@@ -209,7 +209,7 @@ static int fib4_rule_compare(struct fib_rule *rule, struct fib_rule_hdr *frh, }static int fib4_rule_fill (struct fib_rule *rule,struct sk_buff *skb, -struct nlmsghdr *nlh,struct fib_rule_hdr *frh) +struct fib_rule_hdr *frh) {struct fib4_rule *rule4 = (struct fib4_rule *) rule;
net/ipv6/fib6_rules.c +1 -1
@@ -211,7 +211,7 @@ static int fib6_rule_compare(struct fib_rule *rule, struct fib_rule_hdr *frh, }static int fib6_rule_fill (struct fib_rule *rule,struct sk_buff *skb, -struct nlmsghdr *nlh,struct fib_rule_hdr *frh) +struct fib_rule_hdr *frh) {struct fib6_rule *rule6 = (struct fib6_rule *) rule;
David Miller
maintainerFrom: Rami Rosen <[email protected]>
Date: Tue, 19 May 2009 15:54:26 +0300
net/decnet/dn_rules.c unsigned dnet_addr_type(__le16 addr) · line 196
Quoted 7 lines
net/decnet/dn_rules.c +1
-1@@ -192,7 +192,7 @@ unsigned dnet_addr_type(__le16 addr) }static int dn_fib_rule_fill (struct fib_rule *rule,struct sk_buff *skb, -struct nlmsghdr *nlh,struct fib_rule_hdr *frh) +struct fib_rule_hdr *frh) {
Please fix up this crazy multi-line tabbing that happened in these function arg list transformations.
There's also space-tab sequences in here which should be fixed up too in fact that's how I noticed the multi-line problem:
+ git apply --check --whitespace=error-all diff
diff:35: space before tab in indent.
struct fib_rule_hdr *frh)
diff:48: space before tab in indent.
struct fib_rule_hdr *frh)
diff:61: space before tab in indent.
struct fib_rule_hdr *frh)
fatal: 3 lines add whitespace errors.
Thanks.
Hi,
This fixes the for the space-tab sequences and
multi-line tabbing. Sorry.
The netlink message header (struct nlmsghdr) is an unused parameter in fill method of fib_rules_ops struct.
This patch removes this parameter from this method and fixes the places where this method is called.
(include/net/fib_rules.h)
Regards,
Rami Rosen
include/net/fib_rules.h +0 -1
@@ -54,7 +54,6 @@ struct fib_rules_ops struct fib_rule_hdr *, struct nlattr **);int (*fill)(struct fib_rule *,struct sk_buff *, -struct nlmsghdr *,struct fib_rule_hdr *);u32 (*default_pref)(struct fib_rules_ops *ops);size_t (*nlmsg_payload)(struct fib_rule *);
net/core/fib_rules.c +1 -1
@@ -500,7 +500,7 @@ static int fib_nl_fill_rule(struct sk_buff *skb, struct fib_rule *rule,if (rule->target)NLA_PUT_U32 (skb,FRA_GOTO , rule->target); -if (ops->fill (rule, skb, nlh, frh) <0 ) +if (ops->fill (rule, skb, frh) <0 ) goto nla_put_failure;return nlmsg_end (skb, nlh);
net/decnet/dn_rules.c +1 -1
@@ -192,7 +192,7 @@ unsigned dnet_addr_type(__le16 addr) }static int dn_fib_rule_fill (struct fib_rule *rule,struct sk_buff *skb, -struct nlmsghdr *nlh,struct fib_rule_hdr *frh) +struct fib_rule_hdr *frh) {struct dn_fib_rule *r = (struct dn_fib_rule *)rule;
net/ipv4/fib_rules.c +1 -1
@@ -209,7 +209,7 @@ static int fib4_rule_compare(struct fib_rule *rule, struct fib_rule_hdr *frh, }static int fib4_rule_fill (struct fib_rule *rule,struct sk_buff *skb, -struct nlmsghdr *nlh,struct fib_rule_hdr *frh) +struct fib_rule_hdr *frh) {struct fib4_rule *rule4 = (struct fib4_rule *) rule;
net/ipv6/fib6_rules.c +1 -1
@@ -211,7 +211,7 @@ static int fib6_rule_compare(struct fib_rule *rule, struct fib_rule_hdr *frh, }static int fib6_rule_fill (struct fib_rule *rule,struct sk_buff *skb, -struct nlmsghdr *nlh,struct fib_rule_hdr *frh) +struct fib_rule_hdr *frh) {struct fib6_rule *rule6 = (struct fib6_rule *) rule;
Quoted 9 lines · Rami Rosen
Hi,
This fixes the for the space-tab sequences and
multi-line tabbing. Sorry.The netlink message header (struct nlmsghdr) is an unused parameter in fill method of
fib_rules_opsstruct.
This patch removes this parameter from this method and fixes the places where this method is called.
Quoted 9 lines
(
include/net/fib_rules.h)Regards,
Rami RosenSigned-off-by Rami Rosen <[email protected]>
static int fib6_rule_fill(struct fib_rule *rule, struct sk_buff *skb,
- struct nlmsghdr *nlh, struct fib_rule_hdr *frh)
+ struct fib_rule_hdr *frh)
extra spaces after tabs.... it should be :
static int fib6_rule_fill(struct fib_rule *rule, struct sk_buff *skb,
- struct nlmsghdr *nlh, struct fib_rule_hdr *frh)
+ struct fib_rule_hdr *frh)
Hi,
Yes, you are right; sorry again!
(running "git apply --check --whitespace=error-all diff" did not reveal what you mention, but you are right).
I hope that the attached patch is fully correct now.
The netlink message header (struct nlmsghdr) is an unused parameter in fill method of fib_rules_ops struct.
This patch removes this parameter from this method and fixes the places where this method is called.
(include/net/fib_rules.h)
Regards,
Rami Rosen
include/net/fib_rules.h +0 -1
@@ -54,7 +54,6 @@ struct fib_rules_ops struct fib_rule_hdr *, struct nlattr **);int (*fill)(struct fib_rule *,struct sk_buff *, -struct nlmsghdr *,struct fib_rule_hdr *);u32 (*default_pref)(struct fib_rules_ops *ops);size_t (*nlmsg_payload)(struct fib_rule *);
net/core/fib_rules.c +1 -1
@@ -500,7 +500,7 @@ static int fib_nl_fill_rule(struct sk_buff *skb, struct fib_rule *rule,if (rule->target)NLA_PUT_U32 (skb,FRA_GOTO , rule->target); -if (ops->fill (rule, skb, nlh, frh) <0 ) +if (ops->fill (rule, skb, frh) <0 ) goto nla_put_failure;return nlmsg_end (skb, nlh);
net/decnet/dn_rules.c +1 -1
@@ -192,7 +192,7 @@ unsigned dnet_addr_type(__le16 addr) }static int dn_fib_rule_fill (struct fib_rule *rule,struct sk_buff *skb, -struct nlmsghdr *nlh,struct fib_rule_hdr *frh) +struct fib_rule_hdr *frh) {struct dn_fib_rule *r = (struct dn_fib_rule *)rule;
net/ipv4/fib_rules.c +1 -1
@@ -209,7 +209,7 @@ static int fib4_rule_compare(struct fib_rule *rule, struct fib_rule_hdr *frh, }static int fib4_rule_fill (struct fib_rule *rule,struct sk_buff *skb, -struct nlmsghdr *nlh,struct fib_rule_hdr *frh) +struct fib_rule_hdr *frh) {struct fib4_rule *rule4 = (struct fib4_rule *) rule;
net/ipv6/fib6_rules.c +1 -1
@@ -211,7 +211,7 @@ static int fib6_rule_compare(struct fib_rule *rule, struct fib_rule_hdr *frh, }static int fib6_rule_fill (struct fib_rule *rule,struct sk_buff *skb, -struct nlmsghdr *nlh,struct fib_rule_hdr *frh) +struct fib_rule_hdr *frh) {struct fib6_rule *rule6 = (struct fib6_rule *) rule;