drivers/gpu/drm/tegra/submit.c:107:28: sparse: sparse: symbol 'gather_bo_ops' was not declared. Should it be static?

From: kernel test robot
Date: Sat Jul 02 2022 - 22:03:33 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 69cb6c6556ad89620547318439d6be8bb1629a5a
commit: 13abe0bb15ceac2fb8e8853bd30c278426d95ad0 drm/tegra: Implement job submission part of new UAPI
date: 11 months ago
config: arm-randconfig-s032-20220703 (https://download.01.org/0day-ci/archive/20220703/202207031031.i87PMmio-lkp@xxxxxxxxx/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.3.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-39-gce1a6720-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=13abe0bb15ceac2fb8e8853bd30c278426d95ad0
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 13abe0bb15ceac2fb8e8853bd30c278426d95ad0
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm SHELL=/bin/bash arch/arm/kernel/ drivers/firmware/arm_scmi/ drivers/gpu/drm/tegra/ drivers/misc/ drivers/video/fbdev/omap/

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


sparse warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/tegra/submit.c:107:28: sparse: sparse: symbol 'gather_bo_ops' was not declared. Should it be static?

vim +/gather_bo_ops +107 drivers/gpu/drm/tegra/submit.c

66
67 static struct host1x_bo_mapping *
68 gather_bo_pin(struct device *dev, struct host1x_bo *bo, enum dma_data_direction direction)
69 {
70 struct gather_bo *gather = container_of(bo, struct gather_bo, base);
71 struct host1x_bo_mapping *map;
72 int err;
73
74 map = kzalloc(sizeof(*map), GFP_KERNEL);
75 if (!map)
76 return ERR_PTR(-ENOMEM);
77
78 kref_init(&map->ref);
79 map->bo = host1x_bo_get(bo);
80 map->direction = direction;
81 map->dev = dev;
82
83 map->sgt = kzalloc(sizeof(*map->sgt), GFP_KERNEL);
84 if (!map->sgt) {
85 err = -ENOMEM;
86 goto free;
87 }
88
89 err = dma_get_sgtable(gather->dev, map->sgt, gather->gather_data, gather->gather_data_dma,
90 gather->gather_data_words * 4);
91 if (err)
92 goto free_sgt;
93
94 err = dma_map_sgtable(dev, map->sgt, direction, 0);
95 if (err)
96 goto free_sgt;
97
98 map->phys = sg_dma_address(map->sgt->sgl);
99 map->size = gather->gather_data_words * 4;
100 map->chunks = err;
101
102 return map;
103
104 free_sgt:
105 sg_free_table(map->sgt);
106 kfree(map->sgt);
> 107 free:
108 kfree(map);
109 return ERR_PTR(err);
110 }
111

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