All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Robert Hancock <hancock@sedsystems.ca>
Cc: kbuild-all@01.org, netdev@vger.kernel.org, anirudh@xilinx.com,
	John.Linn@xilinx.com, Robert Hancock <hancock@sedsystems.ca>
Subject: Re: [PATCH net-next 01/13] net: axienet: Fixed 64-bit compile, enable build on X86 and ARM
Date: Sun, 2 Jun 2019 14:37:31 +0800	[thread overview]
Message-ID: <201906021459.CkJJSWzi%lkp@intel.com> (raw)
In-Reply-To: <1559326545-28825-2-git-send-email-hancock@sedsystems.ca>

Hi Robert,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]

url:    https://github.com/0day-ci/linux/commits/Robert-Hancock/Xilinx-axienet-driver-updates/20190602-124146
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-rc1-7-g2b96cd8-dirty
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)

>> drivers/net/ethernet/xilinx/xilinx_axienet_main.c:778:37: sparse: sparse: cast to restricted __be32
>> drivers/net/ethernet/xilinx/xilinx_axienet_main.c:778:37: sparse: sparse: cast to restricted __be32
>> drivers/net/ethernet/xilinx/xilinx_axienet_main.c:778:37: sparse: sparse: cast to restricted __be32
>> drivers/net/ethernet/xilinx/xilinx_axienet_main.c:778:37: sparse: sparse: cast to restricted __be32
>> drivers/net/ethernet/xilinx/xilinx_axienet_main.c:778:37: sparse: sparse: cast to restricted __be32
>> drivers/net/ethernet/xilinx/xilinx_axienet_main.c:778:37: sparse: sparse: cast to restricted __be32
>> drivers/net/ethernet/xilinx/xilinx_axienet_main.c:778:35: sparse: sparse: incorrect type in assignment (different base types) @@    expected restricted __wsum [usertype] csum @@    got  [usertype] csum @@
>> drivers/net/ethernet/xilinx/xilinx_axienet_main.c:778:35: sparse:    expected restricted __wsum [usertype] csum
>> drivers/net/ethernet/xilinx/xilinx_axienet_main.c:778:35: sparse:    got unsigned int

vim +778 drivers/net/ethernet/xilinx/xilinx_axienet_main.c

