All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: drivers/gpu/drm/i915/gt/selftest_migrate.c:182 clear() error: uninitialized symbol 'rq'.
Date: Sat, 18 Dec 2021 08:37:45 +0800	[thread overview]
Message-ID: <202112180857.ODI140kE-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 6793 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Chris Wilson <chris@chris-wilson.co.uk>
CC: Matthew Auld <matthew.auld@intel.com>
CC: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   6441998e2e37131b0a4c310af9156d79d3351c16
commit: 563baae1875cbcac332086cca325cf55a0532b9e drm/i915/gt: Pipelined clear
date:   6 months ago
:::::: branch date: 25 hours ago
:::::: commit date: 6 months ago
config: i386-randconfig-m021-20211207 (https://download.01.org/0day-ci/archive/20211218/202112180857.ODI140kE-lkp(a)intel.com/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>

New smatch warnings:
drivers/gpu/drm/i915/gt/selftest_migrate.c:182 clear() error: uninitialized symbol 'rq'.
drivers/gpu/drm/i915/gt/selftest_migrate.c:193 clear() error: uninitialized symbol 'vaddr'.

Old smatch warnings:
drivers/gpu/drm/i915/gt/selftest_migrate.c:102 copy() error: uninitialized symbol 'rq'.
drivers/gpu/drm/i915/gt/selftest_migrate.c:113 copy() error: uninitialized symbol 'vaddr'.
drivers/gpu/drm/i915/gem/i915_gem_object.h:182 __i915_gem_object_lock() error: we previously assumed 'ww' could be null (see line 171)

vim +/rq +182 drivers/gpu/drm/i915/gt/selftest_migrate.c

cf586021642d80 Chris Wilson 2021-06-17  131  
563baae1875cbc Chris Wilson 2021-06-17  132  static int clear(struct intel_migrate *migrate,
563baae1875cbc Chris Wilson 2021-06-17  133  		 int (*fn)(struct intel_migrate *migrate,
563baae1875cbc Chris Wilson 2021-06-17  134  			   struct i915_gem_ww_ctx *ww,
563baae1875cbc Chris Wilson 2021-06-17  135  			   struct drm_i915_gem_object *obj,
563baae1875cbc Chris Wilson 2021-06-17  136  			   u32 value,
563baae1875cbc Chris Wilson 2021-06-17  137  			   struct i915_request **out),
563baae1875cbc Chris Wilson 2021-06-17  138  		 u32 sz, struct rnd_state *prng)
563baae1875cbc Chris Wilson 2021-06-17  139  {
563baae1875cbc Chris Wilson 2021-06-17  140  	struct drm_i915_private *i915 = migrate->context->engine->i915;
563baae1875cbc Chris Wilson 2021-06-17  141  	struct drm_i915_gem_object *obj;
563baae1875cbc Chris Wilson 2021-06-17  142  	struct i915_request *rq;
563baae1875cbc Chris Wilson 2021-06-17  143  	struct i915_gem_ww_ctx ww;
563baae1875cbc Chris Wilson 2021-06-17  144  	u32 *vaddr;
563baae1875cbc Chris Wilson 2021-06-17  145  	int err = 0;
563baae1875cbc Chris Wilson 2021-06-17  146  	int i;
563baae1875cbc Chris Wilson 2021-06-17  147  
563baae1875cbc Chris Wilson 2021-06-17  148  	obj = create_lmem_or_internal(i915, sz);
563baae1875cbc Chris Wilson 2021-06-17  149  	if (IS_ERR(obj))
563baae1875cbc Chris Wilson 2021-06-17  150  		return 0;
563baae1875cbc Chris Wilson 2021-06-17  151  
563baae1875cbc Chris Wilson 2021-06-17  152  	for_i915_gem_ww(&ww, err, true) {
563baae1875cbc Chris Wilson 2021-06-17  153  		err = i915_gem_object_lock(obj, &ww);
563baae1875cbc Chris Wilson 2021-06-17  154  		if (err)
563baae1875cbc Chris Wilson 2021-06-17  155  			continue;
563baae1875cbc Chris Wilson 2021-06-17  156  
563baae1875cbc Chris Wilson 2021-06-17  157  		vaddr = i915_gem_object_pin_map(obj, I915_MAP_WC);
563baae1875cbc Chris Wilson 2021-06-17  158  		if (IS_ERR(vaddr)) {
563baae1875cbc Chris Wilson 2021-06-17  159  			err = PTR_ERR(vaddr);
563baae1875cbc Chris Wilson 2021-06-17  160  			continue;
563baae1875cbc Chris Wilson 2021-06-17  161  		}
563baae1875cbc Chris Wilson 2021-06-17  162  
563baae1875cbc Chris Wilson 2021-06-17  163  		for (i = 0; i < sz / sizeof(u32); i++)
563baae1875cbc Chris Wilson 2021-06-17  164  			vaddr[i] = ~i;
563baae1875cbc Chris Wilson 2021-06-17  165  		i915_gem_object_flush_map(obj);
563baae1875cbc Chris Wilson 2021-06-17  166  
563baae1875cbc Chris Wilson 2021-06-17  167  		err = fn(migrate, &ww, obj, sz, &rq);
563baae1875cbc Chris Wilson 2021-06-17  168  		if (!err)
563baae1875cbc Chris Wilson 2021-06-17  169  			continue;
563baae1875cbc Chris Wilson 2021-06-17  170  
563baae1875cbc Chris Wilson 2021-06-17  171  		if (err != -EDEADLK && err != -EINTR && err != -ERESTARTSYS)
563baae1875cbc Chris Wilson 2021-06-17  172  			pr_err("%ps failed, size: %u\n", fn, sz);
563baae1875cbc Chris Wilson 2021-06-17  173  		if (rq) {
563baae1875cbc Chris Wilson 2021-06-17  174  			i915_request_wait(rq, 0, HZ);
563baae1875cbc Chris Wilson 2021-06-17  175  			i915_request_put(rq);
563baae1875cbc Chris Wilson 2021-06-17  176  		}
563baae1875cbc Chris Wilson 2021-06-17  177  		i915_gem_object_unpin_map(obj);
563baae1875cbc Chris Wilson 2021-06-17  178  	}
563baae1875cbc Chris Wilson 2021-06-17  179  	if (err)
563baae1875cbc Chris Wilson 2021-06-17  180  		goto err_out;
563baae1875cbc Chris Wilson 2021-06-17  181  
563baae1875cbc Chris Wilson 2021-06-17 @182  	if (rq) {
563baae1875cbc Chris Wilson 2021-06-17  183  		if (i915_request_wait(rq, 0, HZ) < 0) {
563baae1875cbc Chris Wilson 2021-06-17  184  			pr_err("%ps timed out, size: %u\n", fn, sz);
563baae1875cbc Chris Wilson 2021-06-17  185  			err = -ETIME;
563baae1875cbc Chris Wilson 2021-06-17  186  		}
563baae1875cbc Chris Wilson 2021-06-17  187  		i915_request_put(rq);
563baae1875cbc Chris Wilson 2021-06-17  188  	}
563baae1875cbc Chris Wilson 2021-06-17  189  
563baae1875cbc Chris Wilson 2021-06-17  190  	for (i = 0; !err && i < sz / PAGE_SIZE; i++) {
563baae1875cbc Chris Wilson 2021-06-17  191  		int x = i * 1024 + i915_prandom_u32_max_state(1024, prng);
563baae1875cbc Chris Wilson 2021-06-17  192  
563baae1875cbc Chris Wilson 2021-06-17 @193  		if (vaddr[x] != sz) {
563baae1875cbc Chris Wilson 2021-06-17  194  			pr_err("%ps failed, size: %u, offset: %zu\n",
563baae1875cbc Chris Wilson 2021-06-17  195  			       fn, sz, x * sizeof(u32));
563baae1875cbc Chris Wilson 2021-06-17  196  			igt_hexdump(vaddr + i * 1024, 4096);
563baae1875cbc Chris Wilson 2021-06-17  197  			err = -EINVAL;
563baae1875cbc Chris Wilson 2021-06-17  198  		}
563baae1875cbc Chris Wilson 2021-06-17  199  	}
563baae1875cbc Chris Wilson 2021-06-17  200  
563baae1875cbc Chris Wilson 2021-06-17  201  	i915_gem_object_unpin_map(obj);
563baae1875cbc Chris Wilson 2021-06-17  202  err_out:
563baae1875cbc Chris Wilson 2021-06-17  203  	i915_gem_object_put(obj);
563baae1875cbc Chris Wilson 2021-06-17  204  
563baae1875cbc Chris Wilson 2021-06-17  205  	return err;
563baae1875cbc Chris Wilson 2021-06-17  206  }
563baae1875cbc Chris Wilson 2021-06-17  207  

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

             reply	other threads:[~2021-12-18  0:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-18  0:37 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-02-10 14:28 drivers/gpu/drm/i915/gt/selftest_migrate.c:182 clear() error: uninitialized symbol 'rq' kernel test robot
2021-12-21 22:16 kernel test robot
2021-11-27 21:19 kernel test robot
2021-11-26  4:22 kernel test robot

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=202112180857.ODI140kE-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.