]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gt: Rearrange code to silence compiler
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 17 Feb 2020 09:58:35 +0000 (09:58 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 17 Feb 2020 11:42:10 +0000 (11:42 +0000)
commit52e742f2bee4134f26098d75b796b0408eeee327
treebf3e6f2f51c6029ffbf99abf70a72a9f3b7fa7ef
parente2ff39c52e810b83001e413bd87e193213b3ba2c
drm/i915/gt: Rearrange code to silence compiler

Without selftests enabled, I915_SELFTEST_ONLY becomes a dummy,
generating a bare '0'. This causes the compiler to complain about a
useless line, and while we could use I915_SELFTEST_DECLARE instead, it
is a bit messier. Move the selftest-only code to a helper and make that
conditional on having selftests enabled.

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200217095835.599827-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_lrc.c