All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: Re: [PATCH 2/2] dmabuf/heaps: implement DMA_BUF_IOCTL_RW_FILE for system_heap
Date: Wed, 14 May 2025 20:57:29 +0800	[thread overview]
Message-ID: <202505142015.sGmTug2W-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20250513092803.2096-1-tao.wangtao@honor.com>
References: <20250513092803.2096-1-tao.wangtao@honor.com>
TO: wangtao <tao.wangtao@honor.com>
TO: sumit.semwal@linaro.org
TO: christian.koenig@amd.com
TO: benjamin.gaignard@collabora.com
TO: Brian.Starkey@arm.com
TO: jstultz@google.com
TO: tjmercier@google.com
CC: linux-media@vger.kernel.org
CC: dri-devel@lists.freedesktop.org
CC: linaro-mm-sig@lists.linaro.org
CC: linux-kernel@vger.kernel.org
CC: bintian.wang@honor.com
CC: yipengxiang@honor.com
CC: liulu.liu@honor.com
CC: feng.han@honor.com
CC: wangtao <tao.wangtao@honor.com>

Hi wangtao,

kernel test robot noticed the following build warnings:

[auto build test WARNING on sailus-media-tree/master]
[also build test WARNING on linus/master sailus-media-tree/streams v6.15-rc6 next-20250514]
[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/wangtao/dmabuf-heaps-implement-DMA_BUF_IOCTL_RW_FILE-for-system_heap/20250513-173852
base:   git://linuxtv.org/sailus/media_tree.git master
patch link:    https://lore.kernel.org/r/20250513092803.2096-1-tao.wangtao%40honor.com
patch subject: [PATCH 2/2] dmabuf/heaps: implement DMA_BUF_IOCTL_RW_FILE for system_heap
:::::: branch date: 27 hours ago
:::::: commit date: 27 hours ago
config: loongarch-randconfig-r071-20250514 (https://download.01.org/0day-ci/archive/20250514/202505142015.sGmTug2W-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 14.2.0

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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202505142015.sGmTug2W-lkp@intel.com/

smatch warnings:
drivers/dma-buf/heaps/system_heap.c:376 system_heap_dma_buf_rw_file() warn: if statement not indented

vim +376 drivers/dma-buf/heaps/system_heap.c

817989ef7a0f10 wangtao 2025-05-13  363  
817989ef7a0f10 wangtao 2025-05-13  364  static int system_heap_dma_buf_rw_file(struct dma_buf *dmabuf,
817989ef7a0f10 wangtao 2025-05-13  365  			struct dma_buf_rw_file *back)
817989ef7a0f10 wangtao 2025-05-13  366  {
817989ef7a0f10 wangtao 2025-05-13  367  	struct system_heap_buffer *buffer = dmabuf->priv;
817989ef7a0f10 wangtao 2025-05-13  368  	int ret = 0;
817989ef7a0f10 wangtao 2025-05-13  369  	__u32 op = back->flags & DMA_BUF_RW_FLAGS_OP_MASK;
817989ef7a0f10 wangtao 2025-05-13  370  	bool direct_io = back->flags & DMA_BUF_RW_FLAGS_DIRECT;
817989ef7a0f10 wangtao 2025-05-13  371  	struct file *filp;
817989ef7a0f10 wangtao 2025-05-13  372  
817989ef7a0f10 wangtao 2025-05-13  373  	if (op != DMA_BUF_RW_FLAGS_READ && op != DMA_BUF_RW_FLAGS_WRITE)
817989ef7a0f10 wangtao 2025-05-13  374  		return -EINVAL;
817989ef7a0f10 wangtao 2025-05-13  375  	if (direct_io) {
817989ef7a0f10 wangtao 2025-05-13 @376  		if (!PAGE_ALIGNED(back->file_offset) ||
817989ef7a0f10 wangtao 2025-05-13  377  			!PAGE_ALIGNED(back->buf_offset) ||
817989ef7a0f10 wangtao 2025-05-13  378  			!PAGE_ALIGNED(back->buf_len))
817989ef7a0f10 wangtao 2025-05-13  379  		return -EINVAL;
817989ef7a0f10 wangtao 2025-05-13  380  	}
817989ef7a0f10 wangtao 2025-05-13  381  	if (!back->buf_len || back->buf_len > dmabuf->size ||
817989ef7a0f10 wangtao 2025-05-13  382  		back->buf_offset >= dmabuf->size ||
817989ef7a0f10 wangtao 2025-05-13  383  		back->buf_offset + back->buf_len > dmabuf->size)
817989ef7a0f10 wangtao 2025-05-13  384  		return -EINVAL;
817989ef7a0f10 wangtao 2025-05-13  385  	if (back->file_offset + back->buf_len < back->file_offset)
817989ef7a0f10 wangtao 2025-05-13  386  		return -EINVAL;
817989ef7a0f10 wangtao 2025-05-13  387  
817989ef7a0f10 wangtao 2025-05-13  388  	filp = fget(back->fd);
817989ef7a0f10 wangtao 2025-05-13  389  	if (!filp)
817989ef7a0f10 wangtao 2025-05-13  390  		return -EBADF;
817989ef7a0f10 wangtao 2025-05-13  391  
817989ef7a0f10 wangtao 2025-05-13  392  	mutex_lock(&buffer->lock);
817989ef7a0f10 wangtao 2025-05-13  393  	ret = system_heap_rw_file(buffer, op == DMA_BUF_RW_FLAGS_READ, direct_io,
817989ef7a0f10 wangtao 2025-05-13  394  			filp, back->file_offset, back->buf_offset, back->buf_len);
817989ef7a0f10 wangtao 2025-05-13  395  	mutex_unlock(&buffer->lock);
817989ef7a0f10 wangtao 2025-05-13  396  
817989ef7a0f10 wangtao 2025-05-13  397  	fput(filp);
817989ef7a0f10 wangtao 2025-05-13  398  	return ret;
817989ef7a0f10 wangtao 2025-05-13  399  }
817989ef7a0f10 wangtao 2025-05-13  400  

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

             reply	other threads:[~2025-05-14 12:58 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-14 12:57 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-05-13  9:28 [PATCH 2/2] dmabuf/heaps: implement DMA_BUF_IOCTL_RW_FILE for system_heap wangtao
2025-05-13 11:32 ` Christian König
2025-05-13 12:30   ` wangtao
2025-05-13 13:17     ` Christian König
2025-05-14 11:02       ` wangtao
2025-05-14 12:00         ` Christian König
2025-05-15 14:03           ` wangtao
2025-05-15 14:26             ` Christian König
2025-05-16  7:40               ` wangtao
2025-05-16  8:36                 ` Christian König
2025-05-16  9:49                   ` wangtao
2025-05-16 10:29                     ` Christian König
2025-05-19  4:08                       ` wangtao
2025-05-19  7:47                         ` Christian König
2025-05-16 18:37                   ` T.J. Mercier
2025-05-19  4:37                     ` wangtao
2025-05-19 12:03                     ` wangtao
2025-05-20  4:06                       ` wangtao
2025-05-21  2:00                         ` T.J. Mercier
2025-05-21  4:17                           ` wangtao
2025-05-21  7:35                             ` Christian König
2025-05-21 10:25                               ` wangtao
2025-05-21 11:56                                 ` Christian König
2025-05-22  8:02                                   ` wangtao
2025-05-22 11:57                                     ` Christian König
2025-05-22 12:29                                       ` wangtao
2025-05-27 14:35                                       ` wangtao
2025-05-27 15:10                                         ` Christian König

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=202505142015.sGmTug2W-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --cc=oe-kbuild@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.