]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/selftests: Silence the compiler for impossible errors
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 17 Oct 2017 10:37:23 +0000 (11:37 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 17 Oct 2017 13:07:47 +0000 (14:07 +0100)
commit61a30f26d0f9800d4653b7a1b8ae548f7807435b
tree90e90207d8b4b93dffddc3e49dfed00dfdac649d
parent1cc10b004c71eb54311083f9dc9ad97c02d7794b
drm/i915/selftests: Silence the compiler for impossible errors

It should be impossible for these tests not to run due to an empty
ppgtt, but if it should happen, let's report ENODEV (our typical
internal error for impossible events).

In file included from drivers/gpu/drm/i915/i915_gem.c:5415:
   drivers/gpu/drm/i915/selftests/huge_pages.c: In function 'igt_mock_ppgtt_huge_fill':
>> drivers/gpu/drm/i915/selftests/huge_pages.c:612: error: 'err' may be used uninitialized in this function
   drivers/gpu/drm/i915/selftests/huge_pages.c: In function 'igt_ppgtt_exhaust_huge':
   drivers/gpu/drm/i915/selftests/huge_pages.c:1159: error: 'err' may be used uninitialized in this function

Reported-by: kbuild-all@01.org
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171017103723.6933-1-chris@chris-wilson.co.uk
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
drivers/gpu/drm/i915/selftests/huge_pages.c