diff options
author | Maíra Canal <maira.canal@usp.br> | 2022-02-22 10:16:55 -0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2022-02-23 14:03:20 -0500 |
commit | 23da6e0f7d5ebdba2b18ffcc228130a33d5411cc (patch) | |
tree | 4d8a7ef718cb664e73ffae6b3f34c16ae5d8083e /drivers/gpu/drm/amd/display/dmub/inc | |
parent | 78be946dad6d9f888726fbbb5de81b521f156c01 (diff) | |
download | linux-23da6e0f7d5ebdba2b18ffcc228130a33d5411cc.tar.gz linux-23da6e0f7d5ebdba2b18ffcc228130a33d5411cc.tar.bz2 linux-23da6e0f7d5ebdba2b18ffcc228130a33d5411cc.zip |
drm/amd/display: Remove unused temp variable
Remove unused temp variable from the dmub_rb_flush_pending function by
using arithmetic to remove the loop.
The -Wunused-but-set-variable warning was pointed out by Clang with the
following warning:
drivers/gpu/drm/amd/amdgpu/../display/dmub/inc/dmub_cmd.h:2921:12: warning:
variable 'temp' set but not used [-Wunused-but-set-variable]
uint64_t temp;
^
v2: squash in revert and comment update (Alex)
Signed-off-by: Maíra Canal <maira.canal@usp.br>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dmub/inc')
-rw-r--r-- | drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h b/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h index fb01ff49e655..cb92ab4c8b98 100644 --- a/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +++ b/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h @@ -2921,6 +2921,10 @@ static inline void dmub_rb_flush_pending(const struct dmub_rb *rb) uint64_t temp; uint8_t i; + /* Don't remove this. + * The contents need to actually be read from the ring buffer + * for this function to be effective. + */ for (i = 0; i < DMUB_RB_CMD_SIZE / sizeof(uint64_t); i++) temp = *data++; |