OSDN Git Service

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)
commita3a1e5336c41ab3763c64152df5f868cb91d20bf
tree1f50a376d428e7f3b1959060bf3fe21787dece90
parent52da22e7aba155be238faff4f6e97b2eb9de64f3
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