Skip to content
Commit 7da7b02e authored by Aashish Sharma's avatar Aashish Sharma Committed by Alex Deucher
Browse files

drm/amd/display: Fix unused-but-set-variable warning



Fix the kernel test robot warning below:

drivers/gpu/drm/amd/amdgpu/../display/dmub/inc/dmub_cmd.h:2893:12:
warning: variable 'temp' set but not used [-Wunused-but-set-variable]

Replaced the assignment to the unused temp variable with READ_ONCE()
macro to flush the writes. READ_ONCE() helps avoid the use of
volatile and makes it obvious from the code that the read here is
intentional. Also verified on x86 that the generated code is exactly the
same as before.

Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarAashish Sharma <shraash@google.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent a68bec2c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment