[xlnx:master 193/271] drivers/net/ethernet/xilinx/xilinx_tsn_ep.c:57:9: error: implicit declaration of function 'axienet_mcdma_rx_q_init'; did you mean

kernel test robot lkp at intel.com
Tue Feb 9 02:49:43 EST 2021


tree:   https://github.com/Xilinx/linux-xlnx master
head:   d3774573d5a9700273bd0c3ff82af157107f7fa6
commit: f2be433a639c7a9beddc59dcaf4f3a5ee9bd511e [193/271] net: xilinx: Refactor TSN functions into xilinx_tsn_ip.c
config: h8300-randconfig-s031-20210209 (attached as .config)
compiler: h8300-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.3-215-g0fb77bb6-dirty
        # https://github.com/Xilinx/linux-xlnx/commit/f2be433a639c7a9beddc59dcaf4f3a5ee9bd511e
        git remote add xlnx https://github.com/Xilinx/linux-xlnx
        git fetch --no-tags xlnx master
        git checkout f2be433a639c7a9beddc59dcaf4f3a5ee9bd511e
        # 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=h8300 

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

All errors (new ones prefixed by >>):

   In file included from arch/h8300/include/asm/bug.h:8,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:12,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/h8300/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/seqlock.h:36,
                    from include/linux/time.h:6,
                    from include/linux/skbuff.h:15,
                    from include/linux/if_ether.h:19,
                    from include/linux/etherdevice.h:20,
                    from drivers/net/ethernet/xilinx/xilinx_tsn_ep.c:18:
   include/linux/dma-mapping.h: In function 'dma_map_resource':
   include/asm-generic/page.h:91:32: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
      91 | #define pfn_valid(pfn)  ((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr)
         |                                ^~
   include/asm-generic/bug.h:182:25: note: in definition of macro 'WARN_ON'
     182 |  int __ret_warn_on = !!(condition);    \
         |                         ^~~~~~~~~
   include/linux/dma-mapping.h:355:6: note: in expansion of macro 'WARN_ON_ONCE'
     355 |  if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
         |      ^~~~~~~~~~~~
   include/linux/dma-mapping.h:355:19: note: in expansion of macro 'pfn_valid'
     355 |  if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
         |                   ^~~~~~~~~
   drivers/net/ethernet/xilinx/xilinx_tsn_ep.c: In function 'tsn_ep_open':
>> drivers/net/ethernet/xilinx/xilinx_tsn_ep.c:57:9: error: implicit declaration of function 'axienet_mcdma_rx_q_init'; did you mean 'axienet_dma_q_init'? [-Werror=implicit-function-declaration]
      57 |   ret = axienet_mcdma_rx_q_init(ndev, q);
         |         ^~~~~~~~~~~~~~~~~~~~~~~
         |         axienet_dma_q_init
