* [PATCH net-next-2.6] cleanup: remove unused parameter from fill method in fib_rules_ops.
@ 2009-05-19 12:54 Rami Rosen
2009-05-19 22:18 ` David Miller
0 siblings, 1 reply; 5+ messages in thread
From: Rami Rosen @ 2009-05-19 12:54 UTC (permalink / raw)
To: davem, netdev
[-- Attachment #1: Type: text/plain, Size: 313 bytes --]
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
Signed-off-by: Rami Rosen <ramirose@gmail.com>
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 2279 bytes --]
diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h
index b9b6339..ca4b2e8 100644
--- a/include/net/fib_rules.h
+++ b/include/net/fib_rules.h
@@ -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 *);
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
index 17d9f49..bd30938 100644
--- a/net/core/fib_rules.c
+++ b/net/core/fib_rules.c
@@ -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);
diff --git a/net/decnet/dn_rules.c b/net/decnet/dn_rules.c
index a2690b1..bda79e4 100644
--- a/net/decnet/dn_rules.c
+++ b/net/decnet/dn_rules.c
@@ -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;
diff --git a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c
index 38904be..b89baf3 100644
--- a/net/ipv4/fib_rules.c
+++ b/net/ipv4/fib_rules.c
@@ -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;
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c
index e1a36db..e419ffd 100644
--- a/net/ipv6/fib6_rules.c
+++ b/net/ipv6/fib6_rules.c
@@ -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;
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net-next-2.6] cleanup: remove unused parameter from fill method in fib_rules_ops.
2009-05-19 12:54 [PATCH net-next-2.6] cleanup: remove unused parameter from fill method in fib_rules_ops Rami Rosen
@ 2009-05-19 22:18 ` David Miller
2009-05-20 6:50 ` Rami Rosen
0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2009-05-19 22:18 UTC (permalink / raw)
To: ramirose; +Cc: netdev
From: Rami Rosen <ramirose@gmail.com>
Date: Tue, 19 May 2009 15:54:26 +0300
> @@ -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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next-2.6] cleanup: remove unused parameter from fill method in fib_rules_ops.
2009-05-19 22:18 ` David Miller
@ 2009-05-20 6:50 ` Rami Rosen
2009-05-20 6:57 ` Eric Dumazet
0 siblings, 1 reply; 5+ messages in thread
From: Rami Rosen @ 2009-05-20 6:50 UTC (permalink / raw)
To: David Miller; +Cc: netdev
[-- Attachment #1: Type: text/plain, Size: 388 bytes --]
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
Signed-off-by: Rami Rosen <ramirose@gmail.com>
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 2305 bytes --]
diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h
index b9b6339..ca4b2e8 100644
--- a/include/net/fib_rules.h
+++ b/include/net/fib_rules.h
@@ -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 *);
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
index 17d9f49..bd30938 100644
--- a/net/core/fib_rules.c
+++ b/net/core/fib_rules.c
@@ -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);
diff --git a/net/decnet/dn_rules.c b/net/decnet/dn_rules.c
index a2690b1..d70dcb5 100644
--- a/net/decnet/dn_rules.c
+++ b/net/decnet/dn_rules.c
@@ -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;
diff --git a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c
index 38904be..42e7ad5 100644
--- a/net/ipv4/fib_rules.c
+++ b/net/ipv4/fib_rules.c
@@ -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;
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c
index e1a36db..d182c05 100644
--- a/net/ipv6/fib6_rules.c
+++ b/net/ipv6/fib6_rules.c
@@ -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;
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net-next-2.6] cleanup: remove unused parameter from fill method in fib_rules_ops.
2009-05-20 6:50 ` Rami Rosen
@ 2009-05-20 6:57 ` Eric Dumazet
2009-05-20 11:07 ` Rami Rosen
0 siblings, 1 reply; 5+ messages in thread
From: Eric Dumazet @ 2009-05-20 6:57 UTC (permalink / raw)
To: Rami Rosen; +Cc: David Miller, netdev
Rami Rosen a écrit :
> 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
>
> Signed-off-by: Rami Rosen <ramirose@gmail.com>
>
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)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next-2.6] cleanup: remove unused parameter from fill method in fib_rules_ops.
2009-05-20 6:57 ` Eric Dumazet
@ 2009-05-20 11:07 ` Rami Rosen
0 siblings, 0 replies; 5+ messages in thread
From: Rami Rosen @ 2009-05-20 11:07 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Eric Dumazet
[-- Attachment #1: Type: text/plain, Size: 513 bytes --]
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
Signed-off-by: Rami Rosen <ramirose@gmail.com>
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 2287 bytes --]
diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h
index b9b6339..ca4b2e8 100644
--- a/include/net/fib_rules.h
+++ b/include/net/fib_rules.h
@@ -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 *);
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
index 17d9f49..bd30938 100644
--- a/net/core/fib_rules.c
+++ b/net/core/fib_rules.c
@@ -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);
diff --git a/net/decnet/dn_rules.c b/net/decnet/dn_rules.c
index a2690b1..d70dcb5 100644
--- a/net/decnet/dn_rules.c
+++ b/net/decnet/dn_rules.c
@@ -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;
diff --git a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c
index 38904be..42e7ad5 100644
--- a/net/ipv4/fib_rules.c
+++ b/net/ipv4/fib_rules.c
@@ -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;
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c
index e1a36db..00a7a5e 100644
--- a/net/ipv6/fib6_rules.c
+++ b/net/ipv6/fib6_rules.c
@@ -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;
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-05-20 11:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-19 12:54 [PATCH net-next-2.6] cleanup: remove unused parameter from fill method in fib_rules_ops Rami Rosen
2009-05-19 22:18 ` David Miller
2009-05-20 6:50 ` Rami Rosen
2009-05-20 6:57 ` Eric Dumazet
2009-05-20 11:07 ` Rami Rosen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).