linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] firewire: net: remove set but not used variable 'guid'
@ 2019-12-13 12:09 yu kuai
  0 siblings, 0 replies; 2+ messages in thread
From: yu kuai @ 2019-12-13 12:09 UTC (permalink / raw)
  To: stefanr; +Cc: yukuai3, zhengbin13, yi.zhang, linux1394-devel, linux-kernel

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/firewire/net.c: In function ‘fwnet_finish_incoming_packet’:
drivers/firewire/net.c:493:9: warning: variable ‘guid’ set but not
used [-Wunused-but-set-variable]

Signed-off-by: yu kuai <yukuai3@huawei.com>
---
 drivers/firewire/net.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c
index 715e491dfbc3..28785642a5c5 100644
--- a/drivers/firewire/net.c
+++ b/drivers/firewire/net.c
@@ -490,7 +490,6 @@ static int fwnet_finish_incoming_packet(struct net_device *net,
 {
 	struct fwnet_device *dev;
 	int status;
-	__be64 guid;
 
 	switch (ether_type) {
 	case ETH_P_ARP:
@@ -512,7 +511,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.17.2


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

* [PATCH] firewire: net: remove set but not used variable 'guid'
@ 2019-12-26 12:18 yu kuai
  0 siblings, 0 replies; 2+ messages in thread
From: yu kuai @ 2019-12-26 12:18 UTC (permalink / raw)
  To: stefanr; +Cc: linux1394-devel, linux-kernel, yukuai3, yi.zhang, zhengbin13

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/firewire/net.c: In function ‘fwnet_finish_incoming_packet’:
drivers/firewire/net.c:493:9: warning: variable ‘guid’ set but not
used

It is never used, and so can be removed.

Signed-off-by: yu kuai <yukuai3@huawei.com>
---
 drivers/firewire/net.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c
index 715e491dfbc3..28785642a5c5 100644
--- a/drivers/firewire/net.c
+++ b/drivers/firewire/net.c
@@ -490,7 +490,6 @@ static int fwnet_finish_incoming_packet(struct net_device *net,
 {
 	struct fwnet_device *dev;
 	int status;
-	__be64 guid;
 
 	switch (ether_type) {
 	case ETH_P_ARP:
@@ -512,7 +511,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.17.2


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

end of thread, other threads:[~2019-12-26 12:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-13 12:09 [PATCH] firewire: net: remove set but not used variable 'guid' yu kuai
2019-12-26 12:18 yu kuai

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