>> drivers/net/ethernet/xilinx/xilinx_tsn_ep.c:60:32: error: 'axienet_mcdma_rx_irq' undeclared (first use in this function); did you mean 'axienet_rx_irq'?
      60 |   ret = request_irq(q->rx_irq, axienet_mcdma_rx_irq,
         |                                ^~~~~~~~~~~~~~~~~~~~
         |                                axienet_rx_irq
   drivers/net/ethernet/xilinx/xilinx_tsn_ep.c:60:32: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/net/ethernet/xilinx/xilinx_tsn_ep.c:66:9: error: 'axienet_mcdma_err_handler' undeclared (first use in this function); did you mean 'axienet_dma_err_handler'?
      66 |         axienet_mcdma_err_handler,
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~
         |         axienet_dma_err_handler
>> drivers/net/ethernet/xilinx/xilinx_tsn_ep.c:74:9: error: implicit declaration of function 'axienet_mcdma_tx_q_init'; did you mean 'axienet_dma_q_init'? [-Werror=implicit-function-declaration]
      74 |   ret = axienet_mcdma_tx_q_init(ndev, q);
         |         ^~~~~~~~~~~~~~~~~~~~~~~
         |         axienet_dma_q_init
>> drivers/net/ethernet/xilinx/xilinx_tsn_ep.c:76:32: error: 'axienet_mcdma_tx_irq' undeclared (first use in this function); did you mean 'axienet_tx_irq'?
      76 |   ret = request_irq(q->tx_irq, axienet_mcdma_tx_irq,
         |                                ^~~~~~~~~~~~~~~~~~~~
         |                                axienet_tx_irq
   cc1: some warnings being treated as errors
--
   In file included from arch/h8300/include/asm/bug.h:8,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:12,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/h8300/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/seqlock.h:36,
                    from include/linux/time.h:6,
                    from include/linux/stat.h:19,
                    from include/linux/module.h:10,
                    from drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:19:
   include/linux/dma-mapping.h: In function 'dma_map_resource':
   include/asm-generic/page.h:91:32: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
      91 | #define pfn_valid(pfn)  ((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr)
         |                                ^~
   include/asm-generic/bug.h:182:25: note: in definition of macro 'WARN_ON'
     182 |  int __ret_warn_on = !!(condition);    \
         |                         ^~~~~~~~~
   include/linux/dma-mapping.h:355:6: note: in expansion of macro 'WARN_ON_ONCE'
     355 |  if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
         |      ^~~~~~~~~~~~
   include/linux/dma-mapping.h:355:19: note: in expansion of macro 'pfn_valid'
     355 |  if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
         |                   ^~~~~~~~~
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c: In function 'axienet_tsn_probe':
>> drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:108:4: error: 'struct axienet_local' has no member named 'ptp_rx_irq'
     108 |  lp->ptp_rx_irq = platform_get_irq_byname(pdev, irq_name);
         |    ^~
   In file included from include/linux/kernel.h:15,
                    from include/linux/list.h:9,
                    from include/linux/module.h:9,
                    from drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:19:
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:110:35: error: 'struct axienet_local' has no member named 'ptp_rx_irq'
     110 |  pr_info("ptp RX irq: %d %s\n", lp->ptp_rx_irq, irq_name);
         |                                   ^~
   include/linux/printk.h:311:34: note: in definition of macro 'pr_info'
     311 |  printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
         |                                  ^~~~~~~~~~~
>> drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:112:4: error: 'struct axienet_local' has no member named 'ptp_tx_irq'
     112 |  lp->ptp_tx_irq = platform_get_irq_byname(pdev, irq_name);
         |    ^~
   In file included from include/linux/kernel.h:15,
                    from include/linux/list.h:9,
                    from include/linux/module.h:9,
                    from drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:19:
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:113:35: error: 'struct axienet_local' has no member named 'ptp_tx_irq'
     113 |  pr_info("ptp TX irq: %d %s\n", lp->ptp_tx_irq, irq_name);
         |                                   ^~
   include/linux/printk.h:311:34: note: in definition of macro 'pr_info'
     311 |  printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
         |                                  ^~~~~~~~~~~
>> drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:116:4: error: 'struct axienet_local' has no member named 'qbv_irq'
     116 |  lp->qbv_irq = platform_get_irq_byname(pdev, irq_name);
         |    ^~
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:119:8: error: 'struct axienet_local' has no member named 'qbv_irq'
     119 |  if (lp->qbv_irq > 0)
         |        ^~
   In file included from include/linux/kernel.h:15,
                    from include/linux/list.h:9,
                    from include/linux/module.h:9,
                    from drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:19:
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:120:33: error: 'struct axienet_local' has no member named 'qbv_irq'
     120 |   pr_info("qbv_irq: %d %s\n", lp->qbv_irq, irq_name);
         |                                 ^~
   include/linux/printk.h:311:34: note: in definition of macro 'pr_info'
     311 |  printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
         |                                  ^~~~~~~~~~~
>> drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:125:3: error: implicit declaration of function 'axienet_ptp_timer_probe'; did you mean 'axienet_tsn_probe'? [-Werror=implicit-function-declaration]
     125 |   axienet_ptp_timer_probe((lp->regs + XAE_RTC_OFFSET), pdev);
         |   ^~~~~~~~~~~~~~~~~~~~~~~
         |   axienet_tsn_probe
>> drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:125:39: error: 'XAE_RTC_OFFSET' undeclared (first use in this function); did you mean 'XAE_TC_OFFSET'?
     125 |   axienet_ptp_timer_probe((lp->regs + XAE_RTC_OFFSET), pdev);
         |                                       ^~~~~~~~~~~~~~
         |                                       XAE_TC_OFFSET
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:125:39: note: each undeclared identifier is reported only once for each function it appears in
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:93:6: warning: unused variable 'ret' [-Wunused-variable]
      93 |  int ret = 0;
         |      ^~~
   In file included from include/linux/mm_types.h:16,
                    from include/linux/mmzone.h:21,
                    from include/linux/gfp.h:6,
                    from include/linux/umh.h:4,
                    from include/linux/kmod.h:9,
                    from include/linux/module.h:13,
                    from drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:19:
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c: In function 'axienet_tsn_open':
>> drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:279:15: error: 'struct axienet_local' has no member named 'tx_tstamp_work'
     279 |  INIT_WORK(&lp->tx_tstamp_work, axienet_tx_tstamp);
         |               ^~
   include/linux/workqueue.h:242:16: note: in definition of macro '__INIT_WORK'
     242 |   __init_work((_work), _onstack);    \
         |                ^~~~~
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:279:2: note: in expansion of macro 'INIT_WORK'
     279 |  INIT_WORK(&lp->tx_tstamp_work, axienet_tx_tstamp);
         |  ^~~~~~~~~
>> drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:279:15: error: 'struct axienet_local' has no member named 'tx_tstamp_work'
     279 |  INIT_WORK(&lp->tx_tstamp_work, axienet_tx_tstamp);
         |               ^~
   include/linux/workqueue.h:243:4: note: in definition of macro '__INIT_WORK'
     243 |   (_work)->data = (atomic_long_t) WORK_DATA_INIT(); \
         |    ^~~~~
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:279:2: note: in expansion of macro 'INIT_WORK'
     279 |  INIT_WORK(&lp->tx_tstamp_work, axienet_tx_tstamp);
         |  ^~~~~~~~~
>> drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:279:15: error: 'struct axienet_local' has no member named 'tx_tstamp_work'
     279 |  INIT_WORK(&lp->tx_tstamp_work, axienet_tx_tstamp);
         |               ^~
   include/linux/workqueue.h:244:20: note: in definition of macro '__INIT_WORK'
     244 |   INIT_LIST_HEAD(&(_work)->entry);   \
         |                    ^~~~~
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:279:2: note: in expansion of macro 'INIT_WORK'
     279 |  INIT_WORK(&lp->tx_tstamp_work, axienet_tx_tstamp);
         |  ^~~~~~~~~
>> drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:279:15: error: 'struct axienet_local' has no member named 'tx_tstamp_work'
     279 |  INIT_WORK(&lp->tx_tstamp_work, axienet_tx_tstamp);
         |               ^~
   include/linux/workqueue.h:245:4: note: in definition of macro '__INIT_WORK'
     245 |   (_work)->func = (_func);    \
         |    ^~~~~
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:279:2: note: in expansion of macro 'INIT_WORK'
     279 |  INIT_WORK(&lp->tx_tstamp_work, axienet_tx_tstamp);
         |  ^~~~~~~~~
>> drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:279:33: error: 'axienet_tx_tstamp' undeclared (first use in this function); did you mean 'axienet_tx_hwtstamp'?
     279 |  INIT_WORK(&lp->tx_tstamp_work, axienet_tx_tstamp);
         |                                 ^~~~~~~~~~~~~~~~~
   include/linux/workqueue.h:245:20: note: in definition of macro '__INIT_WORK'
     245 |   (_work)->func = (_func);    \
         |                    ^~~~~
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:279:2: note: in expansion of macro 'INIT_WORK'
     279 |  INIT_WORK(&lp->tx_tstamp_work, axienet_tx_tstamp);
         |  ^~~~~~~~~
>> drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:280:25: error: 'struct axienet_local' has no member named 'ptp_txq'
     280 |  skb_queue_head_init(&lp->ptp_txq);
         |                         ^~
>> drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:282:4: error: 'struct axienet_local' has no member named 'ptp_rx_hw_pointer'
     282 |  lp->ptp_rx_hw_pointer = 0;
         |    ^~
>> drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:283:4: error: 'struct axienet_local' has no member named 'ptp_rx_sw_pointer'
     283 |  lp->ptp_rx_sw_pointer = 0xff;
         |    ^~
>> drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:285:18: error: 'PTP_RX_CONTROL_OFFSET' undeclared (first use in this function)
     285 |  axienet_iow(lp, PTP_RX_CONTROL_OFFSET, PTP_RX_PACKET_CLEAR);
         |                  ^~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:285:41: error: 'PTP_RX_PACKET_CLEAR' undeclared (first use in this function); did you mean 'PTR_TO_PACKET_END'?
     285 |  axienet_iow(lp, PTP_RX_CONTROL_OFFSET, PTP_RX_PACKET_CLEAR);
         |                                         ^~~~~~~~~~~~~~~~~~~
         |                                         PTR_TO_PACKET_END
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:287:22: error: 'struct axienet_local' has no member named 'ptp_rx_irq'
     287 |  ret = request_irq(lp->ptp_rx_irq, axienet_ptp_rx_irq,
         |                      ^~
>> drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:287:36: error: 'axienet_ptp_rx_irq' undeclared (first use in this function); did you mean 'axienet_rx_irq'?
     287 |  ret = request_irq(lp->ptp_rx_irq, axienet_ptp_rx_irq,
         |                                    ^~~~~~~~~~~~~~~~~~
         |                                    axienet_rx_irq
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:292:22: error: 'struct axienet_local' has no member named 'ptp_tx_irq'
     292 |  ret = request_irq(lp->ptp_tx_irq, axienet_ptp_tx_irq,
         |                      ^~
>> drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:292:36: error: 'axienet_ptp_tx_irq' undeclared (first use in this function); did you mean 'axienet_tx_irq'?
     292 |  ret = request_irq(lp->ptp_tx_irq, axienet_ptp_tx_irq,
         |                                    ^~~~~~~~~~~~~~~~~~
         |                                    axienet_tx_irq
   drivers/net/ethernet/xilinx/xilinx_tsn_ip.c:302:13: error: 'struct axienet_local' has no member named 'ptp_rx_irq'
     302 |  free_irq(lp->ptp_rx_irq, ndev);
         |             ^~
   cc1: some warnings being treated as errors


vim +57 drivers/net/ethernet/xilinx/xilinx_tsn_ep.c

    30	
    31	/**
    32	 * tsn_ep_open - TSN EP driver open routine.
    33	 * @ndev:	Pointer to net_device structure
    34	 *
    35	 * Return: 0, on success.
    36	 *	    non-zero error value on failure
    37	 *
    38	 * This is the driver open routine. It also allocates interrupt service
    39	 * routines, enables the interrupt lines and ISR handling. Axi Ethernet
    40	 * core is reset through Axi DMA core. Buffer descriptors are initialized.
    41	 */
    42	static int tsn_ep_open(struct net_device *ndev)
    43	{
    44		int ret, i = 0;
    45		struct axienet_local *lp = netdev_priv(ndev);
    46		struct axienet_dma_q *q;
    47	
    48		for_each_tx_dma_queue(lp, i) {
    49			q = lp->dq[i];
    50			/*MCDMA TX RESET*/
    51			__axienet_device_reset(q);
    52		}
    53	
    54		for_each_rx_dma_queue(lp, i) {
    55			q = lp->dq[i];
    56	
  > 57			ret = axienet_mcdma_rx_q_init(ndev, q);
    58			/* Enable interrupts for Axi MCDMA Rx
    59			 */
  > 60			ret = request_irq(q->rx_irq, axienet_mcdma_rx_irq,
    61					  IRQF_SHARED, ndev->name, ndev);
    62			if (ret)
    63				goto err_dma_rx_irq;
    64	
    65			tasklet_init(&lp->dma_err_tasklet[i],
  > 66				     axienet_mcdma_err_handler,
    67				     (unsigned long)lp->dq[i]);
    68			napi_enable(&lp->napi[i]);
    69		}
    70	
    71		for_each_tx_dma_queue(lp, i) {
    72			q = lp->dq[i];
    73	
  > 74			ret = axienet_mcdma_tx_q_init(ndev, q);
    75			/* Enable interrupts for Axi MCDMA Tx */
  > 76			ret = request_irq(q->tx_irq, axienet_mcdma_tx_irq,
    77					  IRQF_SHARED, ndev->name, ndev);
    78			if (ret)
    79				goto err_dma_tx_irq;
    80		}
    81	
    82		netif_tx_start_all_queues(ndev);
    83		return 0;
    84	
    85	err_dma_tx_irq:
    86		for_each_rx_dma_queue(lp, i) {
    87			q = lp->dq[i];
    88			free_irq(q->rx_irq, ndev);
    89		}
    90	err_dma_rx_irq:
    91		return ret;
    92	}
    93	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 19804 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210209/e3d55ebe/attachment-0001.gz>


More information about the linux-arm-kernel mailing list