* [PATCH] net/hsr: Remove unused but set variable
@ 2016-10-18 7:07 Tobias Klauser
2016-10-18 14:28 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Tobias Klauser @ 2016-10-18 7:07 UTC (permalink / raw)
To: Arvid Brodin, David S. Miller; +Cc: netdev
Remove the unused but set variable master_dev in check_local_dest to fix
the following GCC warning when building with 'W=1':
net/hsr/hsr_forward.c: In function ‘check_local_dest’:
net/hsr/hsr_forward.c:303:21: warning: variable ‘master_dev’ set but not used [-Wunused-but-set-variable]
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
net/hsr/hsr_forward.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/net/hsr/hsr_forward.c b/net/hsr/hsr_forward.c
index 5ee1d43f1310..4ebe2aa3e7d3 100644
--- a/net/hsr/hsr_forward.c
+++ b/net/hsr/hsr_forward.c
@@ -300,10 +300,6 @@ static void hsr_forward_do(struct hsr_frame_info *frame)
static void check_local_dest(struct hsr_priv *hsr, struct sk_buff *skb,
struct hsr_frame_info *frame)
{
- struct net_device *master_dev;
-
- master_dev = hsr_port_get_hsr(hsr, HSR_PT_MASTER)->dev;
-
if (hsr_addr_is_self(hsr, eth_hdr(skb)->h_dest)) {
frame->is_local_exclusive = true;
skb->pkt_type = PACKET_HOST;
--
2.9.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net/hsr: Remove unused but set variable
2016-10-18 7:07 [PATCH] net/hsr: Remove unused but set variable Tobias Klauser
@ 2016-10-18 14:28 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-10-18 14:28 UTC (permalink / raw)
To: tklauser; +Cc: arvid.brodin, netdev
From: Tobias Klauser <tklauser@distanz.ch>
Date: Tue, 18 Oct 2016 09:07:29 +0200
> Remove the unused but set variable master_dev in check_local_dest to fix
> the following GCC warning when building with 'W=1':
>
> net/hsr/hsr_forward.c: In function ‘check_local_dest’:
> net/hsr/hsr_forward.c:303:21: warning: variable ‘master_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:28 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:07 [PATCH] net/hsr: Remove unused but set variable Tobias Klauser
2016-10-18 14:28 ` 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.