drm/i915: introduce range_overflows utility macros
authorMatthew Auld <matthew.auld@intel.com>
Tue, 13 Dec 2016 20:32:21 +0000 (20:32 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 16 Dec 2016 21:19:16 +0000 (21:19 +0000)
commit86e61735710902535ebd00decc035f5e129a377e
tree05f21a053245ed8728e903fab750fbfc3f6a8dac
parent7a0499a4b8c2e6850256b1d86c87d2deddce99b0
drm/i915: introduce range_overflows utility macros

In a number places we hand-roll the overflow sanity check for ranges, so
roll that into single macro, conceived by Chris, along with its typed
variant.

Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161213203222.32564-3-matthew.auld@intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/i915_drv.h