Hi Thomas,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.10-rc3]
[cannot apply to next-20201113]
[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]
url:
https://github.com/0day-ci/linux/commits/Thomas-Zimmermann/drm-Build-fixe...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
f8394f232b1eab649ce2df5c5f15b0e528c92091
config: arm64-randconfig-r006-20201113 (attached as .config)
compiler: clang version 12.0.0 (
https://github.com/llvm/llvm-project
9a85643cd357e412cff69067bb5c4840e228c2ab)
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
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
#
https://github.com/0day-ci/linux/commit/1e81f225d3ffc9e951faab8deb96ef620...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Thomas-Zimmermann/drm-Build-fixes-for-msm-and-mediatek/20201109-183736
git checkout 1e81f225d3ffc9e951faab8deb96ef6209db7742
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/gpu/drm/mediatek/mtk_drm_crtc.c:23:
> drivers/gpu/drm/mediatek/mtk_drm_gem.h:48:63: warning:
declaration of 'struct dma_buf_map' will not be visible outside of this function
[-Wvisibility]
int mtk_drm_gem_prime_vmap(struct drm_gem_object *obj, struct
dma_buf_map *map);
^
drivers/gpu/drm/mediatek/mtk_drm_gem.h:49:66: warning: declaration of 'struct
dma_buf_map' will not be visible outside of this function [-Wvisibility]
void mtk_drm_gem_prime_vunmap(struct drm_gem_object *obj, struct dma_buf_map *map);
^
2 warnings generated.
--
In file included from drivers/gpu/drm/mediatek/mtk_drm_drv.c:32:
> drivers/gpu/drm/mediatek/mtk_drm_gem.h:48:63: warning:
declaration of 'struct dma_buf_map' will not be visible outside of this function
[-Wvisibility]
int mtk_drm_gem_prime_vmap(struct drm_gem_object *obj, struct
dma_buf_map *map);
^
drivers/gpu/drm/mediatek/mtk_drm_gem.h:49:66: warning: declaration of 'struct
dma_buf_map' will not be visible outside of this function [-Wvisibility]
void mtk_drm_gem_prime_vunmap(struct drm_gem_object *obj, struct dma_buf_map *map);
^
drivers/gpu/drm/mediatek/mtk_drm_drv.c:316:24: warning: no previous prototype for
function 'mtk_drm_gem_prime_import' [-Wmissing-prototypes]
struct drm_gem_object *mtk_drm_gem_prime_import(struct drm_device *dev,
^
drivers/gpu/drm/mediatek/mtk_drm_drv.c:316:1: note: declare 'static' if the
function is not intended to be used outside of this translation unit
struct drm_gem_object *mtk_drm_gem_prime_import(struct drm_device *dev,
^
static
drivers/gpu/drm/mediatek/mtk_drm_drv.c:337:20: error: incompatible function pointer
types initializing 'void *(*)(struct drm_gem_object *)' with an expression of type
'int (struct drm_gem_object *, struct dma_buf_map *)'
[-Werror,-Wincompatible-function-pointer-types]
.gem_prime_vmap = mtk_drm_gem_prime_vmap,
^~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/mediatek/mtk_drm_drv.c:338:22: error: incompatible function pointer
types initializing 'void (*)(struct drm_gem_object *, void *)' with an expression
of type 'void (struct drm_gem_object *, struct dma_buf_map *)'
[-Werror,-Wincompatible-function-pointer-types]
.gem_prime_vunmap = mtk_drm_gem_prime_vunmap,
^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/mediatek/mtk_drm_drv.c:500:15: warning: cast to smaller integer type
'enum mtk_ddp_comp_type' from 'const void *'
[-Wvoid-pointer-to-enum-cast]
comp_type = (enum mtk_ddp_comp_type)of_id->data;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4 warnings and 2 errors generated.
--
In file included from drivers/gpu/drm/mediatek/mtk_drm_gem.c:14:
> drivers/gpu/drm/mediatek/mtk_drm_gem.h:48:63: warning:
declaration of 'struct dma_buf_map' will not be visible outside of this function
[-Wvisibility]
int mtk_drm_gem_prime_vmap(struct drm_gem_object *obj, struct
dma_buf_map *map);
^
drivers/gpu/drm/mediatek/mtk_drm_gem.h:49:66: warning: declaration of 'struct
dma_buf_map' will not be visible outside of this function [-Wvisibility]
void mtk_drm_gem_prime_vunmap(struct drm_gem_object *obj, struct dma_buf_map *map);
^
drivers/gpu/drm/mediatek/mtk_drm_gem.c:232:63: warning: declaration of 'struct
dma_buf_map' will not be visible outside of this function [-Wvisibility]
int mtk_drm_gem_prime_vmap(struct drm_gem_object *obj, struct dma_buf_map *map)
^
drivers/gpu/drm/mediatek/mtk_drm_gem.c:232:5: error: conflicting types for
'mtk_drm_gem_prime_vmap'
int mtk_drm_gem_prime_vmap(struct drm_gem_object *obj, struct dma_buf_map *map)
^
drivers/gpu/drm/mediatek/mtk_drm_gem.h:48:5: note: previous declaration is here
int mtk_drm_gem_prime_vmap(struct drm_gem_object *obj, struct dma_buf_map *map);
^
drivers/gpu/drm/mediatek/mtk_drm_gem.c:259:2: error: implicit declaration of function
'dma_buf_map_set_vaddr' [-Werror,-Wimplicit-function-declaration]
dma_buf_map_set_vaddr(map, mtk_gem->kvaddr);
^
drivers/gpu/drm/mediatek/mtk_drm_gem.c:264:66: warning: declaration of 'struct
dma_buf_map' will not be visible outside of this function [-Wvisibility]
void mtk_drm_gem_prime_vunmap(struct drm_gem_object *obj, struct dma_buf_map *map)
^
drivers/gpu/drm/mediatek/mtk_drm_gem.c:264:6: error: conflicting types for
'mtk_drm_gem_prime_vunmap'
void mtk_drm_gem_prime_vunmap(struct drm_gem_object *obj, struct dma_buf_map *map)
^
drivers/gpu/drm/mediatek/mtk_drm_gem.h:49:6: note: previous declaration is here
void mtk_drm_gem_prime_vunmap(struct drm_gem_object *obj, struct dma_buf_map *map);
^
drivers/gpu/drm/mediatek/mtk_drm_gem.c:267:19: error: incomplete definition of type
'struct dma_buf_map'
void *vaddr = map->vaddr;
~~~^
drivers/gpu/drm/mediatek/mtk_drm_gem.c:264:66: note: forward declaration of 'struct
dma_buf_map'
void mtk_drm_gem_prime_vunmap(struct drm_gem_object *obj, struct dma_buf_map *map)
^
4 warnings and 4 errors generated.
vim +48 drivers/gpu/drm/mediatek/mtk_drm_gem.h
36
37 void mtk_drm_gem_free_object(struct drm_gem_object *gem);
38 struct mtk_drm_gem_obj *mtk_drm_gem_create(struct drm_device *dev, size_t size,
39 bool alloc_kmap);
40 int mtk_drm_gem_dumb_create(struct drm_file *file_priv, struct drm_device *dev,
41 struct drm_mode_create_dumb *args);
42 int mtk_drm_gem_mmap(struct file *filp, struct vm_area_struct *vma);
43 int mtk_drm_gem_mmap_buf(struct drm_gem_object *obj,
44 struct vm_area_struct *vma);
45 struct sg_table *mtk_gem_prime_get_sg_table(struct drm_gem_object *obj);
46 struct drm_gem_object *mtk_gem_prime_import_sg_table(struct drm_device *dev,
47 struct dma_buf_attachment *attach, struct sg_table *sg);
48 int mtk_drm_gem_prime_vmap(struct drm_gem_object *obj, struct
dma_buf_map *map);
49 void mtk_drm_gem_prime_vunmap(struct drm_gem_object *obj,
struct dma_buf_map *map);
50
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org