]> 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)
commitcf274daadd696170b2f6139a825430a1d8976b50
treebf3e6f2f51c6029ffbf99abf70a72a9f3b7fa7ef
parentc72e451e98c6f565106b7b005624fe4e2290a102
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