Skip to content

Commit 9073e5b

Browse files
committed
drm/i915: Fix off-by-one in reporting hanging process
ffs() is 1-indexed, but we want to use it as an index into an array, so use __ffs() instead. Fixes: eb8d0f5 ("drm/i915: Remove GPU reset dependence on struct_mutex") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190315163933.19352-1-chris@chris-wilson.co.uk
1 parent f19d90e commit 9073e5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/i915/i915_gpu_error.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1656,7 +1656,7 @@ error_msg(struct i915_gpu_state *error, unsigned long engines, const char *msg)
16561656
i915_error_generate_code(error, engines));
16571657
if (engines) {
16581658
/* Just show the first executing process, more is confusing */
1659-
i = ffs(engines);
1659+
i = __ffs(engines);
16601660
len += scnprintf(error->error_msg + len,
16611661
sizeof(error->error_msg) - len,
16621662
", in %s [%d]",

0 commit comments

Comments
 (0)