[linux-next:master 13929/14048] drivers/firewire/net.c:491:23: warning: variable 'dev' set but not used

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   593ef1658ecf61d3619885bdbbcfffa3d1417891
commit: 290041e89054bc90232b5480c4e401e8b7769cce [13929/14048] Merge remote-tracking branch 'ieee1394/for-next'
config: mips-randconfig-r003-20210420 (attached as .config)
compiler: mips64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=290041e89054bc90232b5480c4e401e8b7769cce
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 290041e89054bc90232b5480c4e401e8b7769cce
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=mips 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

   drivers/firewire/net.c: In function 'fwnet_finish_incoming_packet':
>> drivers/firewire/net.c:491:23: warning: variable 'dev' set but not used [-Wunused-but-set-variable]
     491 |  struct fwnet_device *dev;
         |                       ^~~


vim +/dev +491 drivers/firewire/net.c

c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  485  
5a124d382ea5c9 drivers/firewire/net.c     Stefan Richter               2009-06-14  486  
f91e3bd842ec6f drivers/firewire/net.c     Stefan Richter               2009-06-07  487  static int fwnet_finish_incoming_packet(struct net_device *net,
f91e3bd842ec6f drivers/firewire/net.c     Stefan Richter               2009-06-07  488  					struct sk_buff *skb, u16 source_node_id,
f91e3bd842ec6f drivers/firewire/net.c     Stefan Richter               2009-06-07  489  					bool is_broadcast, u16 ether_type)
f91e3bd842ec6f drivers/firewire/net.c     Stefan Richter               2009-06-07  490  {
f91e3bd842ec6f drivers/firewire/net.c     Stefan Richter               2009-06-07 @491  	struct fwnet_device *dev;
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  492  	int status;
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  493  
18406d7e42a67d drivers/firewire/net.c     YOSHIFUJI Hideaki / 吉藤英明 2013-03-25  494  	switch (ether_type) {
18406d7e42a67d drivers/firewire/net.c     YOSHIFUJI Hideaki / 吉藤英明 2013-03-25  495  	case ETH_P_ARP:
18406d7e42a67d drivers/firewire/net.c     YOSHIFUJI Hideaki / 吉藤英明 2013-03-25  496  	case ETH_P_IP:
cb6bf35502d533 drivers/firewire/net.c     YOSHIFUJI Hideaki / 吉藤英明 2013-03-25  497  #if IS_ENABLED(CONFIG_IPV6)
cb6bf35502d533 drivers/firewire/net.c     YOSHIFUJI Hideaki / 吉藤英明 2013-03-25  498  	case ETH_P_IPV6:
cb6bf35502d533 drivers/firewire/net.c     YOSHIFUJI Hideaki / 吉藤英明 2013-03-25  499  #endif
18406d7e42a67d drivers/firewire/net.c     YOSHIFUJI Hideaki / 吉藤英明 2013-03-25  500  		break;
18406d7e42a67d drivers/firewire/net.c     YOSHIFUJI Hideaki / 吉藤英明 2013-03-25  501  	default:
18406d7e42a67d drivers/firewire/net.c     YOSHIFUJI Hideaki / 吉藤英明 2013-03-25  502  		goto err;
18406d7e42a67d drivers/firewire/net.c     YOSHIFUJI Hideaki / 吉藤英明 2013-03-25  503  	}
18406d7e42a67d drivers/firewire/net.c     YOSHIFUJI Hideaki / 吉藤英明 2013-03-25  504  
f91e3bd842ec6f drivers/firewire/net.c     Stefan Richter               2009-06-07  505  	dev = netdev_priv(net);
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  506  	/* Write metadata, and then pass to the receive level */
f91e3bd842ec6f drivers/firewire/net.c     Stefan Richter               2009-06-07  507  	skb->dev = net;
b577d7e2ad50cf drivers/firewire/net.c     YOSHIFUJI Hideaki / 吉藤英明 2013-01-19  508  	skb->ip_summed = CHECKSUM_NONE;
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  509  
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  510  	/*
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  511  	 * Parse the encapsulation header. This actually does the job of
6752c8db8e0cfe drivers/firewire/net.c     YOSHIFUJI Hideaki / 吉藤英明 2013-03-25  512  	 * converting to an ethernet-like pseudo frame header.
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  513  	 */
f91e3bd842ec6f drivers/firewire/net.c     Stefan Richter               2009-06-07  514  	if (dev_hard_header(skb, net, ether_type,
6752c8db8e0cfe drivers/firewire/net.c     YOSHIFUJI Hideaki / 吉藤英明 2013-03-25  515  			   is_broadcast ? net->broadcast : net->dev_addr,
f91e3bd842ec6f drivers/firewire/net.c     Stefan Richter               2009-06-07  516  			   NULL, skb->len) >= 0) {
f91e3bd842ec6f drivers/firewire/net.c     Stefan Richter               2009-06-07  517  		struct fwnet_header *eth;
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  518  		u16 *rawp;
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  519  		__be16 protocol;
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  520  
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  521  		skb_reset_mac_header(skb);
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  522  		skb_pull(skb, sizeof(*eth));
f91e3bd842ec6f drivers/firewire/net.c     Stefan Richter               2009-06-07  523  		eth = (struct fwnet_header *)skb_mac_header(skb);
021b97e469714b drivers/firewire/net.c     YOSHIFUJI Hideaki / 吉藤英明 2013-03-25  524  		if (fwnet_hwaddr_is_multicast(eth->h_dest)) {
f91e3bd842ec6f drivers/firewire/net.c     Stefan Richter               2009-06-07  525  			if (memcmp(eth->h_dest, net->broadcast,
f91e3bd842ec6f drivers/firewire/net.c     Stefan Richter               2009-06-07  526  				   net->addr_len) == 0)
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  527  				skb->pkt_type = PACKET_BROADCAST;
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  528  #if 0
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  529  			else
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  530  				skb->pkt_type = PACKET_MULTICAST;
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  531  #endif
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  532  		} else {
156ce867a6725e drivers/firewire/net.c     Stefan Richter               2009-06-14  533  			if (memcmp(eth->h_dest, net->dev_addr, net->addr_len))
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  534  				skb->pkt_type = PACKET_OTHERHOST;
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  535  		}
e5c5d22e8dcf7c drivers/firewire/net.c     Simon Horman                 2013-03-28  536  		if (ntohs(eth->h_proto) >= ETH_P_802_3_MIN) {
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  537  			protocol = eth->h_proto;
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  538  		} else {
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  539  			rawp = (u16 *)skb->data;
f91e3bd842ec6f drivers/firewire/net.c     Stefan Richter               2009-06-07  540  			if (*rawp == 0xffff)
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  541  				protocol = htons(ETH_P_802_3);
f91e3bd842ec6f drivers/firewire/net.c     Stefan Richter               2009-06-07  542  			else
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  543  				protocol = htons(ETH_P_802_2);
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  544  		}
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  545  		skb->protocol = protocol;
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  546  	}
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  547  	status = netif_rx(skb);
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  548  	if (status == NET_RX_DROP) {
f91e3bd842ec6f drivers/firewire/net.c     Stefan Richter               2009-06-07  549  		net->stats.rx_errors++;
f91e3bd842ec6f drivers/firewire/net.c     Stefan Richter               2009-06-07  550  		net->stats.rx_dropped++;
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  551  	} else {
f91e3bd842ec6f drivers/firewire/net.c     Stefan Richter               2009-06-07  552  		net->stats.rx_packets++;
f91e3bd842ec6f drivers/firewire/net.c     Stefan Richter               2009-06-07  553  		net->stats.rx_bytes += skb->len;
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  554  	}
f91e3bd842ec6f drivers/firewire/net.c     Stefan Richter               2009-06-07  555  
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  556  	return 0;
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  557  
18406d7e42a67d drivers/firewire/net.c     YOSHIFUJI Hideaki / 吉藤英明 2013-03-25  558   err:
f91e3bd842ec6f drivers/firewire/net.c     Stefan Richter               2009-06-07  559  	net->stats.rx_errors++;
f91e3bd842ec6f drivers/firewire/net.c     Stefan Richter               2009-06-07  560  	net->stats.rx_dropped++;
f91e3bd842ec6f drivers/firewire/net.c     Stefan Richter               2009-06-07  561  
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  562  	dev_kfree_skb_any(skb);
f91e3bd842ec6f drivers/firewire/net.c     Stefan Richter               2009-06-07  563  
1bf145fed57258 drivers/firewire/net.c     Stefan Richter               2010-08-16  564  	return -ENOENT;
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  565  }
c76acec6d55107 drivers/firewire/fw-ipv4.c Jay Fenlason                 2009-05-18  566  

:::::: The code at line 491 was first introduced by commit
:::::: f91e3bd842ec6f5cea245993926ee8ff26250467 firewire: net: style changes

:::::: TO: Stefan Richter <stefanr@xxxxxxxxxxxxxxxxx>
:::::: CC: Stefan Richter <stefanr@xxxxxxxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux