[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20210527113140.304008-1-chengzhihao1@huawei.com>
Date: Thu, 27 May 2021 19:31:40 +0800
From: Zhihao Cheng <chengzhihao1@...wei.com>
To: <stefanr@...6.in-berlin.de>, <yoshfuji@...ux-ipv6.org>,
<davem@...emloft.net>
CC: <linux1394-devel@...ts.sourceforge.net>,
<linux-kernel@...r.kernel.org>, <chengzhihao1@...wei.com>,
<yukuai3@...wei.com>
Subject: [PATCH] firewire: net: Remove unused variable 'dev' and 'guid'
Fix the following gcc warning:
drivers/firewire/net.c:491:23: warning: variable ‘dev’ set but not used
[-Wunused-but-set-variable]
Fixes: 6752c8db8e0cf ("firewire net, ipv4 arp: Extend hardware ...")
Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: Zhihao Cheng <chengzhihao1@...wei.com>
---
drivers/firewire/net.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c
index 715e491dfbc3..4c3fd2eed1da 100644
--- a/drivers/firewire/net.c
+++ b/drivers/firewire/net.c
@@ -488,9 +488,7 @@ static int fwnet_finish_incoming_packet(struct net_device *net,
struct sk_buff *skb, u16 source_node_id,
bool is_broadcast, u16 ether_type)
{
- struct fwnet_device *dev;
int status;
- __be64 guid;
switch (ether_type) {
case ETH_P_ARP:
@@ -503,7 +501,6 @@ static int fwnet_finish_incoming_packet(struct net_device *net,
goto err;
}
- dev = netdev_priv(net);
/* Write metadata, and then pass to the receive level */
skb->dev = net;
skb->ip_summed = CHECKSUM_NONE;
@@ -512,7 +509,6 @@ static int fwnet_finish_incoming_packet(struct net_device *net,
* Parse the encapsulation header. This actually does the job of
* converting to an ethernet-like pseudo frame header.
*/
- guid = cpu_to_be64(dev->card->guid);
if (dev_hard_header(skb, net, ether_type,
is_broadcast ? net->broadcast : net->dev_addr,
NULL, skb->len) >= 0) {
--
2.25.4
Powered by blists - more mailing lists