8a3b7a25 Daniel Borkmann   2012-01-19  728  
8a3b7a25 Daniel Borkmann   2012-01-19  729  /**
8a3b7a25 Daniel Borkmann   2012-01-19  730   * axienet_recv - Is called from Axi DMA Rx Isr to complete the received
8a3b7a25 Daniel Borkmann   2012-01-19  731   *		  BD processing.
8a3b7a25 Daniel Borkmann   2012-01-19  732   * @ndev:	Pointer to net_device structure.
8a3b7a25 Daniel Borkmann   2012-01-19  733   *
8a3b7a25 Daniel Borkmann   2012-01-19  734   * This function is invoked from the Axi DMA Rx isr to process the Rx BDs. It
8a3b7a25 Daniel Borkmann   2012-01-19  735   * does minimal processing and invokes "netif_rx" to complete further
8a3b7a25 Daniel Borkmann   2012-01-19  736   * processing.
8a3b7a25 Daniel Borkmann   2012-01-19  737   */
8a3b7a25 Daniel Borkmann   2012-01-19  738  static void axienet_recv(struct net_device *ndev)
8a3b7a25 Daniel Borkmann   2012-01-19  739  {
8a3b7a25 Daniel Borkmann   2012-01-19  740  	u32 length;
8a3b7a25 Daniel Borkmann   2012-01-19  741  	u32 csumstatus;
8a3b7a25 Daniel Borkmann   2012-01-19  742  	u32 size = 0;
8a3b7a25 Daniel Borkmann   2012-01-19  743  	u32 packets = 0;
38e96b35 Peter Crosthwaite 2015-05-05  744  	dma_addr_t tail_p = 0;
8a3b7a25 Daniel Borkmann   2012-01-19  745  	struct axienet_local *lp = netdev_priv(ndev);
8a3b7a25 Daniel Borkmann   2012-01-19  746  	struct sk_buff *skb, *new_skb;
8a3b7a25 Daniel Borkmann   2012-01-19  747  	struct axidma_bd *cur_p;
8a3b7a25 Daniel Borkmann   2012-01-19  748  
8a3b7a25 Daniel Borkmann   2012-01-19  749  	cur_p = &lp->rx_bd_v[lp->rx_bd_ci];
8a3b7a25 Daniel Borkmann   2012-01-19  750  
8a3b7a25 Daniel Borkmann   2012-01-19  751  	while ((cur_p->status & XAXIDMA_BD_STS_COMPLETE_MASK)) {
38e96b35 Peter Crosthwaite 2015-05-05  752  		tail_p = lp->rx_bd_p + sizeof(*lp->rx_bd_v) * lp->rx_bd_ci;
8a3b7a25 Daniel Borkmann   2012-01-19  753  
8a3b7a25 Daniel Borkmann   2012-01-19  754  		dma_unmap_single(ndev->dev.parent, cur_p->phys,
8a3b7a25 Daniel Borkmann   2012-01-19  755  				 lp->max_frm_size,
8a3b7a25 Daniel Borkmann   2012-01-19  756  				 DMA_FROM_DEVICE);
8a3b7a25 Daniel Borkmann   2012-01-19  757  
2f148c6d Robert Hancock    2019-05-31  758  		skb = cur_p->skb;
2f148c6d Robert Hancock    2019-05-31  759  		cur_p->skb = NULL;
2f148c6d Robert Hancock    2019-05-31  760  		length = cur_p->app4 & 0x0000FFFF;
2f148c6d Robert Hancock    2019-05-31  761  
8a3b7a25 Daniel Borkmann   2012-01-19  762  		skb_put(skb, length);
8a3b7a25 Daniel Borkmann   2012-01-19  763  		skb->protocol = eth_type_trans(skb, ndev);
8a3b7a25 Daniel Borkmann   2012-01-19  764  		/*skb_checksum_none_assert(skb);*/
8a3b7a25 Daniel Borkmann   2012-01-19  765  		skb->ip_summed = CHECKSUM_NONE;
8a3b7a25 Daniel Borkmann   2012-01-19  766  
8a3b7a25 Daniel Borkmann   2012-01-19  767  		/* if we're doing Rx csum offload, set it up */
8a3b7a25 Daniel Borkmann   2012-01-19  768  		if (lp->features & XAE_FEATURE_FULL_RX_CSUM) {
8a3b7a25 Daniel Borkmann   2012-01-19  769  			csumstatus = (cur_p->app2 &
8a3b7a25 Daniel Borkmann   2012-01-19  770  				      XAE_FULL_CSUM_STATUS_MASK) >> 3;
8a3b7a25 Daniel Borkmann   2012-01-19  771  			if ((csumstatus == XAE_IP_TCP_CSUM_VALIDATED) ||
8a3b7a25 Daniel Borkmann   2012-01-19  772  			    (csumstatus == XAE_IP_UDP_CSUM_VALIDATED)) {
8a3b7a25 Daniel Borkmann   2012-01-19  773  				skb->ip_summed = CHECKSUM_UNNECESSARY;
8a3b7a25 Daniel Borkmann   2012-01-19  774  			}
8a3b7a25 Daniel Borkmann   2012-01-19  775  		} else if ((lp->features & XAE_FEATURE_PARTIAL_RX_CSUM) != 0 &&
ceffc4ac Joe Perches       2014-03-12  776  			   skb->protocol == htons(ETH_P_IP) &&
8a3b7a25 Daniel Borkmann   2012-01-19  777  			   skb->len > 64) {
8a3b7a25 Daniel Borkmann   2012-01-19 @778  			skb->csum = be32_to_cpu(cur_p->app3 & 0xFFFF);
8a3b7a25 Daniel Borkmann   2012-01-19  779  			skb->ip_summed = CHECKSUM_COMPLETE;
8a3b7a25 Daniel Borkmann   2012-01-19  780  		}
8a3b7a25 Daniel Borkmann   2012-01-19  781  
8a3b7a25 Daniel Borkmann   2012-01-19  782  		netif_rx(skb);
8a3b7a25 Daniel Borkmann   2012-01-19  783  
8a3b7a25 Daniel Borkmann   2012-01-19  784  		size += length;
8a3b7a25 Daniel Borkmann   2012-01-19  785  		packets++;
8a3b7a25 Daniel Borkmann   2012-01-19  786  
8a3b7a25 Daniel Borkmann   2012-01-19  787  		new_skb = netdev_alloc_skb_ip_align(ndev, lp->max_frm_size);
720a43ef Joe Perches       2013-03-08  788  		if (!new_skb)
8a3b7a25 Daniel Borkmann   2012-01-19  789  			return;
720a43ef Joe Perches       2013-03-08  790  
8a3b7a25 Daniel Borkmann   2012-01-19  791  		cur_p->phys = dma_map_single(ndev->dev.parent, new_skb->data,
8a3b7a25 Daniel Borkmann   2012-01-19  792  					     lp->max_frm_size,
8a3b7a25 Daniel Borkmann   2012-01-19  793  					     DMA_FROM_DEVICE);
8a3b7a25 Daniel Borkmann   2012-01-19  794  		cur_p->cntrl = lp->max_frm_size;
8a3b7a25 Daniel Borkmann   2012-01-19  795  		cur_p->status = 0;
2f148c6d Robert Hancock    2019-05-31  796  		cur_p->skb = new_skb;
8a3b7a25 Daniel Borkmann   2012-01-19  797  
91ff37ff Michal Simek      2014-02-13  798  		++lp->rx_bd_ci;
91ff37ff Michal Simek      2014-02-13  799  		lp->rx_bd_ci %= RX_BD_NUM;
8a3b7a25 Daniel Borkmann   2012-01-19  800  		cur_p = &lp->rx_bd_v[lp->rx_bd_ci];
8a3b7a25 Daniel Borkmann   2012-01-19  801  	}
8a3b7a25 Daniel Borkmann   2012-01-19  802  
8a3b7a25 Daniel Borkmann   2012-01-19  803  	ndev->stats.rx_packets += packets;
8a3b7a25 Daniel Borkmann   2012-01-19  804  	ndev->stats.rx_bytes += size;
8a3b7a25 Daniel Borkmann   2012-01-19  805  
38e96b35 Peter Crosthwaite 2015-05-05  806  	if (tail_p)
8a3b7a25 Daniel Borkmann   2012-01-19  807  		axienet_dma_out32(lp, XAXIDMA_RX_TDESC_OFFSET, tail_p);
8a3b7a25 Daniel Borkmann   2012-01-19  808  }
8a3b7a25 Daniel Borkmann   2012-01-19  809  

