tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 8d055501b2f0dc4e29197de45eabdd21f73fa507 commit: 901dbb48d8a4f60af427f1ec67ac1247ff219f39 [22374/22416] nouveau: lock the client object tree. config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20240512/202405121008.xQ4qtfYQ-lkp@i...) compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240512/202405121008.xQ4qtfYQ-lkp@i...)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot lkp@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202405121008.xQ4qtfYQ-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/gpu/drm/nouveau/nvkm/core/object.c:37:19: warning: mixing declarations and code is a C99 extension [-Wdeclaration-after-statement]
37 | struct rb_node *node = client->objroot.rb_node; | ^ 1 warning generated.
vim +37 drivers/gpu/drm/nouveau/nvkm/core/object.c
9274f4a9ba7e70 drivers/gpu/drm/nouveau/core/core/object.c Ben Skeggs 2012-07-06 27 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 28 struct nvkm_object * 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 29 nvkm_object_search(struct nvkm_client *client, u64 handle, 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 30 const struct nvkm_object_func *func) 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 31 { 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 32 struct nvkm_object *object; 901dbb48d8a4f6 drivers/gpu/drm/nouveau/nvkm/core/object.c Dave Airlie 2024-05-09 33 unsigned long flags; 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 34 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 35 if (handle) { 901dbb48d8a4f6 drivers/gpu/drm/nouveau/nvkm/core/object.c Dave Airlie 2024-05-09 36 spin_lock_irqsave(&client->obj_lock, flags); 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 @37 struct rb_node *node = client->objroot.rb_node; 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 38 while (node) { 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 39 object = rb_entry(node, typeof(*object), node); 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 40 if (handle < object->object) 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 41 node = node->rb_left; 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 42 else 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 43 if (handle > object->object) 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 44 node = node->rb_right; 901dbb48d8a4f6 drivers/gpu/drm/nouveau/nvkm/core/object.c Dave Airlie 2024-05-09 45 else { 901dbb48d8a4f6 drivers/gpu/drm/nouveau/nvkm/core/object.c Dave Airlie 2024-05-09 46 spin_unlock_irqrestore(&client->obj_lock, flags); 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 47 goto done; 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 48 } 901dbb48d8a4f6 drivers/gpu/drm/nouveau/nvkm/core/object.c Dave Airlie 2024-05-09 49 } 901dbb48d8a4f6 drivers/gpu/drm/nouveau/nvkm/core/object.c Dave Airlie 2024-05-09 50 spin_unlock_irqrestore(&client->obj_lock, flags); 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 51 return ERR_PTR(-ENOENT); 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 52 } else { 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 53 object = &client->object; 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 54 } 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 55 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 56 done: 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 57 if (unlikely(func && object->func != func)) 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 58 return ERR_PTR(-EINVAL); 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 59 return object; 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 60 } 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 61
:::::: The code at line 37 was first introduced by commit :::::: 110cccff955313c66dccd2817f62368f106d9bf2 drm/nouveau/core/object: support lookup of specific object types
:::::: TO: Ben Skeggs bskeggs@redhat.com :::::: CC: Ben Skeggs bskeggs@redhat.com