netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/7] net: handle addr_type of 0 properly
@ 2011-02-25 15:45 Hagen Paul Pfeifer
  2011-02-25 15:45 ` [PATCH 2/7] dccp: newdp is declared/assigned but never be used Hagen Paul Pfeifer
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Hagen Paul Pfeifer @ 2011-02-25 15:45 UTC (permalink / raw)
  To: netdev; +Cc: fw

addr_type of 0 means that the type should be adopted from from_dev and
not from __hw_addr_del_multiple(). Unfortunately it isn't so and
addr_type will always be considered. Fix this by implementing the
considered and documented behavior.

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
---
 net/core/dev_addr_lists.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/core/dev_addr_lists.c b/net/core/dev_addr_lists.c
index 508f9c1..133fd22 100644
--- a/net/core/dev_addr_lists.c
+++ b/net/core/dev_addr_lists.c
@@ -144,7 +144,7 @@ void __hw_addr_del_multiple(struct netdev_hw_addr_list *to_list,
 
 	list_for_each_entry(ha, &from_list->list, list) {
 		type = addr_type ? addr_type : ha->type;
-		__hw_addr_del(to_list, ha->addr, addr_len, addr_type);
+		__hw_addr_del(to_list, ha->addr, addr_len, type);
 	}
 }
 EXPORT_SYMBOL(__hw_addr_del_multiple);
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 2/7] dccp: newdp is declared/assigned but never be used
  2011-02-25 15:45 [PATCH 1/7] net: handle addr_type of 0 properly Hagen Paul Pfeifer
@ 2011-02-25 15:45 ` Hagen Paul Pfeifer
  2011-02-25 22:00   ` David Miller
  2011-02-25 15:45 ` [PATCH 3/7] ipv6: totlen is declared and assigned but not used Hagen Paul Pfeifer
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Hagen Paul Pfeifer @ 2011-02-25 15:45 UTC (permalink / raw)
  To: netdev; +Cc: fw

