]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Widen return value for reservation_object_wait_timeout_rcu to long.
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Tue, 8 Dec 2015 14:52:56 +0000 (15:52 +0100)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Mon, 11 Jan 2016 07:30:02 +0000 (08:30 +0100)
commit3a2757ad0705b946736e326ad4b86b71cc484e7f
treee2cab7f6c4d6fcedfc29676950510e428e1f443d
parentc6ac56ecdd128a9ddb4bbd12ad7fe55e55ab1390
drm/i915: Widen return value for reservation_object_wait_timeout_rcu to long.

This fixes a spurious warning from an integer overflow on 64-bits systems.
The function may return MAX_SCHEDULE_TIMEOUT which gets truncated to -1.

Explicitly handling this by casting to lret fixes it.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reported-and-tested-by: Joseph Yasi <joe.yasi@gmail.com>
Tested-by: Andreas Reis <andreas.reis@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: drm-intel-fixes@lists.freedesktop.org
Fixes: eb757b18290d73 ("i915: wait for fence in prepare_plane_fb")
Link: http://patchwork.freedesktop.org/patch/msgid/5666EEC8.2000403@linux.intel.com
drivers/gpu/drm/i915/intel_display.c