* [linux-next:master 3464/7963] drivers/gpu/drm/i915/gt/selftest_hangcheck.c:455:62: error: variable 'err' is uninitialized when used here
@ 2021-08-14 13:33 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-08-14 13:33 UTC (permalink / raw)
To: John Harrison
Cc: clang-built-linux, kbuild-all, Linux Memory Management List,
Matthew Brost
[-- Attachment #1: Type: text/plain, Size: 5956 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 4b358aabb93a2c654cd1dcab1a25a589f6e2b153
commit: 3f5dff6c18aa0473158686f363184a1bdae0116b [3464/7963] drm/i915/selftest: Better error reporting from hangcheck selftest
config: x86_64-randconfig-a011-20210814 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 62df4df41c939205b2dc0a2a3bfb75b8c1ed74fa)
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/next/linux-next.git/commit/?id=3f5dff6c18aa0473158686f363184a1bdae0116b
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 3f5dff6c18aa0473158686f363184a1bdae0116b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/gpu/drm/i915/gt/intel_reset.c:1514:
>> drivers/gpu/drm/i915/gt/selftest_hangcheck.c:455:62: error: variable 'err' is uninitialized when used here [-Werror,-Wuninitialized]
pr_err("[%s] Create context failed: %d!\n", engine->name, err);
^~~
include/linux/printk.h:390:33: note: expanded from macro 'pr_err'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~
drivers/gpu/drm/i915/gt/selftest_hangcheck.c:451:10: note: initialize the variable 'err' to silence this warning
int err;
^
= 0
drivers/gpu/drm/i915/gt/selftest_hangcheck.c:566:62: error: variable 'err' is uninitialized when used here [-Werror,-Wuninitialized]
pr_err("[%s] Create context failed: %d!\n", engine->name, err);
^~~
include/linux/printk.h:390:33: note: expanded from macro 'pr_err'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~
drivers/gpu/drm/i915/gt/selftest_hangcheck.c:562:10: note: initialize the variable 'err' to silence this warning
int err;
^
= 0
2 errors generated.
vim +/err +455 drivers/gpu/drm/i915/gt/selftest_hangcheck.c
434
435 static int igt_reset_nop_engine(void *arg)
436 {
437 struct intel_gt *gt = arg;
438 struct i915_gpu_error *global = >->i915->gpu_error;
439 struct intel_engine_cs *engine;
440 enum intel_engine_id id;
441
442 /* Check that we can engine-reset during non-user portions */
443
444 if (!intel_has_reset_engine(gt))
445 return 0;
446
447 for_each_engine(engine, gt, id) {
448 unsigned int reset_count, reset_engine_count, count;
449 struct intel_context *ce;
450 IGT_TIMEOUT(end_time);
451 int err;
452
453 ce = intel_context_create(engine);
454 if (IS_ERR(ce)) {
> 455 pr_err("[%s] Create context failed: %d!\n", engine->name, err);
456 return PTR_ERR(ce);
457 }
458
459 reset_count = i915_reset_count(global);
460 reset_engine_count = i915_reset_engine_count(global, engine);
461 count = 0;
462
463 st_engine_heartbeat_disable(engine);
464 set_bit(I915_RESET_ENGINE + id, >->reset.flags);
465 do {
466 int i;
467
468 if (!wait_for_idle(engine)) {
469 pr_err("%s failed to idle before reset\n",
470 engine->name);
471 err = -EIO;
472 break;
473 }
474
475 for (i = 0; i < 16; i++) {
476 struct i915_request *rq;
477
478 rq = intel_context_create_request(ce);
479 if (IS_ERR(rq)) {
480 struct drm_printer p =
481 drm_info_printer(gt->i915->drm.dev);
482 intel_engine_dump(engine, &p,
483 "%s(%s): failed to submit request\n",
484 __func__,
485 engine->name);
486
487 GEM_TRACE("%s(%s): failed to submit request\n",
488 __func__,
489 engine->name);
490 GEM_TRACE_DUMP();
491
492 intel_gt_set_wedged(gt);
493
494 err = PTR_ERR(rq);
495 break;
496 }
497
498 i915_request_add(rq);
499 }
500 err = intel_engine_reset(engine, NULL);
501 if (err) {
502 pr_err("intel_engine_reset(%s) failed, err:%d\n",
503 engine->name, err);
504 break;
505 }
506
507 if (i915_reset_count(global) != reset_count) {
508 pr_err("Full GPU reset recorded! (engine reset expected)\n");
509 err = -EINVAL;
510 break;
511 }
512
513 if (i915_reset_engine_count(global, engine) !=
514 reset_engine_count + ++count) {
515 pr_err("%s engine reset not recorded!\n",
516 engine->name);
517 err = -EINVAL;
518 break;
519 }
520 } while (time_before(jiffies, end_time));
521 clear_bit(I915_RESET_ENGINE + id, >->reset.flags);
522 st_engine_heartbeat_enable(engine);
523
524 pr_info("%s(%s): %d resets\n", __func__, engine->name, count);
525
526 intel_context_put(ce);
527 if (igt_flush_test(gt->i915))
528 err = -EIO;
529 if (err)
530 return err;
531 }
532
533 return 0;
534 }
535
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 40601 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-08-14 13:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-14 13:33 [linux-next:master 3464/7963] drivers/gpu/drm/i915/gt/selftest_hangcheck.c:455:62: error: variable 'err' is uninitialized when used here kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox