]> 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)
commitc2d26f307a5f48ed17d5d29ea56084532a10935c
tree1f50a376d428e7f3b1959060bf3fe21787dece90
parentb5d3e74797fdaeb7dd1abb12e03255e91f32fc0e
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