drm: Allow range of 0 for drm_mm_insert_node_in_range()
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 26 Jun 2019 09:43:30 +0000 (10:43 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 26 Jun 2019 20:13:12 +0000 (21:13 +0100)
commitc1a495a558536c5745c6449f7c04ba3cf40be9da
tree84a668dca5b928c1dbfffcef7672734e0a2656a9
parent848ed7d54246296f684a4b99546e20d0577aec72
drm: Allow range of 0 for drm_mm_insert_node_in_range()

We gracefully handle the caller specifying a zero range, so don't force
them to special case that condition if it naturally falls out of their
setup. What we don't check is if the end < start, so keep that as an
assert for an illegal call.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190626094330.3556-1-chris@chris-wilson.co.uk
drivers/gpu/drm/drm_mm.c