All of lore.kernel.org
 help / color / mirror / Atom feed
* [chrome-os:chromeos-6.1 14/16] drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:279:5: warning: no previous declaration for 'amdgpu_try_dma_buf_mmap'
@ 2023-10-28  3:12 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-10-28  3:12 UTC (permalink / raw)
  To: cros-kernel-buildreports, Guenter Roeck; +Cc: oe-kbuild-all

tree:   https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-6.1
head:   959e2f8d1109f7df5a843350ca84db704cf0e012
commit: 43687fc30e87bae87e23591557473682303a6e65 [14/16] CHROMIUM: drm/amdgpu: Implement mmap of imported dma-bufs
config: x86_64-randconfig-016-20231028 (https://download.01.org/0day-ci/archive/20231028/202310281145.GmXcdzLi-lkp@intel.com/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231028/202310281145.GmXcdzLi-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/202310281145.GmXcdzLi-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:279:5: warning: no previous declaration for 'amdgpu_try_dma_buf_mmap' [-Wmissing-declarations]
    int amdgpu_try_dma_buf_mmap(struct file *filp, struct vm_area_struct *vma)
        ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c: In function 'amdgpu_try_dma_buf_mmap':
   drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:286:20: warning: variable 'bo' set but not used [-Wunused-but-set-variable]
     struct amdgpu_bo *bo = NULL;
                       ^~


vim +/amdgpu_try_dma_buf_mmap +279 drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c

   278	
 > 279	int amdgpu_try_dma_buf_mmap(struct file *filp, struct vm_area_struct *vma)
   280	{
   281		struct drm_file *priv = filp->private_data;
   282		struct drm_device *dev = priv->minor->dev;
   283		struct amdgpu_device *adev = drm_to_adev(dev);
   284		struct ttm_device *bdev = &adev->mman.bdev;
   285		struct ttm_buffer_object *tbo = NULL;
   286		struct amdgpu_bo *bo = NULL;
   287		struct drm_gem_object *obj = NULL;
   288		struct drm_vma_offset_node *node;
   289		int ret;
   290	
   291		if (drm_dev_is_unplugged(dev))
   292			return -ENODEV;
   293	
   294		drm_vma_offset_lock_lookup(bdev->vma_manager);
   295		node = drm_vma_offset_exact_lookup_locked(bdev->vma_manager,
   296							  vma->vm_pgoff,
   297							  vma_pages(vma));
   298	
   299		if (likely(node)) {
   300			tbo = container_of(node, struct ttm_buffer_object,
   301					   base.vma_node);
   302			tbo = ttm_bo_get_unless_zero(tbo);
   303		}
   304		drm_vma_offset_unlock_lookup(bdev->vma_manager);
   305	
   306		if (!tbo)
   307			return -EINVAL;
   308	
   309		bo = ttm_to_amdgpu_bo(tbo);
   310		obj = &tbo->base;
   311	
   312		if (!obj->import_attach) {
   313			ret = -EINVAL;
   314			goto done;
   315		}
   316	
   317		ret = dma_buf_mmap(obj->import_attach->dmabuf, vma, 0);
   318	
   319	done:
   320		ttm_bo_put(tbo);
   321		return ret;
   322	}
   323	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-10-28  3:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-28  3:12 [chrome-os:chromeos-6.1 14/16] drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c:279:5: warning: no previous declaration for 'amdgpu_try_dma_buf_mmap' kernel test robot

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.