Hi,

kernel test robot noticed the following build warnings:

[auto build test WARNING on jic23-iio/togreg]
[also build test WARNING on char-misc/char-misc-testing 
char-misc/char-misc-next char-misc/char-misc-linus usb/usb-testing usb/usb-next 
usb/usb-linus xen-tip/linux-next linus/master v6.15-rc4]
[cannot apply to tegra/for-next drm-xe/drm-xe-next rmk-arm/drm-armada-devel 
rmk-arm/drm-armada-fixes next-20250430]
[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/oushixiong1025-163-com/drm-prime-Support-importing-DMA-BUF-without-sg_table/20250430-170136
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link:    
https://lore.kernel.org/r/20250430085658.540746-2-oushixiong1025%40163.com
patch subject: [PATCH 2/3] drm/prime: Support importing DMA-BUF without sg_table
config: arm64-randconfig-003-20250501 
(https://download.01.org/0day-ci/archive/20250501/202505011655.qtmh4ua7-...@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project 
f819f46284f2a79790038e1f6649172789734ae8)
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20250501/202505011655.qtmh4ua7-...@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 <l...@intel.com>
| Closes: 
https://lore.kernel.org/oe-kbuild-all/202505011655.qtmh4ua7-...@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/drm_prime.c:925:24: warning: no previous prototype for 
>> function 'drm_gem_prime_import_dev_skip_map' [-Wmissing-prototypes]
     925 | struct drm_gem_object *drm_gem_prime_import_dev_skip_map(struct 
drm_device *dev,
         |                        ^
   drivers/gpu/drm/drm_prime.c:925:1: note: declare 'static' if the function is 
not intended to be used outside of this translation unit
     925 | struct drm_gem_object *drm_gem_prime_import_dev_skip_map(struct 
drm_device *dev,
         | ^
         | static 
   1 warning generated.


vim +/drm_gem_prime_import_dev_skip_map +925 drivers/gpu/drm/drm_prime.c

   913  
   914  /**
   915   * drm_gem_prime_import_dev_skip_map - core implementation of the 
import callback
   916   * @dev: drm_device to import into
   917   * @dma_buf: dma-buf object to import
   918   * @attach_dev: struct device to dma_buf attach
   919   *
   920   * This function exports a dma-buf without get it's scatter/gather 
table.
   921   *
   922   * Drivers who need to get an scatter/gather table for objects need to 
call
   923   * drm_gem_prime_import_dev() instead.
   924   */
 > 925  struct drm_gem_object *drm_gem_prime_import_dev_skip_map(struct 
 > drm_device *dev,
   926                                                           struct dma_buf 
*dma_buf,
   927                                                           struct device 
*attach_dev)
   928  {
   929          struct dma_buf_attachment *attach;
   930          struct drm_gem_object *obj;
   931          int ret;
   932  
   933          if (dma_buf->ops == &drm_gem_prime_dmabuf_ops) {
   934                  obj = dma_buf->priv;
   935                  if (obj->dev == dev) {
   936                          /*
   937                           * Importing dmabuf exported from our own gem 
increases
   938                           * refcount on gem itself instead of f_count of 
dmabuf.
   939                           */
   940                          drm_gem_object_get(obj);
   941                          return obj;
   942                  }
   943          }
   944  
   945          attach = dma_buf_attach(dma_buf, attach_dev, true);
   946          if (IS_ERR(attach))
   947                  return ERR_CAST(attach);
   948  
   949          get_dma_buf(dma_buf);
   950  
   951          obj = dev->driver->gem_prime_import_attachment(dev, attach);
   952          if (IS_ERR(obj)) {
   953                  ret = PTR_ERR(obj);
   954                  goto fail_detach;
   955          }
   956  
   957          obj->import_attach = attach;
   958          obj->resv = dma_buf->resv;
   959  
   960          return obj;
   961  
   962  fail_detach:
   963          dma_buf_detach(dma_buf, attach);
   964          dma_buf_put(dma_buf);
   965  
   966          return ERR_PTR(ret);
   967  }
   968  EXPORT_SYMBOL(drm_gem_prime_import_dev_skip_map);
   969  

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

Reply via email to