Declaration and assignment of newdp is removed. Usage of dccp_sk()
exhibit no side effects.

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
---
 net/dccp/ipv6.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index dca711d..460d545 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -484,7 +484,6 @@ static struct sock *dccp_v6_request_recv_sock(struct sock *sk,
 	struct inet6_request_sock *ireq6 = inet6_rsk(req);
 	struct ipv6_pinfo *newnp, *np = inet6_sk(sk);
 	struct inet_sock *newinet;
-	struct dccp_sock *newdp;
 	struct dccp6_sock *newdp6;
 	struct sock *newsk;
 	struct ipv6_txoptions *opt;
@@ -498,7 +497,6 @@ static struct sock *dccp_v6_request_recv_sock(struct sock *sk,
 			return NULL;
 
 		newdp6 = (struct dccp6_sock *)newsk;
-		newdp = dccp_sk(newsk);
 		newinet = inet_sk(newsk);
 		newinet->pinet6 = &newdp6->inet6;
 		newnp = inet6_sk(newsk);
@@ -578,7 +576,6 @@ static struct sock *dccp_v6_request_recv_sock(struct sock *sk,
 	newdp6 = (struct dccp6_sock *)newsk;
 	newinet = inet_sk(newsk);
 	newinet->pinet6 = &newdp6->inet6;
-	newdp = dccp_sk(newsk);
 	newnp = inet6_sk(newsk);
 
 	memcpy(newnp, np, sizeof(struct ipv6_pinfo));
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 3/7] ipv6: totlen is declared and assigned but not used
  2011-02-25 15:45 [PATCH 1/7] net: handle addr_type of 0 properly Hagen Paul Pfeifer
  2011-02-25 15:45 ` [PATCH 2/7] dccp: newdp is declared/assigned but never be used Hagen Paul Pfeifer
@ 2011-02-25 15:45 ` Hagen Paul Pfeifer
  2011-02-25 22:00   ` David Miller
  2011-02-25 15:45 ` [PATCH 4/7] ipv6: hash is calculated but not used afterwards Hagen Paul Pfeifer
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Hagen Paul Pfeifer @ 2011-02-25 15:45 UTC (permalink / raw)
  To: netdev; +Cc: fw

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
---
 net/ipv6/ip6_output.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 2600e22..25a2647 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -274,13 +274,10 @@ int ip6_nd_hdr(struct sock *sk, struct sk_buff *skb, struct net_device *dev,
 {
 	struct ipv6_pinfo *np = inet6_sk(sk);
 	struct ipv6hdr *hdr;
-	int totlen;
 
 	skb->protocol = htons(ETH_P_IPV6);
 	skb->dev = dev;
 
-	totlen = len + sizeof(struct ipv6hdr);
-
 	skb_reset_network_header(skb);
 	skb_put(skb, sizeof(struct ipv6hdr));
 	hdr = ipv6_hdr(skb);
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 4/7] ipv6: hash is calculated but not used afterwards
  2011-02-25 15:45 [PATCH 1/7] net: handle addr_type of 0 properly Hagen Paul Pfeifer
  2011-02-25 15:45 ` [PATCH 2/7] dccp: newdp is declared/assigned but never be used Hagen Paul Pfeifer
  2011-02-25 15:45 ` [PATCH 3/7] ipv6: totlen is declared and assigned but not used Hagen Paul Pfeifer
@ 2011-02-25 15:45 ` Hagen Paul Pfeifer
  2011-02-25 22:00   ` David Miller
  2011-02-25 15:45 ` [PATCH 5/7] ipv6: variable next is never used in this function Hagen Paul Pfeifer
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Hagen Paul Pfeifer @ 2011-02-25 15:45 UTC (permalink / raw)
  To: netdev; +Cc: fw

hash is declared and assigned but not used anymore. ipv6_addr_hash()
exhibit no side-effects.

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
---
 net/ipv6/addrconf.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index fd6782e..3daaf3c 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -718,12 +718,9 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp)
 	struct inet6_ifaddr *ifa, *ifn;
 	struct inet6_dev *idev = ifp->idev;
 	int state;
-	int hash;
 	int deleted = 0, onlink = 0;
 	unsigned long expires = jiffies;
 
-	hash = ipv6_addr_hash(&ifp->addr);
-
 	spin_lock_bh(&ifp->state_lock);
 	state = ifp->state;
 	ifp->state = INET6_IFADDR_STATE_DEAD;
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 5/7] ipv6: variable next is never used in this function
  2011-02-25 15:45 [PATCH 1/7] net: handle addr_type of 0 properly Hagen Paul Pfeifer
                   ` (2 preceding siblings ...)
  2011-02-25 15:45 ` [PATCH 4/7] ipv6: hash is calculated but not used afterwards Hagen Paul Pfeifer
@ 2011-02-25 15:45 ` Hagen Paul Pfeifer
  2011-02-25 22:01   ` David Miller
  2011-02-25 15:45 ` [PATCH 6/7] ipv6: ignore rtnl_unicast() return code Hagen Paul Pfeifer
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Hagen Paul Pfeifer @ 2011-02-25 15:45 UTC (permalink / raw)
  To: netdev; +Cc: fw

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
---
 net/ipv6/route.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index f786aed..7e9443f 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1075,11 +1075,9 @@ out:
 
 int icmp6_dst_gc(void)
 {
-	struct dst_entry *dst, *next, **pprev;
+	struct dst_entry *dst, **pprev;
 	int more = 0;
 
-	next = NULL;
-
 	spin_lock_bh(&icmp6_dst_lock);
 	pprev = &icmp6_dst_gc_list;
 
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 6/7] ipv6: ignore rtnl_unicast() return code
  2011-02-25 15:45 [PATCH 1/7] net: handle addr_type of 0 properly Hagen Paul Pfeifer
                   ` (3 preceding siblings ...)
  2011-02-25 15:45 ` [PATCH 5/7] ipv6: variable next is never used in this function Hagen Paul Pfeifer
@ 2011-02-25 15:45 ` Hagen Paul Pfeifer
  2011-02-25 22:01   ` David Miller
  2011-02-25 15:45 ` [PATCH 7/7] sched: protocol only needed when CONFIG_NET_CLS_ACT is enabled Hagen Paul Pfeifer
  2011-02-25 21:59 ` [PATCH 1/7] net: handle addr_type of 0 properly David Miller
  6 siblings, 1 reply; 14+ messages in thread
From: Hagen Paul Pfeifer @ 2011-02-25 15:45 UTC (permalink / raw)
  To: netdev; +Cc: fw

rtnl_unicast() return value is not of interest, we can silently ignore
it, save some instructions and four byte on the stack.

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
---
 net/ipv6/ip6mr.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index 0e1d53b..618f67cc 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -1039,7 +1039,6 @@ static void ip6mr_cache_resolve(struct net *net, struct mr6_table *mrt,
 
 	while((skb = __skb_dequeue(&uc->mfc_un.unres.unresolved))) {
 		if (ipv6_hdr(skb)->version == 0) {
-			int err;
 			struct nlmsghdr *nlh = (struct nlmsghdr *)skb_pull(skb, sizeof(struct ipv6hdr));
 
 			if (__ip6mr_fill_mroute(mrt, skb, c, NLMSG_DATA(nlh)) > 0) {
@@ -1050,7 +1049,7 @@ static void ip6mr_cache_resolve(struct net *net, struct mr6_table *mrt,
 				skb_trim(skb, nlh->nlmsg_len);
 				((struct nlmsgerr *)NLMSG_DATA(nlh))->error = -EMSGSIZE;
 			}
-			err = rtnl_unicast(skb, net, NETLINK_CB(skb).pid);
+			rtnl_unicast(skb, net, NETLINK_CB(skb).pid);
 		} else
 			ip6_mr_forward(net, mrt, skb, c);
 	}
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 7/7] sched: protocol only needed when CONFIG_NET_CLS_ACT is enabled
  2011-02-25 15:45 [PATCH 1/7] net: handle addr_type of 0 properly Hagen Paul Pfeifer
                   ` (4 preceding siblings ...)
  2011-02-25 15:45 ` [PATCH 6/7] ipv6: ignore rtnl_unicast() return code Hagen Paul Pfeifer
@ 2011-02-25 15:45 ` Hagen Paul Pfeifer
  2011-02-25 22:01   ` David Miller
  2011-02-25 21:59 ` [PATCH 1/7] net: handle addr_type of 0 properly David Miller
  6 siblings, 1 reply; 14+ messages in thread
From: Hagen Paul Pfeifer @ 2011-02-25 15:45 UTC (permalink / raw)
  To: netdev; +Cc: fw

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
---
 net/sched/sch_api.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 1507415..7490f3f 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -1672,12 +1672,12 @@ int tc_classify(struct sk_buff *skb, struct tcf_proto *tp,
 		struct tcf_result *res)
 {
 	int err = 0;
-	__be16 protocol;
 #ifdef CONFIG_NET_CLS_ACT
+	__be16 protocol;
 	struct tcf_proto *otp = tp;
 reclassify:
-#endif
 	protocol = skb->protocol;
+#endif
 
 	err = tc_classify_compat(skb, tp, res);
 #ifdef CONFIG_NET_CLS_ACT
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/7] net: handle addr_type of 0 properly
  2011-02-25 15:45 [PATCH 1/7] net: handle addr_type of 0 properly Hagen Paul Pfeifer
                   ` (5 preceding siblings ...)
  2011-02-25 15:45 ` [PATCH 7/7] sched: protocol only needed when CONFIG_NET_CLS_ACT is enabled Hagen Paul Pfeifer
@ 2011-02-25 21:59 ` David Miller
  6 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2011-02-25 21:59 UTC (permalink / raw)
  To: hagen; +Cc: netdev, fw

From: Hagen Paul Pfeifer <hagen@jauu.net>
Date: Fri, 25 Feb 2011 16:45:15 +0100

> addr_type of 0 means that the type should be adopted from from_dev and
> not from __hw_addr_del_multiple(). Unfortunately it isn't so and
> addr_type will always be considered. Fix this by implementing the
> considered and documented behavior.
> 
> Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>

Applied to net-2.6, thanks.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/7] dccp: newdp is declared/assigned but never be used
  2011-02-25 15:45 ` [PATCH 2/7] dccp: newdp is declared/assigned but never be used Hagen Paul Pfeifer
@ 2011-02-25 22:00   ` David Miller
  0 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2011-02-25 22:00 UTC (permalink / raw)
  To: hagen; +Cc: netdev, fw

From: Hagen Paul Pfeifer <hagen@jauu.net>
Date: Fri, 25 Feb 2011 16:45:16 +0100

> Declaration and assignment of newdp is removed. Usage of dccp_sk()
> exhibit no side effects.
> 
> Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>

Applied to net-next-2.6

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 3/7] ipv6: totlen is declared and assigned but not used
  2011-02-25 15:45 ` [PATCH 3/7] ipv6: totlen is declared and assigned but not used Hagen Paul Pfeifer
@ 2011-02-25 22:00   ` David Miller
  0 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2011-02-25 22:00 UTC (permalink / raw)
  To: hagen; +Cc: netdev, fw

From: Hagen Paul Pfeifer <hagen@jauu.net>
Date: Fri, 25 Feb 2011 16:45:17 +0100

> Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>

Applied to net-next-2.6

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 4/7] ipv6: hash is calculated but not used afterwards
  2011-02-25 15:45 ` [PATCH 4/7] ipv6: hash is calculated but not used afterwards Hagen Paul Pfeifer
@ 2011-02-25 22:00   ` David Miller
  0 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2011-02-25 22:00 UTC (permalink / raw)
  To: hagen; +Cc: netdev, fw

From: Hagen Paul Pfeifer <hagen@jauu.net>
Date: Fri, 25 Feb 2011 16:45:18 +0100

> hash is declared and assigned but not used anymore. ipv6_addr_hash()
> exhibit no side-effects.
> 
> Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>

Applied to net-next-2.6

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 5/7] ipv6: variable next is never used in this function
  2011-02-25 15:45 ` [PATCH 5/7] ipv6: variable next is never used in this function Hagen Paul Pfeifer
@ 2011-02-25 22:01   ` David Miller
  0 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2011-02-25 22:01 UTC (permalink / raw)
  To: hagen; +Cc: netdev, fw

