Linux IIO development
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Paul Cercueil" <paul@crapouillou.net>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"Christian König" <christian.koenig@amd.com>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Vinod Koul" <vkoul@kernel.org>,
	"Sumit Semwal" <sumit.semwal@linaro.org>
Cc: oe-kbuild-all@lists.linux.dev, Nuno Sa <nuno.sa@analog.com>,
	Michael Hennerich <michael.hennerich@analog.com>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	dmaengine@vger.kernel.org, linux-iio@vger.kernel.org,
	linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linaro-mm-sig@lists.linaro.org,
	Paul Cercueil <paul@crapouillou.net>
Subject: Re: [PATCH v8 3/6] iio: core: Add new DMABUF interface infrastructure
Date: Sun, 10 Mar 2024 15:19:56 +0800	[thread overview]
Message-ID: <202403101535.uRqo6AIt-lkp@intel.com> (raw)
In-Reply-To: <20240308170046.92899-4-paul@crapouillou.net>

Hi Paul,

kernel test robot noticed the following build warnings:

[auto build test WARNING on jic23-iio/togreg]
[also build test WARNING on vkoul-dmaengine/next lwn/docs-next linus/master v6.8-rc7 next-20240308]
[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/Paul-Cercueil/dmaengine-Add-API-function-dmaengine_prep_peripheral_dma_vec/20240309-010421
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link:    https://lore.kernel.org/r/20240308170046.92899-4-paul%40crapouillou.net
patch subject: [PATCH v8 3/6] iio: core: Add new DMABUF interface infrastructure
config: i386-randconfig-062-20240309 (https://download.01.org/0day-ci/archive/20240310/202403101535.uRqo6AIt-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240310/202403101535.uRqo6AIt-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202403101535.uRqo6AIt-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/iio/industrialio-buffer.c:1765:40: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const [noderef] __user *from @@     got int *user_req @@
   drivers/iio/industrialio-buffer.c:1765:40: sparse:     expected void const [noderef] __user *from
   drivers/iio/industrialio-buffer.c:1765:40: sparse:     got int *user_req
>> drivers/iio/industrialio-buffer.c:1988:53: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected int *user_req @@     got void [noderef] __user *_arg @@
   drivers/iio/industrialio-buffer.c:1988:53: sparse:     expected int *user_req
   drivers/iio/industrialio-buffer.c:1988:53: sparse:     got void [noderef] __user *_arg
   drivers/iio/industrialio-buffer.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/xarray.h, ...):
   include/linux/page-flags.h:242:46: sparse: sparse: self-comparison always evaluates to false

vim +1765 drivers/iio/industrialio-buffer.c

  1755	
  1756	static int iio_buffer_detach_dmabuf(struct iio_dev_buffer_pair *ib,
  1757					    int *user_req, bool nonblock)
  1758	{
  1759		struct iio_buffer *buffer = ib->buffer;
  1760		struct iio_dev *indio_dev = ib->indio_dev;
  1761		struct iio_dmabuf_priv *priv;
  1762		struct dma_buf *dmabuf;
  1763		int dmabuf_fd, ret = -EPERM;
  1764	
> 1765		if (copy_from_user(&dmabuf_fd, user_req, sizeof(dmabuf_fd)))
  1766			return -EFAULT;
  1767	
  1768		dmabuf = dma_buf_get(dmabuf_fd);
  1769		if (IS_ERR(dmabuf))
  1770			return PTR_ERR(dmabuf);
  1771	
  1772		mutex_lock(&buffer->dmabufs_mutex);
  1773	
  1774		list_for_each_entry(priv, &buffer->dmabufs, entry) {
  1775			if (priv->attach->dev == indio_dev->dev.parent
  1776			    && priv->attach->dmabuf == dmabuf) {
  1777				list_del(&priv->entry);
  1778	
  1779				/* Unref the reference from iio_buffer_attach_dmabuf() */
  1780				iio_buffer_dmabuf_put(priv->attach);
  1781				ret = 0;
  1782				break;
  1783			}
  1784		}
  1785	
  1786		mutex_unlock(&buffer->dmabufs_mutex);
  1787		dma_buf_put(dmabuf);
  1788	
  1789		return ret;
  1790	}
  1791	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  parent reply	other threads:[~2024-03-10  7:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-08 17:00 [PATCH v8 0/6] iio: new DMABUF based API Paul Cercueil
2024-03-08 17:00 ` [PATCH v8 1/6] dmaengine: Add API function dmaengine_prep_peripheral_dma_vec() Paul Cercueil
2024-03-08 17:00 ` [PATCH v8 2/6] dmaengine: dma-axi-dmac: Implement device_prep_peripheral_dma_vec Paul Cercueil
2024-03-08 17:00 ` [PATCH v8 3/6] iio: core: Add new DMABUF interface infrastructure Paul Cercueil
2024-03-10  0:55   ` kernel test robot
2024-03-10  7:19   ` kernel test robot [this message]
2024-03-10 11:30   ` kernel test robot
2024-03-08 17:00 ` [PATCH v8 4/6] iio: buffer-dma: Enable support for DMABUFs Paul Cercueil
2024-03-08 17:00 ` [PATCH v8 5/6] iio: buffer-dmaengine: Support new DMABUF based userspace API Paul Cercueil
2024-03-08 17:00 ` [PATCH v8 6/6] Documentation: iio: Document high-speed DMABUF based API Paul Cercueil
2024-03-10 12:41 ` [PATCH v8 0/6] iio: new " Jonathan Cameron

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=202403101535.uRqo6AIt-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=christian.koenig@amd.com \
    --cc=corbet@lwn.net \
    --cc=dmaengine@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=michael.hennerich@analog.com \
    --cc=nuno.sa@analog.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=paul@crapouillou.net \
    --cc=sumit.semwal@linaro.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