]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Swap ret and status returned from skl_pcode_request
authorStanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Mon, 11 Apr 2022 08:13:43 +0000 (11:13 +0300)
committerStanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Mon, 11 Apr 2022 13:47:08 +0000 (16:47 +0300)
commit0af33decf9292f8f1273cc4e32645117afb304bf
treec270f858eee8550a11d8433ee185a1fc98f227d3
parent5fd42b9492f716dbae7e266e1b02d8f73b63e78f
drm/i915: Swap ret and status returned from skl_pcode_request

If ret isn't zero, it is almost for sure ETIMEDOUT, because
we use it in wait_for macro which does continuous retries
until timeout is reached. If we still ran out of time and
retries, we most likely would be interested in getting status,
to understand what was the actual error propagated from PCode,
rather than to find out that we had a time out, which is anyway
quite obvious, if the function fails.

v2: Make it status ? status : ret(thanks Vinod for the hint)

Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220411081343.18099-1-stanislav.lisovskiy@intel.com
drivers/gpu/drm/i915/intel_pcode.c