mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Vinod Koul <vkoul@kernel.org>, dmaengine@vger.kernel.org
Cc: kbuild-all@lists.01.org, Vinod Koul <vkoul@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] dmaengine: qcom: Add GPI dma driver
Date: Mon, 24 Aug 2020 22:13:00 +0800	[thread overview]
Message-ID: <202008242230.jQKKG5r8%lkp@intel.com> (raw)
In-Reply-To: <20200824084712.2526079-4-vkoul@kernel.org>

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

Hi Vinod,

I love your patch! Perhaps something to improve:

[auto build test WARNING on vkoul-dmaengine/next]
[also build test WARNING on v5.9-rc2 next-20200824]
[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]

url:    https://github.com/0day-ci/linux/commits/Vinod-Koul/dmaengine-Add-support-for-Qcom-GSI-dma-controller/20200824-174027
base:   https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git next
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.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
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/dma/qcom/gpi.c:7: warning: "DEBUG" redefined
       7 | #define DEBUG
         | 
   <command-line>: note: this is the location of the previous definition
   drivers/dma/qcom/gpi.c: In function 'gpi_process_imed_data_event':
   drivers/dma/qcom/gpi.c:1048:2: error: implicit declaration of function 'kfree'; did you mean 'vfree'? [-Werror=implicit-function-declaration]
    1048 |  kfree(gpi_desc);
         |  ^~~~~
         |  vfree
   In file included from include/linux/printk.h:405,
                    from include/linux/kernel.h:15,
                    from include/asm-generic/bug.h:20,
                    from arch/arm/include/asm/bug.h:60,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:12,
                    from include/asm-generic/current.h:5,
                    from ./arch/arm/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/ratelimit.h:6,
                    from include/linux/dev_printk.h:16,
                    from include/linux/device.h:15,
                    from include/linux/dma-mapping.h:7,
                    from drivers/dma/qcom/gpi.c:10:
   drivers/dma/qcom/gpi.c: In function 'gpi_alloc_ring':
