Hi Kees -
drivers/gpu/drm/i915/i915_utils.h has a handful of helper macros for checking range overflows: range_overflows(), range_overflows_t(), range_overflows_end(), and range_overflows_end_t(). Looks like the first one has also been copy-pasted to include/drm/drm_buddy.h. Feels like include/linux/overflow.h would be the right place for (some version of) them. Thoughts? BR, Jani. -- Jani Nikula, Intel
