Re: [PTACH v3] drm/ast: add dmabuf/prime buffer sharing support

From: kernel test robot
Date: Sun Aug 28 2022 - 23:32:25 EST


Hi oushixiong,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on drm-misc/drm-misc-next]
[also build test WARNING on drm/drm-next drm-intel/for-linux-next drm-tip/drm-tip linus/master v6.0-rc3 next-20220826]
[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/oushixiong/drm-ast-add-dmabuf-prime-buffer-sharing-support/20220829-084713
base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
config: i386-randconfig-a013 (https://download.01.org/0day-ci/archive/20220829/202208291132.RQqpjzO1-lkp@xxxxxxxxx/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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
# https://github.com/intel-lab-lkp/linux/commit/da31884b8b7e33af5cd8aa750dea30fde59d52aa
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review oushixiong/drm-ast-add-dmabuf-prime-buffer-sharing-support/20220829-084713
git checkout da31884b8b7e33af5cd8aa750dea30fde59d52aa
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/gpu/drm/ast/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

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


vim +/ast_gem_prime_import +54 drivers/gpu/drm/ast/ast_drv.c

53
> 54 struct drm_gem_object *ast_gem_prime_import(struct drm_device *dev,
55 struct dma_buf *dma_buf)
56 {
57 struct drm_gem_vram_object *gbo;
58
59 gbo = drm_gem_vram_of_gem(dma_buf->priv);
60 if (gbo->bo.base.dev == dev) {
61 /*
62 * Importing dmabuf exported from out own gem increases
63 * refcount on gem itself instead of f_count of dmabuf.
64 */
65 drm_gem_object_get(&gbo->bo.base);
66 return &gbo->bo.base;
67 }
68
69 gbo = drm_gem_vram_create(dev, dma_buf->size, 0);
70 if (IS_ERR(gbo))
71 return NULL;
72
73 get_dma_buf(dma_buf);
74 return &gbo->bo.base;
75 }
76

--
0-DAY CI Kernel Test Service
https://01.org/lkp