All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [mlankhorst:ttm 3/8] drivers/gpu/drm/i915/selftests/igt_mmap.c:45 igt_mmap_offset() error: uninitialized symbol 'addr'.
Date: Wed, 26 May 2021 04:20:37 +0800	[thread overview]
Message-ID: <202105260430.exZhuQnQ-lkp@intel.com> (raw)

[-- 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 --]

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild-all@lists.01.org
Subject: [mlankhorst:ttm 3/8] drivers/gpu/drm/i915/selftests/igt_mmap.c:45 igt_mmap_offset() error: uninitialized symbol 'addr'.
Date: Wed, 26 May 2021 07:51:44 +0300	[thread overview]
Message-ID: <202105260430.exZhuQnQ-lkp@intel.com> (raw)

[-- 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

             reply	other threads:[~2021-05-25 20:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-25 20:20 kernel test robot [this message]
2021-05-26  4:51 ` [mlankhorst:ttm 3/8] drivers/gpu/drm/i915/selftests/igt_mmap.c:45 igt_mmap_offset() error: uninitialized symbol 'addr' Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202105260430.exZhuQnQ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.