drivers/gpu/drm/nouveau/nouveau_bo.c:1314:24: warning: variable 'dev' set but not used
From: kernel test robot
Date: Mon Sep 27 2021 - 11:29:18 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 92477dd1faa650e50bd3bb35a6c0b8d09198cc35
commit: 461619f5c3242aaee9ec3f0b7072719bd86ea207 drm/nouveau: switch to new allocator
date: 11 months ago
config: m68k-randconfig-r021-20210927 (attached as .config)
compiler: m68k-linux-gcc (GCC) 11.2.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/torvalds/linux.git/commit/?id=461619f5c3242aaee9ec3f0b7072719bd86ea207
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 461619f5c3242aaee9ec3f0b7072719bd86ea207
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=m68k
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/nouveau/nouveau_bo.c: In function 'nouveau_ttm_tt_populate':
>> drivers/gpu/drm/nouveau/nouveau_bo.c:1314:24: warning: variable 'dev' set but not used [-Wunused-but-set-variable]
1314 | struct device *dev;
| ^~~
drivers/gpu/drm/nouveau/nouveau_bo.c: In function 'nouveau_ttm_tt_unpopulate':
drivers/gpu/drm/nouveau/nouveau_bo.c:1338:24: warning: variable 'dev' set but not used [-Wunused-but-set-variable]
1338 | struct device *dev;
| ^~~
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for NEED_MULTIPLE_NODES
Depends on DISCONTIGMEM || NUMA
Selected by
- SINGLE_MEMORY_CHUNK && MMU
vim +/dev +1314 drivers/gpu/drm/nouveau/nouveau_bo.c
e1429b4c3c7951 Ben Skeggs 2010-09-10 1307
3230cfc34fca9d Konrad Rzeszutek Wilk 2011-10-17 1308 static int
0a667b500703db Dave Airlie 2020-08-25 1309 nouveau_ttm_tt_populate(struct ttm_bo_device *bdev,
0a667b500703db Dave Airlie 2020-08-25 1310 struct ttm_tt *ttm, struct ttm_operation_ctx *ctx)
3230cfc34fca9d Konrad Rzeszutek Wilk 2011-10-17 1311 {
e34b8feeaa4b65 Christian König 2020-10-21 1312 struct ttm_tt *ttm_dma = (void *)ttm;
ebb945a94bba2c Ben Skeggs 2012-07-20 1313 struct nouveau_drm *drm;
359088d5b8ec06 Ben Skeggs 2017-11-01 @1314 struct device *dev;
22b33e8ed0e38b Dave Airlie 2012-04-02 1315 bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG);
3230cfc34fca9d Konrad Rzeszutek Wilk 2011-10-17 1316
7eec915138279d Dave Airlie 2020-09-15 1317 if (ttm_tt_is_populated(ttm))
3230cfc34fca9d Konrad Rzeszutek Wilk 2011-10-17 1318 return 0;
3230cfc34fca9d Konrad Rzeszutek Wilk 2011-10-17 1319
22b33e8ed0e38b Dave Airlie 2012-04-02 1320 if (slave && ttm->sg) {
22b33e8ed0e38b Dave Airlie 2012-04-02 1321 /* make userspace faulting work */
22b33e8ed0e38b Dave Airlie 2012-04-02 1322 drm_prime_sg_to_page_addr_arrays(ttm->sg, ttm->pages,
22b33e8ed0e38b Dave Airlie 2012-04-02 1323 ttm_dma->dma_address, ttm->num_pages);
22b33e8ed0e38b Dave Airlie 2012-04-02 1324 return 0;
22b33e8ed0e38b Dave Airlie 2012-04-02 1325 }
22b33e8ed0e38b Dave Airlie 2012-04-02 1326
0a667b500703db Dave Airlie 2020-08-25 1327 drm = nouveau_bdev(bdev);
359088d5b8ec06 Ben Skeggs 2017-11-01 1328 dev = drm->dev->dev;
3230cfc34fca9d Konrad Rzeszutek Wilk 2011-10-17 1329
461619f5c3242a Christian König 2020-10-24 1330 return ttm_pool_alloc(&drm->ttm.bdev.pool, ttm, ctx);
3230cfc34fca9d Konrad Rzeszutek Wilk 2011-10-17 1331 }
3230cfc34fca9d Konrad Rzeszutek Wilk 2011-10-17 1332
:::::: The code at line 1314 was first introduced by commit
:::::: 359088d5b8ec06196a9ea53e7e59167514220465 drm/nouveau: remove trivial cases of nvxx_device() usage
:::::: 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