Re: [PATCH] drm: omapdrm: Improve check for contiguous buffers

From: kernel test robot
Date: Wed Aug 24 2022 - 18:32:58 EST


Hi Andrew,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm-misc/drm-misc-next]
[also build test ERROR on drm-intel/for-linux-next drm-tip/drm-tip linus/master v6.0-rc2 next-20220824]
[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/Andrew-Davis/drm-omapdrm-Improve-check-for-contiguous-buffers/20220823-080542
base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
config: arm-allyesconfig (https://download.01.org/0day-ci/archive/20220825/202208250645.sVXFPe8D-lkp@xxxxxxxxx/config)
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0
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/5eeaaada78b2038b8f2bf483926b4aee998016ff
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Andrew-Davis/drm-omapdrm-Improve-check-for-contiguous-buffers/20220823-080542
git checkout 5eeaaada78b2038b8f2bf483926b4aee998016ff
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/omapdrm/omap_gem.c:151:62: error: unknown type name 'size'; did you mean 'size_t'?
151 | static bool omap_gem_sgt_is_contiguous(struct sg_table *sgt, size)
| ^~~~
| size_t
drivers/gpu/drm/omapdrm/omap_gem.c: In function 'omap_gem_is_contiguous':
>> drivers/gpu/drm/omapdrm/omap_gem.c:162:13: error: implicit declaration of function 'omap_gem_sgt_is_contiguous'; did you mean 'omap_gem_is_contiguous'? [-Werror=implicit-function-declaration]
162 | omap_gem_sgt_is_contiguous(omap_obj->sgt, omap_obj->base->size))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| omap_gem_is_contiguous
>> drivers/gpu/drm/omapdrm/omap_gem.c:162:69: error: invalid type argument of '->' (have 'struct drm_gem_object')
162 | omap_gem_sgt_is_contiguous(omap_obj->sgt, omap_obj->base->size))
| ^~
cc1: some warnings being treated as errors


vim +151 drivers/gpu/drm/omapdrm/omap_gem.c

150
> 151 static bool omap_gem_sgt_is_contiguous(struct sg_table *sgt, size)
152 {
153 return !(drm_prime_get_contiguous_size(sgt) < size);
154 }
155
156 static bool omap_gem_is_contiguous(struct omap_gem_object *omap_obj)
157 {
158 if (omap_obj->flags & OMAP_BO_MEM_DMA_API)
159 return true;
160
161 if ((omap_obj->flags & OMAP_BO_MEM_DMABUF) &&
> 162 omap_gem_sgt_is_contiguous(omap_obj->sgt, omap_obj->base->size))
163 return true;
164
165 return false;
166 }
167

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