mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-07 10:24:01 -04:00
drm/amd/powerplay: precedence bug in init_non_clock_fields()
The cast to uint8_t happens before the right shift so this always sets
.m3arb to zero. The cast is actually a no-op so we can remove it.
Fixes: 3bace35914 ('drm/amd/powerplay: add hardware manager sub-component')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
b92c26d180
commit
7c9574f262
@@ -735,8 +735,8 @@ static int init_non_clock_fields(struct pp_hwmgr *hwmgr,
|
||||
|
||||
ps->memory.dllOff = (0 != tmp);
|
||||
|
||||
ps->memory.m3arb = (uint8_t)(le32_to_cpu(pnon_clock_info->ulCapsAndSettings) &
|
||||
ATOM_PPLIB_M3ARB_MASK) >> ATOM_PPLIB_M3ARB_SHIFT;
|
||||
ps->memory.m3arb = (le32_to_cpu(pnon_clock_info->ulCapsAndSettings) &
|
||||
ATOM_PPLIB_M3ARB_MASK) >> ATOM_PPLIB_M3ARB_SHIFT;
|
||||
|
||||
ps->temperatures.min = PP_TEMPERATURE_UNITS_PER_CENTIGRADES *
|
||||
pnon_clock_info->ucMinTemperature;
|
||||
|
||||
Reference in New Issue
Block a user