[deller-fbdev:hp-visualize-fx-drm 1/1] drivers/gpu/drm/visualizefx/visfx_drv.c:218:45: warning: 'struct dma_buf_map' declared inside parameter list will not be visible outside of this definition or declaration

From: kernel test robot
Date: Sun May 29 2022 - 09:12:50 EST


tree: git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev.git hp-visualize-fx-drm
head: c2d0f767c19314c3d3a1a2d304be3c871b729523
commit: c2d0f767c19314c3d3a1a2d304be3c871b729523 [1/1] drm: add HP Visualize FX driver
config: parisc-allyesconfig (https://download.01.org/0day-ci/archive/20220529/202205292129.uedWYGfX-lkp@xxxxxxxxx/config)
compiler: hppa-linux-gcc (GCC) 11.3.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://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev.git/commit/?id=c2d0f767c19314c3d3a1a2d304be3c871b729523
git remote add deller-fbdev git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev.git
git fetch --no-tags deller-fbdev hp-visualize-fx-drm
git checkout c2d0f767c19314c3d3a1a2d304be3c871b729523
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=parisc SHELL=/bin/bash drivers/gpu/drm/visualizefx/

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/visualizefx/visfx_drv.c:218:45: warning: 'struct dma_buf_map' declared inside parameter list will not be visible outside of this definition or declaration
218 | const struct dma_buf_map *map,
| ^~~~~~~~~~~
drivers/gpu/drm/visualizefx/visfx_drv.c: In function 'visfx_fb_blit_rect':
drivers/gpu/drm/visualizefx/visfx_drv.c:222:25: error: invalid use of undefined type 'const struct dma_buf_map'
222 | void *vmap = map->vaddr; /* TODO: Use mapping abstraction properly */
| ^~
drivers/gpu/drm/visualizefx/visfx_drv.c: At top level:
drivers/gpu/drm/visualizefx/visfx_drv.c:236:78: warning: 'struct dma_buf_map' declared inside parameter list will not be visible outside of this definition or declaration
236 | static int visfx_fb_blit_fullscreen(struct drm_framebuffer *fb, const struct dma_buf_map *map)
| ^~~~~~~~~~~
drivers/gpu/drm/visualizefx/visfx_drv.c: In function 'visfx_fb_blit_fullscreen':
drivers/gpu/drm/visualizefx/visfx_drv.c:244:39: error: passing argument 2 of 'visfx_fb_blit_rect' from incompatible pointer type [-Werror=incompatible-pointer-types]
244 | return visfx_fb_blit_rect(fb, map, &fullscreen);
| ^~~
| |
| const struct dma_buf_map *
drivers/gpu/drm/visualizefx/visfx_drv.c:218:58: note: expected 'const struct dma_buf_map *' but argument is of type 'const struct dma_buf_map *'
218 | const struct dma_buf_map *map,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/gpu/drm/visualizefx/visfx_drv.c: In function 'visfx_pipe_enable':
drivers/gpu/drm/visualizefx/visfx_drv.c:281:51: error: passing argument 2 of 'visfx_fb_blit_fullscreen' from incompatible pointer type [-Werror=incompatible-pointer-types]
281 | visfx_fb_blit_fullscreen(plane_state->fb, &shadow_plane_state->data[0]);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| struct iosys_map *
drivers/gpu/drm/visualizefx/visfx_drv.c:236:91: note: expected 'const struct dma_buf_map *' but argument is of type 'struct iosys_map *'
236 | static int visfx_fb_blit_fullscreen(struct drm_framebuffer *fb, const struct dma_buf_map *map)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/gpu/drm/visualizefx/visfx_drv.c: In function 'visfx_pipe_update':
drivers/gpu/drm/visualizefx/visfx_drv.c:321:47: error: passing argument 2 of 'visfx_fb_blit_rect' from incompatible pointer type [-Werror=incompatible-pointer-types]
321 | visfx_fb_blit_rect(state->fb, &shadow_plane_state->data[0], &rect);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| struct iosys_map *
drivers/gpu/drm/visualizefx/visfx_drv.c:218:58: note: expected 'const struct dma_buf_map *' but argument is of type 'struct iosys_map *'
218 | const struct dma_buf_map *map,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
cc1: some warnings being treated as errors


vim +218 drivers/gpu/drm/visualizefx/visfx_drv.c

216
217 static int visfx_fb_blit_rect(struct drm_framebuffer *fb,
> 218 const struct dma_buf_map *map,
219 struct drm_rect *rect)
220 {
221 struct visfx_device *visfx = to_visfx(fb->dev);
222 void *vmap = map->vaddr; /* TODO: Use mapping abstraction properly */
223 uint8_t *dst;
224 int idx;
225
226 if (!drm_dev_enter(&visfx->dev, &idx))
227 return -ENODEV;
228 visfx_writel(visfx, VISFX_VRAM_WRITE_MODE, VISFX_VRAM_WRITE_MODE_BITMAP);
229 dst = visfx->mmio + 0x01000000;
230 dst += drm_fb_clip_offset(fb->pitches[0], fb->format, rect);
231 drm_fb_memcpy_toio(dst, fb->pitches[0], vmap, fb, rect);
232 drm_dev_exit(idx);
233 return 0;
234 }
235

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