[xlnx:master 194/271] drivers/net/ethernet/xilinx/xilinx_tsn_ep.c:251:2: error: implicit declaration of function 'axienet_mcdma_rx_probe'; did you mean

kernel test robot lkp at intel.com
Tue Feb 9 03:11:35 EST 2021


tree:   https://github.com/Xilinx/linux-xlnx master
head:   d3774573d5a9700273bd0c3ff82af157107f7fa6
commit: a798643cd83ffa136df8a0938526671d424758fc [194/271] net: xilinx: Add a separate mcdma probe function for TSN IP
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/a798643cd83ffa136df8a0938526671d424758fc
        git remote add xlnx https://github.com/Xilinx/linux-xlnx
        git fetch --no-tags xlnx master
        git checkout a798643cd83ffa136df8a0938526671d424758fc
        # 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
   drivers/net/ethernet/xilinx/xilinx_tsn_ep.c: In function 'tsn_mcdma_probe':
>> drivers/net/ethernet/xilinx/xilinx_tsn_ep.c:251:2: error: implicit declaration of function 'axienet_mcdma_rx_probe'; did you mean 'axienet_tsn_probe'? [-Werror=implicit-function-declaration]
     251 |  axienet_mcdma_rx_probe(pdev, lp, ndev);
         |  ^~~~~~~~~~~~~~~~~~~~~~
         |  axienet_tsn_probe
>> drivers/net/ethernet/xilinx/xilinx_tsn_ep.c:252:2: error: implicit declaration of function 'axienet_mcdma_tx_probe'; did you mean 'axienet_tsn_probe'? [-Werror=implicit-function-declaration]
     252 |  axienet_mcdma_tx_probe(pdev, np, lp);
         |  ^~~~~~~~~~~~~~~~~~~~~~
         |  axienet_tsn_probe
   cc1: some warnings being treated as errors


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

   189	
   190	/* separate function is needed to probe tsn mcdma
   191	 * as there is asymmetry between rx channels and tx channels
   192	 * having unique probe for both tsn and axienet with mcdma is not possible
   193	 */
   194	static int __maybe_unused tsn_mcdma_probe(struct platform_device *pdev,
   195						  struct axienet_local *lp,
   196						  struct net_device *ndev)
   197	{
   198		int i, ret = 0;
   199		struct axienet_dma_q *q;
   200		struct device_node *np;
   201		struct resource dmares;
   202		const char *str;
   203		u32 num;
   204	
   205		ret = of_property_count_strings(pdev->dev.of_node, "xlnx,channel-ids");
   206		if (ret < 0)
   207			return -EINVAL;
   208	
   209		np = of_parse_phandle(pdev->dev.of_node, "axistream-connected-rx",
   210				      0);
   211		/* get number of associated queues */
   212		ret = of_property_read_u32(np, "xlnx,num-s2mm-channels", &num);
   213		if (ret < 0)
   214			return -EINVAL;
   215	
   216		lp->num_rx_queues = num;
   217		pr_info("%s: num_rx_queues: %d\n", __func__, lp->num_rx_queues);
   218	
   219		for_each_rx_dma_queue(lp, i) {
   220			q = kzalloc(sizeof(*q), GFP_KERNEL);
   221	
   222			/* parent */
   223			q->lp = lp;
   224			lp->dq[i] = q;
   225			ret = of_property_read_string_index(pdev->dev.of_node,
   226							    "xlnx,channel-ids", i,
   227							    &str);
   228			ret = kstrtou16(str, 16, &q->chan_id);
   229			lp->qnum[i] = i;
   230			lp->chan_num[i] = q->chan_id;
   231		}
   232	
   233		if (IS_ERR(np)) {
   234			dev_err(&pdev->dev, "could not find DMA node\n");
   235			return ret;
   236		}
   237	
   238		ret = of_address_to_resource(np, 0, &dmares);
   239		if (ret) {
   240			dev_err(&pdev->dev, "unable to get DMA resource\n");
   241			return ret;
   242		}
   243	
   244		lp->mcdma_regs = devm_ioremap_resource(&pdev->dev, &dmares);
   245		if (IS_ERR(lp->mcdma_regs)) {
   246			dev_err(&pdev->dev, "iormeap failed for the dma\n");
   247			ret = PTR_ERR(lp->mcdma_regs);
   248			return ret;
   249		}
   250	
 > 251		axienet_mcdma_rx_probe(pdev, lp, ndev);
 > 252		axienet_mcdma_tx_probe(pdev, np, lp);
   253	
   254		return 0;
   255	}
   256	

---
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/d4e0a65f/attachment-0001.gz>


More information about the linux-arm-kernel mailing list