drivers/gpu/drm/ttm/ttm_range_manager.c:144: warning: expecting prototype for ttm_range_man_init(). Prototype was for ttm_range_man_init_nocheck() instead

From: kernel test robot
Date: Mon Nov 15 2021 - 05:48:21 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ab774587903771821b59471cc723bba6d893942
commit: 617d5b34f22c66fe9fc9f150be27f5de1b87ca15 drm/ttm: Try to check if new ttm man out of bounds during compile
date: 9 weeks ago
config: x86_64-randconfig-a014-20210927 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dc6e8dfdfe7efecfda318d43a06fae18b40eb498)
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/torvalds/linux.git/commit/?id=617d5b34f22c66fe9fc9f150be27f5de1b87ca15
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 617d5b34f22c66fe9fc9f150be27f5de1b87ca15
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/gpu/drm/ttm/ kernel/locking/

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

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/ttm/ttm_range_manager.c:144: warning: expecting prototype for ttm_range_man_init(). Prototype was for ttm_range_man_init_nocheck() instead
>> drivers/gpu/drm/ttm/ttm_range_manager.c:178: warning: expecting prototype for ttm_range_man_fini(). Prototype was for ttm_range_man_fini_nocheck() instead


vim +144 drivers/gpu/drm/ttm/ttm_range_manager.c

98399abd52b234 drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 129
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 130 /**
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 131 * ttm_range_man_init
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 132 *
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 133 * @bdev: ttm device
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 134 * @type: memory manager type
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 135 * @use_tt: if the memory manager uses tt
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 136 * @p_size: size of area to be managed in pages.
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 137 *
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 138 * Initialise a generic range manager for the selected memory type.
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 139 * The range manager is installed for this device in the type slot.
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 140 */
617d5b34f22c66 drivers/gpu/drm/ttm/ttm_range_manager.c xinhui pan 2021-09-13 141 int ttm_range_man_init_nocheck(struct ttm_device *bdev,
9c3006a4cc1b16 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2020-09-11 142 unsigned type, bool use_tt,
d961db75ce86a8 drivers/gpu/drm/ttm/ttm_bo_manager.c Ben Skeggs 2010-08-05 143 unsigned long p_size)
d961db75ce86a8 drivers/gpu/drm/ttm/ttm_bo_manager.c Ben Skeggs 2010-08-05 @144 {
9de59bc201496f drivers/gpu/drm/ttm/ttm_range_manager.c Dave Airlie 2020-08-04 145 struct ttm_resource_manager *man;
d7a67cb16238ab drivers/gpu/drm/ttm/ttm_bo_manager.c Thomas Hellstrom 2010-10-29 146 struct ttm_range_manager *rman;
d961db75ce86a8 drivers/gpu/drm/ttm/ttm_bo_manager.c Ben Skeggs 2010-08-05 147
d7a67cb16238ab drivers/gpu/drm/ttm/ttm_bo_manager.c Thomas Hellstrom 2010-10-29 148 rman = kzalloc(sizeof(*rman), GFP_KERNEL);
d7a67cb16238ab drivers/gpu/drm/ttm/ttm_bo_manager.c Thomas Hellstrom 2010-10-29 149 if (!rman)
d961db75ce86a8 drivers/gpu/drm/ttm/ttm_bo_manager.c Ben Skeggs 2010-08-05 150 return -ENOMEM;
d961db75ce86a8 drivers/gpu/drm/ttm/ttm_bo_manager.c Ben Skeggs 2010-08-05 151
3a1fc38edac75d drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 152 man = &rman->manager;
3a1fc38edac75d drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 153 man->use_tt = use_tt;
3a1fc38edac75d drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 154
80938c28ee67ba drivers/gpu/drm/ttm/ttm_range_manager.c Dave Airlie 2020-08-04 155 man->func = &ttm_range_manager_func;
37205891d84f92 drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 156
9de59bc201496f drivers/gpu/drm/ttm/ttm_range_manager.c Dave Airlie 2020-08-04 157 ttm_resource_manager_init(man, p_size);
37205891d84f92 drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 158
77ef8bbc87be7a drivers/gpu/drm/ttm/ttm_bo_manager.c David Herrmann 2013-07-01 159 drm_mm_init(&rman->mm, 0, p_size);
d7a67cb16238ab drivers/gpu/drm/ttm/ttm_bo_manager.c Thomas Hellstrom 2010-10-29 160 spin_lock_init(&rman->lock);
d961db75ce86a8 drivers/gpu/drm/ttm/ttm_bo_manager.c Ben Skeggs 2010-08-05 161
3a1fc38edac75d drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 162 ttm_set_driver_manager(bdev, type, &rman->manager);
9de59bc201496f drivers/gpu/drm/ttm/ttm_range_manager.c Dave Airlie 2020-08-04 163 ttm_resource_manager_set_used(man, true);
3c90424bd7df15 drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 164 return 0;
3c90424bd7df15 drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 165 }
617d5b34f22c66 drivers/gpu/drm/ttm/ttm_range_manager.c xinhui pan 2021-09-13 166 EXPORT_SYMBOL(ttm_range_man_init_nocheck);
3c90424bd7df15 drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 167
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 168 /**
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 169 * ttm_range_man_fini
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 170 *
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 171 * @bdev: ttm device
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 172 * @type: memory manager type
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 173 *
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 174 * Remove the generic range manager from a slot and tear it down.
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 175 */
617d5b34f22c66 drivers/gpu/drm/ttm/ttm_range_manager.c xinhui pan 2021-09-13 176 int ttm_range_man_fini_nocheck(struct ttm_device *bdev,
37205891d84f92 drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 177 unsigned type)
56ee8b1c71ffb5 drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 @178 {

:::::: The code at line 144 was first introduced by commit
:::::: d961db75ce86a84f1f04e91ad1014653ed7d9f46 drm/ttm: restructure to allow driver to plug in alternate memory manager

:::::: TO: Ben Skeggs <bskeggs@xxxxxxxxxx>
:::::: CC: Ben Skeggs <bskeggs@xxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip