linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Alan Mikhak <alan.mikhak@sifive.com>,
	dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-pci@vger.kernel.org, gustavo.pimentel@synopsys.com,
	dan.j.williams@intel.com, vkoul@kernel.org, kishon@ti.com,
	maz@kernel.org, paul.walmsley@sifive.com
Cc: kbuild-all@lists.01.org
Subject: Re: [PATCH] dmaengine: dw-edma: Check MSI descriptor before copying
Date: Thu, 23 Apr 2020 05:01:26 +0800	[thread overview]
Message-ID: <202004230414.fAAMwEeF%lkp@intel.com> (raw)
In-Reply-To: <1587406568-26592-1-git-send-email-alan.mikhak@sifive.com>

[-- Attachment #1: Type: text/plain, Size: 4099 bytes --]

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@intel.com>

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@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 39792 bytes --]

  reply	other threads:[~2020-04-22 21:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-20 18:16 [PATCH] dmaengine: dw-edma: Check MSI descriptor before copying Alan Mikhak
2020-04-22 21:01 ` kbuild test robot [this message]
2020-04-22 22:38 ` kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202004230414.fAAMwEeF%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alan.mikhak@sifive.com \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=gustavo.pimentel@synopsys.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=paul.walmsley@sifive.com \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).