>> drivers/dma/qcom/gpi.c:1450:3: warning: format '%lu' expects argument of type 'long unsigned int', but argument 8 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
    1450 |   "#el:%u el_size:%u len:%u actual_len:%llu alloc_size:%lu\n",
         |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:125:15: note: in definition of macro '__dynamic_func_call'
     125 |   func(&id, ##__VA_ARGS__);  \
         |               ^~~~~~~~~~~
   include/linux/dynamic_debug.h:157:2: note: in expansion of macro '_dynamic_func_call'
     157 |  _dynamic_func_call(fmt,__dynamic_dev_dbg,   \
         |  ^~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:115:2: note: in expansion of macro 'dynamic_dev_dbg'
     115 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |  ^~~~~~~~~~~~~~~
   include/linux/dev_printk.h:115:23: note: in expansion of macro 'dev_fmt'
     115 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                       ^~~~~~~
   drivers/dma/qcom/gpi.c:1449:2: note: in expansion of macro 'dev_dbg'
    1449 |  dev_dbg(gpii->gpi_dev->dev,
         |  ^~~~~~~
   drivers/dma/qcom/gpi.c:1450:58: note: format string is defined here
    1450 |   "#el:%u el_size:%u len:%u actual_len:%llu alloc_size:%lu\n",
         |                                                        ~~^
         |                                                          |
         |                                                          long unsigned int
         |                                                        %u
   In file included from include/linux/device.h:15,
                    from include/linux/dma-mapping.h:7,
                    from drivers/dma/qcom/gpi.c:10:
   drivers/dma/qcom/gpi.c:1458:31: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
    1458 |   dev_err(gpii->gpi_dev->dev, "could not alloc size:%lu mem for ring\n",
         |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:19:22: note: in definition of macro 'dev_fmt'
      19 | #define dev_fmt(fmt) fmt
         |                      ^~~
   drivers/dma/qcom/gpi.c:1458:3: note: in expansion of macro 'dev_err'
    1458 |   dev_err(gpii->gpi_dev->dev, "could not alloc size:%lu mem for ring\n",
         |   ^~~~~~~
   drivers/dma/qcom/gpi.c:1458:55: note: format string is defined here
    1458 |   dev_err(gpii->gpi_dev->dev, "could not alloc size:%lu mem for ring\n",
         |                                                     ~~^
         |                                                       |
         |                                                       long unsigned int
         |                                                     %u
   In file included from include/linux/printk.h:405,
                    from include/linux/kernel.h:15,
                    from include/asm-generic/bug.h:20,
                    from arch/arm/include/asm/bug.h:60,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:12,
                    from include/asm-generic/current.h:5,
                    from ./arch/arm/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/ratelimit.h:6,
                    from include/linux/dev_printk.h:16,
                    from include/linux/device.h:15,
                    from include/linux/dma-mapping.h:7,
                    from drivers/dma/qcom/gpi.c:10:
>> drivers/dma/qcom/gpi.c:1478:3: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'dma_addr_t' {aka 'unsigned int'} [-Wformat=]
    1478 |   "phy_pre:0x%0llx phy_alig:0x%0llx len:%u el_size:%u elements:%u\n",
         |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:125:15: note: in definition of macro '__dynamic_func_call'
     125 |   func(&id, ##__VA_ARGS__);  \
         |               ^~~~~~~~~~~
   include/linux/dynamic_debug.h:157:2: note: in expansion of macro '_dynamic_func_call'
     157 |  _dynamic_func_call(fmt,__dynamic_dev_dbg,   \
         |  ^~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:115:2: note: in expansion of macro 'dynamic_dev_dbg'
     115 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |  ^~~~~~~~~~~~~~~
   include/linux/dev_printk.h:115:23: note: in expansion of macro 'dev_fmt'
     115 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                       ^~~~~~~
   drivers/dma/qcom/gpi.c:1477:2: note: in expansion of macro 'dev_dbg'
    1477 |  dev_dbg(gpii->gpi_dev->dev,
         |  ^~~~~~~
   drivers/dma/qcom/gpi.c:1478:18: note: format string is defined here
    1478 |   "phy_pre:0x%0llx phy_alig:0x%0llx len:%u el_size:%u elements:%u\n",
         |              ~~~~^
         |                  |
         |                  long long unsigned int
         |              %0x
   In file included from include/linux/printk.h:405,
                    from include/linux/kernel.h:15,
                    from include/asm-generic/bug.h:20,
                    from arch/arm/include/asm/bug.h:60,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:12,
                    from include/asm-generic/current.h:5,
                    from ./arch/arm/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/ratelimit.h:6,
                    from include/linux/dev_printk.h:16,
                    from include/linux/device.h:15,
                    from include/linux/dma-mapping.h:7,
                    from drivers/dma/qcom/gpi.c:10:
>> drivers/dma/qcom/gpi.c:1478:3: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 5 has type 'phys_addr_t' {aka 'unsigned int'} [-Wformat=]
    1478 |   "phy_pre:0x%0llx phy_alig:0x%0llx len:%u el_size:%u elements:%u\n",
         |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/dynamic_debug.h:125:15: note: in definition of macro '__dynamic_func_call'
     125 |   func(&id, ##__VA_ARGS__);  \
         |               ^~~~~~~~~~~
   include/linux/dynamic_debug.h:157:2: note: in expansion of macro '_dynamic_func_call'
     157 |  _dynamic_func_call(fmt,__dynamic_dev_dbg,   \
         |  ^~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:115:2: note: in expansion of macro 'dynamic_dev_dbg'
     115 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |  ^~~~~~~~~~~~~~~
   include/linux/dev_printk.h:115:23: note: in expansion of macro 'dev_fmt'
     115 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                       ^~~~~~~
   drivers/dma/qcom/gpi.c:1477:2: note: in expansion of macro 'dev_dbg'
    1477 |  dev_dbg(gpii->gpi_dev->dev,
         |  ^~~~~~~
   drivers/dma/qcom/gpi.c:1478:35: note: format string is defined here
    1478 |   "phy_pre:0x%0llx phy_alig:0x%0llx len:%u el_size:%u elements:%u\n",
         |                               ~~~~^
         |                                   |
         |                                   long long unsigned int
         |                               %0x
   drivers/dma/qcom/gpi.c: In function 'gpi_prep_slave_sg':
   drivers/dma/qcom/gpi.c:1772:13: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'? [-Werror=implicit-function-declaration]
    1772 |  gpi_desc = kzalloc(sizeof(*gpi_desc), GFP_NOWAIT);
         |             ^~~~~~~
         |             vzalloc
   drivers/dma/qcom/gpi.c:1772:11: warning: assignment to 'struct gpi_desc *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    1772 |  gpi_desc = kzalloc(sizeof(*gpi_desc), GFP_NOWAIT);
         |           ^
   cc1: some warnings being treated as errors

# https://github.com/0day-ci/linux/commit/25062cc46a95e9de91752963ea85b934fe7acfa1
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Vinod-Koul/dmaengine-Add-support-for-Qcom-GSI-dma-controller/20200824-174027
git checkout 25062cc46a95e9de91752963ea85b934fe7acfa1
vim +1450 drivers/dma/qcom/gpi.c

  1435	
  1436	/* allocate memory for transfer and event rings */
  1437	static int gpi_alloc_ring(struct gpi_ring *ring, u32 elements,
  1438				  u32 el_size, struct gpii *gpii)
  1439	{
  1440		u64 len = elements * el_size;
  1441		int bit;
  1442	
  1443		/* ring len must be power of 2 */
  1444		bit = find_last_bit((unsigned long *)&len, 32);
  1445		if (((1 << bit) - 1) & len)
  1446			bit++;
  1447		len = 1 << bit;
  1448		ring->alloc_size = (len + (len - 1));
  1449		dev_dbg(gpii->gpi_dev->dev,
> 1450			"#el:%u el_size:%u len:%u actual_len:%llu alloc_size:%lu\n",
  1451			  elements, el_size, (elements * el_size), len,
  1452			  ring->alloc_size);
  1453	
  1454		ring->pre_aligned = dma_alloc_coherent(gpii->gpi_dev->dev,
  1455						       ring->alloc_size,
  1456						       &ring->dma_handle, GFP_KERNEL);
  1457		if (!ring->pre_aligned) {
  1458			dev_err(gpii->gpi_dev->dev, "could not alloc size:%lu mem for ring\n",
  1459				ring->alloc_size);
  1460			return -ENOMEM;
  1461		}
  1462	
  1463		/* align the physical mem */
  1464		ring->phys_addr = (ring->dma_handle + (len - 1)) & ~(len - 1);
  1465		ring->base = ring->pre_aligned + (ring->phys_addr - ring->dma_handle);
  1466		ring->rp = ring->base;
  1467		ring->wp = ring->base;
  1468		ring->len = len;
  1469		ring->el_size = el_size;
  1470		ring->elements = ring->len / ring->el_size;
  1471		memset(ring->base, 0, ring->len);
  1472		ring->configured = true;
  1473	
  1474		/* update to other cores */
  1475		smp_wmb();
  1476	
  1477		dev_dbg(gpii->gpi_dev->dev,
> 1478			"phy_pre:0x%0llx phy_alig:0x%0llx len:%u el_size:%u elements:%u\n",
  1479			ring->dma_handle, ring->phys_addr, ring->len,
  1480			ring->el_size, ring->elements);
  1481	
  1482		return 0;
  1483	}
  1484	

---
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: 76228 bytes --]

      parent reply	other threads:[~2020-08-24 14:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200824084712.2526079-1-vkoul@kernel.org>
2020-08-24  8:47 ` [PATCH 1/3] dt-bindings: dmaengine: Document qcom,gpi dma binding Vinod Koul
2020-08-24 17:40   ` Rob Herring
2020-08-25 14:51     ` Vinod Koul
2020-08-26  6:32       ` Vinod Koul
2020-08-26 14:35         ` Rob Herring
2020-08-27  4:50           ` Vinod Koul
2020-08-27 14:04             ` Rob Herring
2020-08-24  8:47 ` [RFC PATCH 2/3] dmaengine: add peripheral configuration Vinod Koul
2020-08-25  6:52   ` Peter Ujfalusi
2020-08-25  7:10     ` Vinod Koul
2020-08-25  8:00       ` Peter Ujfalusi
2020-08-25 11:02         ` Vinod Koul
2020-08-26  7:07           ` Peter Ujfalusi
2020-08-24  8:47 ` [PATCH 3/3] dmaengine: qcom: Add GPI dma driver Vinod Koul
2020-08-24 14:04   ` kernel test robot
2020-08-24 14:13   ` kernel test robot [this message]

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=202008242230.jQKKG5r8%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --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

all inboxes | Powered by JetHome®