All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ipv4: Remove unused but set variable
@ 2016-10-18  7:40 Tobias Klauser
  2016-10-18 14:30 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Tobias Klauser @ 2016-10-18  7:40 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev

Remove the unused but set variable dev in ip_do_fragment to fix the
following GCC warning when building with 'W=1':

  net/ipv4/ip_output.c: In function ‘ip_do_fragment’:
  net/ipv4/ip_output.c:541:21: warning: variable ‘dev’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 net/ipv4/ip_output.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 05d105832bdb..03e7f7310423 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -538,7 +538,6 @@ int ip_do_fragment(struct net *net, struct sock *sk, struct sk_buff *skb,
 {
 	struct iphdr *iph;
 	int ptr;
-	struct net_device *dev;
 	struct sk_buff *skb2;
 	unsigned int mtu, hlen, left, len, ll_rs;
 	int offset;
@@ -546,8 +545,6 @@ int ip_do_fragment(struct net *net, struct sock *sk, struct sk_buff *skb,
 	struct rtable *rt = skb_rtable(skb);
 	int err = 0;
 
-	dev = rt->dst.dev;
-
 	/* for offloaded checksums cleanup checksum before fragmentation */
 	if (skb->ip_summed == CHECKSUM_PARTIAL &&
 	    (err = skb_checksum_help(skb)))
-- 
2.9.0

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

* Re: [PATCH] ipv4: Remove unused but set variable
  2016-10-18  7:40 [PATCH] ipv4: Remove unused but set variable Tobias Klauser
@ 2016-10-18 14:30 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-10-18 14:30 UTC (permalink / raw)
  To: tklauser; +Cc: netdev

From: Tobias Klauser <tklauser@distanz.ch>
Date: Tue, 18 Oct 2016 09:40:20 +0200

> Remove the unused but set variable dev in ip_do_fragment to fix the
> following GCC warning when building with 'W=1':
> 
>   net/ipv4/ip_output.c: In function ‘ip_do_fragment’:
>   net/ipv4/ip_output.c:541:21: warning: variable ‘dev’ set but not used [-Wunused-but-set-variable]
> 
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>

Applied.

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

end of thread, other threads:[~2016-10-18 14:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-18  7:40 [PATCH] ipv4: Remove unused but set variable Tobias Klauser
2016-10-18 14:30 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.