Re: [PATCH] dmaengine: dw-edma: Check MSI descriptor before copying

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

 



Hi Alan,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on slave-dma/next]
[also build test WARNING on next-20200421]
[cannot apply to linus/master linux/master v5.7-rc2]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Alan-Mikhak/dmaengine-dw-edma-Check-MSI-descriptor-before-copying/20200422-131121
base:   https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/slave-dma.git next
config: x86_64-randconfig-f003-20200422 (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

   In file included from include/linux/export.h:43:0,
                    from include/linux/linkage.h:7,
                    from include/linux/kernel.h:8,
                    from include/linux/list.h:9,
                    from include/linux/module.h:12,
                    from drivers/dma/dw-edma/dw-edma-core.c:9:
   drivers/dma/dw-edma/dw-edma-core.c: In function 'dw_edma_irq_request':
   drivers/dma/dw-edma/dw-edma-core.c:793:7: error: implicit declaration of function 'irq_get_msi_desc'; did you mean 'irq_to_desc'? [-Werror=implicit-function-declaration]
      if (irq_get_msi_desc(irq))
          ^
   include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
    #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                       ^~~~
>> drivers/dma/dw-edma/dw-edma-core.c:793:3: note: in expansion of macro 'if'
      if (irq_get_msi_desc(irq))
      ^~
   cc1: some warnings being treated as errors

vim +/if +793 drivers/dma/dw-edma/dw-edma-core.c

   766	
   767	static int dw_edma_irq_request(struct dw_edma_chip *chip,
   768				       u32 *wr_alloc, u32 *rd_alloc)
   769	{
   770		struct device *dev = chip->dev;
   771		struct dw_edma *dw = chip->dw;
   772		u32 wr_mask = 1;
   773		u32 rd_mask = 1;
   774		int i, err = 0;
   775		u32 ch_cnt;
   776		int irq;
   777	
   778		ch_cnt = dw->wr_ch_cnt + dw->rd_ch_cnt;
   779	
   780		if (dw->nr_irqs < 1)
   781			return -EINVAL;
   782	
   783		if (dw->nr_irqs == 1) {
   784			/* Common IRQ shared among all channels */
   785			irq = dw->ops->irq_vector(dev, 0);
   786			err = request_irq(irq, dw_edma_interrupt_common,
   787					  IRQF_SHARED, dw->name, &dw->irq[0]);
   788			if (err) {
   789				dw->nr_irqs = 0;
   790				return err;
   791			}
   792	
 > 793			if (irq_get_msi_desc(irq))
   794				get_cached_msi_msg(irq, &dw->irq[0].msi);
   795		} else {
   796			/* Distribute IRQs equally among all channels */
   797			int tmp = dw->nr_irqs;
   798	
   799			while (tmp && (*wr_alloc + *rd_alloc) < ch_cnt) {
   800				dw_edma_dec_irq_alloc(&tmp, wr_alloc, dw->wr_ch_cnt);
   801				dw_edma_dec_irq_alloc(&tmp, rd_alloc, dw->rd_ch_cnt);
   802			}
   803	
   804			dw_edma_add_irq_mask(&wr_mask, *wr_alloc, dw->wr_ch_cnt);
   805			dw_edma_add_irq_mask(&rd_mask, *rd_alloc, dw->rd_ch_cnt);
   806	
   807			for (i = 0; i < (*wr_alloc + *rd_alloc); i++) {
   808				irq = dw->ops->irq_vector(dev, i);
   809				err = request_irq(irq,
   810						  i < *wr_alloc ?
   811							dw_edma_interrupt_write :
   812							dw_edma_interrupt_read,
   813						  IRQF_SHARED, dw->name,
   814						  &dw->irq[i]);
   815				if (err) {
   816					dw->nr_irqs = i;
   817					return err;
   818				}
   819	
   820				if (irq_get_msi_desc(irq))
   821					get_cached_msi_msg(irq, &dw->irq[i].msi);
   822			}
   823	
   824			dw->nr_irqs = i;
   825		}
   826	
   827		return err;
   828	}
   829	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux