* [intel-lts:5.10/yocto 16710/20136] drivers/gpu/drm/i915/gt/selftest_hangcheck.c:455:62: error: variable 'err' is uninitialized when used here
@ 2022-01-04 9:08 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-01-04 9:08 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 6217 bytes --]
Hi John,
FYI, the error/warning still remains.
tree: https://github.com/intel/linux-intel-lts.git 5.10/yocto
head: a5d0f27b67d05c962c648e7c913a41c9b34c9853
commit: b5bc9bd2375158f0555719ab4618868aa482d951 [16710/20136] drm/i915/selftest: Better error reporting from hangcheck selftest
config: x86_64-randconfig-a014-20211123 (https://download.01.org/0day-ci/archive/20220104/202201041731.AfdrcjJ8-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 49e3838145dff1ec91c2e67a2cb562775c8d2a08)
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://github.com/intel/linux-intel-lts/commit/b5bc9bd2375158f0555719ab4618868aa482d951
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 5.10/yocto
git checkout b5bc9bd2375158f0555719ab4618868aa482d951
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
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:343: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:343: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(a)lists.01.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-01-04 9:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-04 9:08 [intel-lts:5.10/yocto 16710/20136] drivers/gpu/drm/i915/gt/selftest_hangcheck.c:455:62: error: variable 'err' is uninitialized when used here kernel test robot
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.