drm/i915: use check_add_overflow() and drop local variants
authorJani Nikula <jani.nikula@intel.com>
Fri, 5 Apr 2024 20:26:25 +0000 (23:26 +0300)
committerJani Nikula <jani.nikula@intel.com>
Tue, 9 Apr 2024 08:49:32 +0000 (11:49 +0300)
commitfdac5a10b407c9c454154432d62deafead0f7ef1
tree8e23e164cffa2953b74d154386bf5102d116e119
parent860cefce5ebe6eedf514ef9fa2b2bf6d4d172773
drm/i915: use check_add_overflow() and drop local variants

Prefer common check_add_overflow() from overflow.h over the locally
rolled versions of it. While check_add_overflow() does require a
variable to assign to, unlike add_overflows_t(), it's still better than
having multiple versions around.

Cc: Kees Cook <keescook@chromium.org>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240405202625.2525671-1-jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_fb.c
drivers/gpu/drm/i915/i915_utils.h