Re: [PATCH 2/3] Added Xilinx PCIe DMA IP core driver

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

 



Hi,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on media-tree/master]
[also build test WARNING on vkoul-dmaengine/next linus/master v6.0-rc2 next-20220822]
[cannot apply to xilinx-xlnx/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/martin-tuma-digiteqautomotive-com/Digiteq-Automotive-MGB4-driver/20220823-015724
base:   git://linuxtv.org/media_tree.git master
config: loongarch-allyesconfig (https://download.01.org/0day-ci/archive/20220823/202208230332.Ou2XawTv-lkp@xxxxxxxxx/config)
compiler: loongarch64-linux-gcc (GCC) 12.1.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://github.com/intel-lab-lkp/linux/commit/178e549c877b1d8919b6559be1d09a264c7e176a
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review martin-tuma-digiteqautomotive-com/Digiteq-Automotive-MGB4-driver/20220823-015724
        git checkout 178e549c877b1d8919b6559be1d09a264c7e176a
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch SHELL=/bin/bash drivers/dma/xilinx/ drivers/media/pci/

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

All warnings (new ones prefixed by >>):

   drivers/dma/xilinx/xdma_core.c: In function 'enable_msi_msix':
>> drivers/dma/xilinx/xdma_core.c:1628:73: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
    1628 |                         dbg_init("Couldn't enable MSI-X mode: %d\n", rv);
         |                                                                         ^
   drivers/dma/xilinx/xdma_core.c:1639:71: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
    1639 |                         dbg_init("Couldn't enable MSI mode: %d\n", rv);
         |                                                                       ^
   drivers/dma/xilinx/xdma_core.c: In function 'irq_msi_channel_setup':
>> drivers/dma/xilinx/xdma_core.c:1829:83: warning: suggest braces around empty body in an 'else' statement [-Wempty-body]
    1829 |                 dbg_init("engine using IRQ#%d with 0x%p\n", xdev->pdev->irq, xdev);
         |                                                                                   ^
--
>> drivers/dma/xilinx/xdma_thread.c:123:5: warning: no previous prototype for 'xdma_kthread_start' [-Wmissing-prototypes]
     123 | int xdma_kthread_start(struct xdma_kthread *thp, char *name, int id)
         |     ^~~~~~~~~~~~~~~~~~
>> drivers/dma/xilinx/xdma_thread.c:166:5: warning: no previous prototype for 'xdma_kthread_stop' [-Wmissing-prototypes]
     166 | int xdma_kthread_stop(struct xdma_kthread *thp)
         |     ^~~~~~~~~~~~~~~~~
--
   drivers/dma/xilinx/xdma_core.c:410: warning: Function parameter or member 'engine' not described in 'engine_status_read'
   drivers/dma/xilinx/xdma_core.c:410: warning: Function parameter or member 'clear' not described in 'engine_status_read'
   drivers/dma/xilinx/xdma_core.c:410: warning: Function parameter or member 'dump' not described in 'engine_status_read'
   drivers/dma/xilinx/xdma_core.c:443: warning: Function parameter or member 'engine' not described in 'xdma_engine_stop'
   drivers/dma/xilinx/xdma_core.c:534: warning: Function parameter or member 'remaining' not described in 'xdma_get_next_adj'
   drivers/dma/xilinx/xdma_core.c:534: warning: Function parameter or member 'next_lo' not described in 'xdma_get_next_adj'
   drivers/dma/xilinx/xdma_core.c:568: warning: Function parameter or member 'engine' not described in 'engine_start'
   drivers/dma/xilinx/xdma_core.c:669: warning: Function parameter or member 'engine' not described in 'engine_service_shutdown'
>> drivers/dma/xilinx/xdma_core.c:669: warning: expecting prototype for engine_service(). Prototype was for engine_service_shutdown() instead
   drivers/dma/xilinx/xdma_core.c:949: warning: Function parameter or member 'engine' not described in 'engine_service'
   drivers/dma/xilinx/xdma_core.c:949: warning: Function parameter or member 'desc_writeback' not described in 'engine_service'


vim +/if +1628 drivers/dma/xilinx/xdma_core.c

  1605	
  1606	static int enable_msi_msix(struct xdma_dev *xdev, struct pci_dev *pdev)
  1607	{
  1608		int rv = 0;
  1609	
  1610		if (!xdev) {
  1611			pr_err("Invalid xdev\n");
  1612			return -EINVAL;
  1613		}
  1614	
  1615		if (!pdev) {
  1616			pr_err("Invalid pdev\n");
  1617			return -EINVAL;
  1618		}
  1619	
  1620		if ((interrupt_mode == 2 || !interrupt_mode)
  1621		    && msi_msix_capable(pdev, PCI_CAP_ID_MSIX)) {
  1622			int req_nvec = xdev->c2h_channel_max + xdev->h2c_channel_max +
  1623				       xdev->user_max;
  1624	
  1625			dbg_init("Enabling MSI-X\n");
  1626			rv = pci_alloc_irq_vectors(pdev, req_nvec, req_nvec, PCI_IRQ_MSIX);
  1627			if (rv < 0)
> 1628				dbg_init("Couldn't enable MSI-X mode: %d\n", rv);
  1629	
  1630			xdev->msix_enabled = 1;
  1631	
  1632		} else if ((interrupt_mode == 1 || !interrupt_mode)
  1633			    && msi_msix_capable(pdev, PCI_CAP_ID_MSI)) {
  1634			int req_nvec = xdev->user_max + 1;
  1635	
  1636			dbg_init("Enabling MSI\n");
  1637			rv = pci_alloc_irq_vectors(pdev, req_nvec, req_nvec, PCI_IRQ_MSI);
  1638			if (rv < 0)
  1639				dbg_init("Couldn't enable MSI mode: %d\n", rv);
  1640			xdev->msi_enabled = 1;
  1641	
  1642		} else {
  1643			dbg_init("MSI/MSI-X not detected\n");
  1644			rv = -EINVAL;
  1645		}
  1646	
  1647		return rv;
  1648	}
  1649	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux