]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Tidy the tail of i915_tiling_ok()
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 3 Feb 2017 11:50:35 +0000 (11:50 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 3 Feb 2017 15:52:56 +0000 (15:52 +0000)
commit6996c475307f8d39ed920b8cb83e79a0e147a460
tree1f50a376d428e7f3b1959060bf3fe21787dece90
parent1858c63bcf5c62117b0eec9ddbe8fa39a7e247f4
drm/i915: Tidy the tail of i915_tiling_ok()

The current tail breaks the pattern of if (check) return false, which
can catch the reader out. If we move the gen2/3 power-of-two test into
the earlier gen2/3 branch, we can eliminate the contrary tail.

Suggested-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170203115036.24743-1-chris@chris-wilson.co.uk
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
drivers/gpu/drm/i915/i915_gem_tiling.c