lkml.org 
[lkml]   [2020]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectdrivers/net/ethernet/nxp/lpc_eth.c:561:35: sparse: sparse: incorrect type in assignment (different base types)
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d52daa8620c65960e1ef882adc1f92061326bd7a
commit: 35974a7cc23c5deb5597c0a42183172498c4a0a8 net: lpc-enet: allow compile testing
date: 12 months ago
config: nios2-randconfig-s031-20200802 (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-115-g5fc204f2-dirty
git checkout 35974a7cc23c5deb5597c0a42183172498c4a0a8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=nios2

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


sparse warnings: (new ones prefixed by >>)

>> drivers/net/ethernet/nxp/lpc_eth.c:561:35: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] packet @@ got unsigned int @@
>> drivers/net/ethernet/nxp/lpc_eth.c:561:35: sparse: expected restricted __le32 [usertype] packet
>> drivers/net/ethernet/nxp/lpc_eth.c:561:35: sparse: got unsigned int
drivers/net/ethernet/nxp/lpc_eth.c:572:35: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] packet @@ got unsigned int @@
drivers/net/ethernet/nxp/lpc_eth.c:572:35: sparse: expected restricted __le32 [usertype] packet
drivers/net/ethernet/nxp/lpc_eth.c:572:35: sparse: got unsigned int
>> drivers/net/ethernet/nxp/lpc_eth.c:574:36: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] control @@ got int @@
>> drivers/net/ethernet/nxp/lpc_eth.c:574:36: sparse: expected restricted __le32 [usertype] control
>> drivers/net/ethernet/nxp/lpc_eth.c:574:36: sparse: got int
>> drivers/net/ethernet/nxp/lpc_eth.c:900:31: sparse: sparse: restricted __le32 degrades to integer
>> drivers/net/ethernet/nxp/lpc_eth.c:903:23: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] ethst @@ got restricted __le32 [usertype] statusinfo @@
>> drivers/net/ethernet/nxp/lpc_eth.c:903:23: sparse: expected unsigned int [usertype] ethst
>> drivers/net/ethernet/nxp/lpc_eth.c:903:23: sparse: got restricted __le32 [usertype] statusinfo
>> drivers/net/ethernet/nxp/lpc_eth.c:909:41: sparse: sparse: incorrect type in initializer (different base types) @@ expected int si @@ got restricted __le32 [usertype] statusinfo @@
>> drivers/net/ethernet/nxp/lpc_eth.c:909:41: sparse: expected int si
drivers/net/ethernet/nxp/lpc_eth.c:909:41: sparse: got restricted __le32 [usertype] statusinfo
>> drivers/net/ethernet/nxp/lpc_eth.c:1051:28: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le32 [usertype] control @@ got unsigned int @@
drivers/net/ethernet/nxp/lpc_eth.c:1051:28: sparse: expected restricted __le32 [usertype] control
drivers/net/ethernet/nxp/lpc_eth.c:1051:28: sparse: got unsigned int
drivers/net/ethernet/nxp/lpc_eth.c:1308:42: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] <asn:2> **mapbase @@ got void ** @@
drivers/net/ethernet/nxp/lpc_eth.c:1308:42: sparse: expected void [noderef] <asn:2> **mapbase
>> drivers/net/ethernet/nxp/lpc_eth.c:1308:42: sparse: got void **
drivers/net/ethernet/nxp/lpc_eth.c: note: in included file (through arch/nios2/include/asm/io.h, include/linux/io.h, arch/nios2/include/asm/pgtable.h, ...):
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]

vim +561 drivers/net/ethernet/nxp/lpc_eth.c

