drm/i915: Simplify guard logic for setup_scratch_page()
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 29 Jan 2018 10:28:40 +0000 (10:28 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 29 Jan 2018 15:37:53 +0000 (15:37 +0000)
commit7fb9ee5db24a5892d3af8487de39d7b4a7fc2ea8
tree792f6f7f179463d837ceb1b89cf7eb3d5b5640f6
parent74c0167f8bcf02af8ff9f2677b2d85070ba7236d
drm/i915: Simplify guard logic for setup_scratch_page()

Older gcc is complaining it can't follow the guards and thinks that
addr may be used uninitialised

In the process, we can simplify down to one loop,
add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-131 (-131)
Function                                     old     new   delta
setup_scratch_page                           545     414    -131

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180129102840.19901-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_gtt.c