:::::: The code at line 778 was first introduced by commit
:::::: 8a3b7a252dca9fb28c23b5bf76c49180a2b60d3b drivers/net/ethernet/xilinx: added Xilinx AXI Ethernet driver

:::::: TO: danborkmann@iogearbox.net <danborkmann@iogearbox.net>
:::::: CC: David S. Miller <davem@davemloft.net>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

  parent reply	other threads:[~2019-06-02  8:01 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-31 18:15 [PATCH net-next 00/13] Xilinx axienet driver updates Robert Hancock
2019-05-31 18:15 ` [PATCH net-next 01/13] net: axienet: Fixed 64-bit compile, enable build on X86 and ARM Robert Hancock
2019-05-31 21:10   ` Andrew Lunn
2019-05-31 23:28     ` Robert Hancock
2019-06-01  3:04       ` Andrew Lunn
2019-06-02  6:37   ` kbuild test robot [this message]
2019-05-31 18:15 ` [PATCH net-next 02/13] net: axienet: clean up MDIO handling Robert Hancock
2019-05-31 21:13   ` Andrew Lunn
2019-05-31 18:15 ` [PATCH net-next 03/13] net: axienet: Cleanup DMA device reset and halt process Robert Hancock
2019-05-31 18:15 ` [PATCH net-next 04/13] net: axienet: Make RX/TX ring sizes configurable Robert Hancock
2019-05-31 18:15 ` [PATCH net-next 05/13] net: axienet: Add DMA registers to ethtool register dump Robert Hancock
2019-05-31 18:15 ` [PATCH net-next 06/13] net: axienet: Support shared interrupts Robert Hancock
2019-05-31 18:15 ` [PATCH net-next 07/13] net: axienet: Add optional support for Ethernet core interrupt Robert Hancock
2019-05-31 18:15 ` [PATCH net-next 08/13] net: axienet: Fix race condition causing TX hang Robert Hancock
2019-05-31 18:15 ` [PATCH net-next 09/13] net: axienet: Make missing MAC address non-fatal Robert Hancock
2019-05-31 21:16   ` Andrew Lunn
2019-06-03 13:22   ` David Laight
2019-06-03 15:49     ` Robert Hancock
2019-05-31 18:15 ` [PATCH net-next 10/13] net: axienet: stop interface during shutdown Robert Hancock
2019-05-31 18:15 ` [PATCH net-next 11/13] net: axienet: document axistream-connected attribute Robert Hancock
2019-05-31 18:15 ` [PATCH net-next 12/13] net: axienet: make use of axistream-connected attribute optional Robert Hancock
2019-05-31 18:15 ` [PATCH net-next 13/13] net: axienet: convert to phylink API Robert Hancock

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201906021459.CkJJSWzi%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=John.Linn@xilinx.com \
    --cc=anirudh@xilinx.com \
    --cc=hancock@sedsystems.ca \
    --cc=kbuild-all@01.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.