From: Hagen Paul Pfeifer <hagen@jauu.net>
Date: Fri, 25 Feb 2011 16:45:19 +0100

> Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>

Applied to net-next-2.6

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 6/7] ipv6: ignore rtnl_unicast() return code
  2011-02-25 15:45 ` [PATCH 6/7] ipv6: ignore rtnl_unicast() return code Hagen Paul Pfeifer
@ 2011-02-25 22:01   ` David Miller
  0 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2011-02-25 22:01 UTC (permalink / raw)
  To: hagen; +Cc: netdev, fw

From: Hagen Paul Pfeifer <hagen@jauu.net>
Date: Fri, 25 Feb 2011 16:45:20 +0100

> rtnl_unicast() return value is not of interest, we can silently ignore
> it, save some instructions and four byte on the stack.
> 
> Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>

Applied to net-next-2.6

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 7/7] sched: protocol only needed when CONFIG_NET_CLS_ACT is enabled
  2011-02-25 15:45 ` [PATCH 7/7] sched: protocol only needed when CONFIG_NET_CLS_ACT is enabled Hagen Paul Pfeifer
@ 2011-02-25 22:01   ` David Miller
  0 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2011-02-25 22:01 UTC (permalink / raw)
  To: hagen; +Cc: netdev, fw

From: Hagen Paul Pfeifer <hagen@jauu.net>
Date: Fri, 25 Feb 2011 16:45:21 +0100

> Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>

Applied to net-next-2.6

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2011-02-25 22:00 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-25 15:45 [PATCH 1/7] net: handle addr_type of 0 properly Hagen Paul Pfeifer
2011-02-25 15:45 ` [PATCH 2/7] dccp: newdp is declared/assigned but never be used Hagen Paul Pfeifer
2011-02-25 22:00   ` David Miller
2011-02-25 15:45 ` [PATCH 3/7] ipv6: totlen is declared and assigned but not used Hagen Paul Pfeifer
2011-02-25 22:00   ` David Miller
2011-02-25 15:45 ` [PATCH 4/7] ipv6: hash is calculated but not used afterwards Hagen Paul Pfeifer
2011-02-25 22:00   ` David Miller
2011-02-25 15:45 ` [PATCH 5/7] ipv6: variable next is never used in this function Hagen Paul Pfeifer
2011-02-25 22:01   ` David Miller
2011-02-25 15:45 ` [PATCH 6/7] ipv6: ignore rtnl_unicast() return code Hagen Paul Pfeifer
2011-02-25 22:01   ` David Miller
2011-02-25 15:45 ` [PATCH 7/7] sched: protocol only needed when CONFIG_NET_CLS_ACT is enabled Hagen Paul Pfeifer
2011-02-25 22:01   ` David Miller
2011-02-25 21:59 ` [PATCH 1/7] net: handle addr_type of 0 properly David Miller

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).