b7370112f5195a stigge@antcom.de 2012-03-08 521
b7370112f5195a stigge@antcom.de 2012-03-08 522 /* Setup TX/RX descriptors */
b7370112f5195a stigge@antcom.de 2012-03-08 523 static void __lpc_txrx_desc_setup(struct netdata_local *pldat)
b7370112f5195a stigge@antcom.de 2012-03-08 524 {
b7370112f5195a stigge@antcom.de 2012-03-08 525 u32 *ptxstat;
b7370112f5195a stigge@antcom.de 2012-03-08 526 void *tbuff;
b7370112f5195a stigge@antcom.de 2012-03-08 527 int i;
b7370112f5195a stigge@antcom.de 2012-03-08 528 struct txrx_desc_t *ptxrxdesc;
b7370112f5195a stigge@antcom.de 2012-03-08 529 struct rx_status_t *prxstat;
b7370112f5195a stigge@antcom.de 2012-03-08 530
b7370112f5195a stigge@antcom.de 2012-03-08 531 tbuff = PTR_ALIGN(pldat->dma_buff_base_v, 16);
b7370112f5195a stigge@antcom.de 2012-03-08 532
b7370112f5195a stigge@antcom.de 2012-03-08 533 /* Setup TX descriptors, status, and buffers */
b7370112f5195a stigge@antcom.de 2012-03-08 534 pldat->tx_desc_v = tbuff;
b7370112f5195a stigge@antcom.de 2012-03-08 535 tbuff += sizeof(struct txrx_desc_t) * ENET_TX_DESC;
b7370112f5195a stigge@antcom.de 2012-03-08 536
b7370112f5195a stigge@antcom.de 2012-03-08 537 pldat->tx_stat_v = tbuff;
b7370112f5195a stigge@antcom.de 2012-03-08 538 tbuff += sizeof(u32) * ENET_TX_DESC;
b7370112f5195a stigge@antcom.de 2012-03-08 539
b7370112f5195a stigge@antcom.de 2012-03-08 540 tbuff = PTR_ALIGN(tbuff, 16);
b7370112f5195a stigge@antcom.de 2012-03-08 541 pldat->tx_buff_v = tbuff;
b7370112f5195a stigge@antcom.de 2012-03-08 542 tbuff += ENET_MAXF_SIZE * ENET_TX_DESC;
b7370112f5195a stigge@antcom.de 2012-03-08 543
b7370112f5195a stigge@antcom.de 2012-03-08 544 /* Setup RX descriptors, status, and buffers */
b7370112f5195a stigge@antcom.de 2012-03-08 545 pldat->rx_desc_v = tbuff;
b7370112f5195a stigge@antcom.de 2012-03-08 546 tbuff += sizeof(struct txrx_desc_t) * ENET_RX_DESC;
b7370112f5195a stigge@antcom.de 2012-03-08 547
b7370112f5195a stigge@antcom.de 2012-03-08 548 tbuff = PTR_ALIGN(tbuff, 16);
b7370112f5195a stigge@antcom.de 2012-03-08 549 pldat->rx_stat_v = tbuff;
b7370112f5195a stigge@antcom.de 2012-03-08 550 tbuff += sizeof(struct rx_status_t) * ENET_RX_DESC;
b7370112f5195a stigge@antcom.de 2012-03-08 551
b7370112f5195a stigge@antcom.de 2012-03-08 552 tbuff = PTR_ALIGN(tbuff, 16);
b7370112f5195a stigge@antcom.de 2012-03-08 553 pldat->rx_buff_v = tbuff;
b7370112f5195a stigge@antcom.de 2012-03-08 554 tbuff += ENET_MAXF_SIZE * ENET_RX_DESC;
b7370112f5195a stigge@antcom.de 2012-03-08 555
b7370112f5195a stigge@antcom.de 2012-03-08 556 /* Map the TX descriptors to the TX buffers in hardware */
b7370112f5195a stigge@antcom.de 2012-03-08 557 for (i = 0; i < ENET_TX_DESC; i++) {
b7370112f5195a stigge@antcom.de 2012-03-08 558 ptxstat = &pldat->tx_stat_v[i];
b7370112f5195a stigge@antcom.de 2012-03-08 559 ptxrxdesc = &pldat->tx_desc_v[i];
b7370112f5195a stigge@antcom.de 2012-03-08 560
b7370112f5195a stigge@antcom.de 2012-03-08 @561 ptxrxdesc->packet = __va_to_pa(
b7370112f5195a stigge@antcom.de 2012-03-08 562 pldat->tx_buff_v + i * ENET_MAXF_SIZE, pldat);
b7370112f5195a stigge@antcom.de 2012-03-08 563 ptxrxdesc->control = 0;
b7370112f5195a stigge@antcom.de 2012-03-08 564 *ptxstat = 0;
b7370112f5195a stigge@antcom.de 2012-03-08 565 }
b7370112f5195a stigge@antcom.de 2012-03-08 566
b7370112f5195a stigge@antcom.de 2012-03-08 567 /* Map the RX descriptors to the RX buffers in hardware */
b7370112f5195a stigge@antcom.de 2012-03-08 568 for (i = 0; i < ENET_RX_DESC; i++) {
b7370112f5195a stigge@antcom.de 2012-03-08 569 prxstat = &pldat->rx_stat_v[i];
b7370112f5195a stigge@antcom.de 2012-03-08 570 ptxrxdesc = &pldat->rx_desc_v[i];
b7370112f5195a stigge@antcom.de 2012-03-08 571
b7370112f5195a stigge@antcom.de 2012-03-08 572 ptxrxdesc->packet = __va_to_pa(
b7370112f5195a stigge@antcom.de 2012-03-08 573 pldat->rx_buff_v + i * ENET_MAXF_SIZE, pldat);
b7370112f5195a stigge@antcom.de 2012-03-08 @574 ptxrxdesc->control = RXDESC_CONTROL_INT | (ENET_MAXF_SIZE - 1);
b7370112f5195a stigge@antcom.de 2012-03-08 575 prxstat->statusinfo = 0;
b7370112f5195a stigge@antcom.de 2012-03-08 576 prxstat->statushashcrc = 0;
b7370112f5195a stigge@antcom.de 2012-03-08 577 }
b7370112f5195a stigge@antcom.de 2012-03-08 578
b7370112f5195a stigge@antcom.de 2012-03-08 579 /* Setup base addresses in hardware to point to buffers and
b7370112f5195a stigge@antcom.de 2012-03-08 580 * descriptors
b7370112f5195a stigge@antcom.de 2012-03-08 581 */
b7370112f5195a stigge@antcom.de 2012-03-08 582 writel((ENET_TX_DESC - 1),
b7370112f5195a stigge@antcom.de 2012-03-08 583 LPC_ENET_TXDESCRIPTORNUMBER(pldat->net_base));
b7370112f5195a stigge@antcom.de 2012-03-08 584 writel(__va_to_pa(pldat->tx_desc_v, pldat),
b7370112f5195a stigge@antcom.de 2012-03-08 585 LPC_ENET_TXDESCRIPTOR(pldat->net_base));
b7370112f5195a stigge@antcom.de 2012-03-08 586 writel(__va_to_pa(pldat->tx_stat_v, pldat),
b7370112f5195a stigge@antcom.de 2012-03-08 587 LPC_ENET_TXSTATUS(pldat->net_base));
b7370112f5195a stigge@antcom.de 2012-03-08 588 writel((ENET_RX_DESC - 1),
b7370112f5195a stigge@antcom.de 2012-03-08 589 LPC_ENET_RXDESCRIPTORNUMBER(pldat->net_base));
b7370112f5195a stigge@antcom.de 2012-03-08 590 writel(__va_to_pa(pldat->rx_desc_v, pldat),
b7370112f5195a stigge@antcom.de 2012-03-08 591 LPC_ENET_RXDESCRIPTOR(pldat->net_base));
b7370112f5195a stigge@antcom.de 2012-03-08 592 writel(__va_to_pa(pldat->rx_stat_v, pldat),
b7370112f5195a stigge@antcom.de 2012-03-08 593 LPC_ENET_RXSTATUS(pldat->net_base));
b7370112f5195a stigge@antcom.de 2012-03-08 594 }
b7370112f5195a stigge@antcom.de 2012-03-08 595

:::::: The code at line 561 was first introduced by commit
:::::: b7370112f5195ae2e2e52b5ef46961422fa4daf0 lpc32xx: Added ethernet driver

:::::: TO: stigge@antcom.de <stigge@antcom.de>
:::::: CC: David S. Miller <davem@davemloft.net>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2020-08-02 03:44    [W:0.041 / U:0.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site