* [mlankhorst:ttm 3/8] drivers/gpu/drm/i915/selftests/igt_mmap.c:45 igt_mmap_offset() error: uninitialized symbol 'addr'.
@ 2021-05-26 4:51 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-05-25 20:20 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 3906 bytes --]
CC: kbuild-all(a)lists.01.org
TO: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
tree: git://people.freedesktop.org/~mlankhorst/linux ttm
head: 2fd51ce6e707358af329fa2d4a91ab7dd7b84c5e
commit: cbea27e180f0edbb6eb5c4f2cb24f18ba8f78352 [3/8] drm/i915: Use ttm mmap handling for ttm bo's.
:::::: branch date: 4 hours ago
:::::: commit date: 9 hours ago
config: i386-randconfig-m021-20210525 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/gpu/drm/i915/selftests/igt_mmap.c:45 igt_mmap_offset() error: uninitialized symbol 'addr'.
vim +/addr +45 drivers/gpu/drm/i915/selftests/igt_mmap.c
6fedafacae1b95 Chris Wilson 2019-11-07 11
cbea27e180f0ed Maarten Lankhorst 2021-05-05 12 unsigned long igt_mmap_offset(struct drm_i915_private *i915,
cbea27e180f0ed Maarten Lankhorst 2021-05-05 13 u64 offset,
cbea27e180f0ed Maarten Lankhorst 2021-05-05 14 unsigned long size,
6fedafacae1b95 Chris Wilson 2019-11-07 15 unsigned long prot,
6fedafacae1b95 Chris Wilson 2019-11-07 16 unsigned long flags)
6fedafacae1b95 Chris Wilson 2019-11-07 17 {
cbea27e180f0ed Maarten Lankhorst 2021-05-05 18 struct drm_vma_offset_node *node;
6fedafacae1b95 Chris Wilson 2019-11-07 19 struct file *file;
cbea27e180f0ed Maarten Lankhorst 2021-05-05 20 unsigned long addr;
6fedafacae1b95 Chris Wilson 2019-11-07 21 int err;
6fedafacae1b95 Chris Wilson 2019-11-07 22
cbea27e180f0ed Maarten Lankhorst 2021-05-05 23 /* no need to refcount, we own this object */
cbea27e180f0ed Maarten Lankhorst 2021-05-05 24 drm_vma_offset_lock_lookup(i915->drm.vma_offset_manager);
cbea27e180f0ed Maarten Lankhorst 2021-05-05 25 node = drm_vma_offset_exact_lookup_locked(i915->drm.vma_offset_manager,
cbea27e180f0ed Maarten Lankhorst 2021-05-05 26 offset / PAGE_SIZE, size / PAGE_SIZE);
cbea27e180f0ed Maarten Lankhorst 2021-05-05 27 drm_vma_offset_unlock_lookup(i915->drm.vma_offset_manager);
cbea27e180f0ed Maarten Lankhorst 2021-05-05 28
cbea27e180f0ed Maarten Lankhorst 2021-05-05 29 if (GEM_WARN_ON(!node)) {
cbea27e180f0ed Maarten Lankhorst 2021-05-05 30 pr_info("Failed to lookup %Lx\n", offset);
cbea27e180f0ed Maarten Lankhorst 2021-05-05 31 return -ENOENT;
cbea27e180f0ed Maarten Lankhorst 2021-05-05 32 }
cbea27e180f0ed Maarten Lankhorst 2021-05-05 33
6fedafacae1b95 Chris Wilson 2019-11-07 34 /* Pretend to open("/dev/dri/card0") */
6fedafacae1b95 Chris Wilson 2019-11-07 35 file = mock_drm_getfile(i915->drm.primary, O_RDWR);
6fedafacae1b95 Chris Wilson 2019-11-07 36 if (IS_ERR(file))
6fedafacae1b95 Chris Wilson 2019-11-07 37 return PTR_ERR(file);
6fedafacae1b95 Chris Wilson 2019-11-07 38
6fedafacae1b95 Chris Wilson 2019-11-07 39 err = drm_vma_node_allow(node, file->private_data);
6fedafacae1b95 Chris Wilson 2019-11-07 40 if (err) {
6fedafacae1b95 Chris Wilson 2019-11-07 41 addr = err;
6fedafacae1b95 Chris Wilson 2019-11-07 42 goto out_file;
6fedafacae1b95 Chris Wilson 2019-11-07 43 }
6fedafacae1b95 Chris Wilson 2019-11-07 44
6fedafacae1b95 Chris Wilson 2019-11-07 @45 addr = vm_mmap(file, addr, drm_vma_node_size(node) << PAGE_SHIFT,
:::::: The code@line 45 was first introduced by commit
:::::: 6fedafacae1b951af104d862888a446b6c3f3a39 drm/i915/selftests: Wrap vm_mmap() around GEM objects
:::::: TO: Chris Wilson <chris@chris-wilson.co.uk>
:::::: CC: Chris Wilson <chris@chris-wilson.co.uk>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33196 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* [mlankhorst:ttm 3/8] drivers/gpu/drm/i915/selftests/igt_mmap.c:45 igt_mmap_offset() error: uninitialized symbol 'addr'.
@ 2021-05-26 4:51 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2021-05-26 4:51 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3610 bytes --]
tree: git://people.freedesktop.org/~mlankhorst/linux ttm
head: 2fd51ce6e707358af329fa2d4a91ab7dd7b84c5e
commit: cbea27e180f0edbb6eb5c4f2cb24f18ba8f78352 [3/8] drm/i915: Use ttm mmap handling for ttm bo's.
config: i386-randconfig-m021-20210525 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/gpu/drm/i915/selftests/igt_mmap.c:45 igt_mmap_offset() error: uninitialized symbol 'addr'.
vim +/addr +45 drivers/gpu/drm/i915/selftests/igt_mmap.c
cbea27e180f0ed Maarten Lankhorst 2021-05-05 12 unsigned long igt_mmap_offset(struct drm_i915_private *i915,
cbea27e180f0ed Maarten Lankhorst 2021-05-05 13 u64 offset,
cbea27e180f0ed Maarten Lankhorst 2021-05-05 14 unsigned long size,
6fedafacae1b95 Chris Wilson 2019-11-07 15 unsigned long prot,
6fedafacae1b95 Chris Wilson 2019-11-07 16 unsigned long flags)
6fedafacae1b95 Chris Wilson 2019-11-07 17 {
cbea27e180f0ed Maarten Lankhorst 2021-05-05 18 struct drm_vma_offset_node *node;
6fedafacae1b95 Chris Wilson 2019-11-07 19 struct file *file;
cbea27e180f0ed Maarten Lankhorst 2021-05-05 20 unsigned long addr;
^^^^
6fedafacae1b95 Chris Wilson 2019-11-07 21 int err;
6fedafacae1b95 Chris Wilson 2019-11-07 22
cbea27e180f0ed Maarten Lankhorst 2021-05-05 23 /* no need to refcount, we own this object */
cbea27e180f0ed Maarten Lankhorst 2021-05-05 24 drm_vma_offset_lock_lookup(i915->drm.vma_offset_manager);
cbea27e180f0ed Maarten Lankhorst 2021-05-05 25 node = drm_vma_offset_exact_lookup_locked(i915->drm.vma_offset_manager,
cbea27e180f0ed Maarten Lankhorst 2021-05-05 26 offset / PAGE_SIZE, size / PAGE_SIZE);
cbea27e180f0ed Maarten Lankhorst 2021-05-05 27 drm_vma_offset_unlock_lookup(i915->drm.vma_offset_manager);
cbea27e180f0ed Maarten Lankhorst 2021-05-05 28
cbea27e180f0ed Maarten Lankhorst 2021-05-05 29 if (GEM_WARN_ON(!node)) {
cbea27e180f0ed Maarten Lankhorst 2021-05-05 30 pr_info("Failed to lookup %Lx\n", offset);
cbea27e180f0ed Maarten Lankhorst 2021-05-05 31 return -ENOENT;
cbea27e180f0ed Maarten Lankhorst 2021-05-05 32 }
cbea27e180f0ed Maarten Lankhorst 2021-05-05 33
6fedafacae1b95 Chris Wilson 2019-11-07 34 /* Pretend to open("/dev/dri/card0") */
6fedafacae1b95 Chris Wilson 2019-11-07 35 file = mock_drm_getfile(i915->drm.primary, O_RDWR);
6fedafacae1b95 Chris Wilson 2019-11-07 36 if (IS_ERR(file))
6fedafacae1b95 Chris Wilson 2019-11-07 37 return PTR_ERR(file);
6fedafacae1b95 Chris Wilson 2019-11-07 38
6fedafacae1b95 Chris Wilson 2019-11-07 39 err = drm_vma_node_allow(node, file->private_data);
6fedafacae1b95 Chris Wilson 2019-11-07 40 if (err) {
6fedafacae1b95 Chris Wilson 2019-11-07 41 addr = err;
6fedafacae1b95 Chris Wilson 2019-11-07 42 goto out_file;
6fedafacae1b95 Chris Wilson 2019-11-07 43 }
6fedafacae1b95 Chris Wilson 2019-11-07 44
6fedafacae1b95 Chris Wilson 2019-11-07 @45 addr = vm_mmap(file, addr, drm_vma_node_size(node) << PAGE_SHIFT,
^^^^
Uninitialized here.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-26 4:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-25 20:20 [mlankhorst:ttm 3/8] drivers/gpu/drm/i915/selftests/igt_mmap.c:45 igt_mmap_offset() error: uninitialized symbol 'addr' kernel test robot
2021-05-26 4:51 ` Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.