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

From: kbuild test robot
Date: Wed Apr 22 2020 - 18:40:30 EST


Hi Alan,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on slave-dma/next]
[also build test ERROR 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: s390-allmodconfig (attached as .config)
compiler: s390-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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=s390

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

All errors (new ones prefixed by >>):

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]
793 | if (irq_get_msi_desc(irq))
| ^~~~~~~~~~~~~~~~
| irq_to_desc
cc1: some warnings being treated as errors

vim +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