drivers/gpu/drm/rockchip/rockchip_vop2_reg.c:419:30: sparse: sparse: symbol 'rk3568_vop_layer0_regs' was not declared. Should it be static?

From: kernel test robot
Date: Mon Nov 22 2021 - 15:22:10 EST


tree: https://github.com/0day-ci/linux/commits/UPDATE-20211117-234622/Sascha-Hauer/drm-rockchip-RK356x-VOP2-support/20211117-223601
head: bb17f3afe532266901ec476abd66abd2178e5cfb
commit: bb17f3afe532266901ec476abd66abd2178e5cfb drm: rockchip: Add VOP2 driver
date: 5 days ago
config: nios2-randconfig-s031-20211118 (attached as .config)
compiler: nios2-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/0day-ci/linux/commit/bb17f3afe532266901ec476abd66abd2178e5cfb
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review UPDATE-20211117-234622/Sascha-Hauer/drm-rockchip-RK356x-VOP2-support/20211117-223601
git checkout bb17f3afe532266901ec476abd66abd2178e5cfb
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=nios2 SHELL=/bin/bash drivers/gpu/drm/rockchip/

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


sparse warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/rockchip/rockchip_vop2_reg.c:419:30: sparse: sparse: symbol 'rk3568_vop_layer0_regs' was not declared. Should it be static?
>> drivers/gpu/drm/rockchip/rockchip_vop2_reg.c:423:30: sparse: sparse: symbol 'rk3568_vop_layer1_regs' was not declared. Should it be static?
>> drivers/gpu/drm/rockchip/rockchip_vop2_reg.c:427:30: sparse: sparse: symbol 'rk3568_vop_layer2_regs' was not declared. Should it be static?
>> drivers/gpu/drm/rockchip/rockchip_vop2_reg.c:431:30: sparse: sparse: symbol 'rk3568_vop_layer3_regs' was not declared. Should it be static?
>> drivers/gpu/drm/rockchip/rockchip_vop2_reg.c:435:30: sparse: sparse: symbol 'rk3568_vop_layer4_regs' was not declared. Should it be static?
>> drivers/gpu/drm/rockchip/rockchip_vop2_reg.c:439:30: sparse: sparse: symbol 'rk3568_vop_layer5_regs' was not declared. Should it be static?
--
>> drivers/gpu/drm/rockchip/rockchip_drm_vop2.c:1593:35: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const *s @@ got void [noderef] __iomem *regs @@
drivers/gpu/drm/rockchip/rockchip_drm_vop2.c:1593:35: sparse: expected void const *s
drivers/gpu/drm/rockchip/rockchip_drm_vop2.c:1593:35: sparse: got void [noderef] __iomem *regs

vim +/rk3568_vop_layer0_regs +419 drivers/gpu/drm/rockchip/rockchip_vop2_reg.c

418
> 419 const struct vop2_layer_regs rk3568_vop_layer0_regs = {
420 .layer_sel = VOP_REG(RK3568_OVL_LAYER_SEL, 0x7, 0)
421 };
422
> 423 const struct vop2_layer_regs rk3568_vop_layer1_regs = {
424 .layer_sel = VOP_REG(RK3568_OVL_LAYER_SEL, 0x7, 4)
425 };
426
> 427 const struct vop2_layer_regs rk3568_vop_layer2_regs = {
428 .layer_sel = VOP_REG(RK3568_OVL_LAYER_SEL, 0x7, 8)
429 };
430
> 431 const struct vop2_layer_regs rk3568_vop_layer3_regs = {
432 .layer_sel = VOP_REG(RK3568_OVL_LAYER_SEL, 0x7, 12)
433 };
434
> 435 const struct vop2_layer_regs rk3568_vop_layer4_regs = {
436 .layer_sel = VOP_REG(RK3568_OVL_LAYER_SEL, 0x7, 16)
437 };
438
> 439 const struct vop2_layer_regs rk3568_vop_layer5_regs = {
440 .layer_sel = VOP_REG(RK3568_OVL_LAYER_SEL, 0x7, 20)
441 };
442

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip