Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/pm/powerplay/hwmgr/smu_helper: fix order of mask and value

There is a small typo in phm_wait_on_indirect_register().

Swap mask and value arguments provided to phm_wait_on_register() so that
they satisfy the function signature and actual usage scheme.

Found by Linux Verification Center (linuxtesting.org) with Svace static
analysis tool.

In practice this doesn't fix any issues because the only place this
function is used uses the same value for the value and mask.

Fixes: 3bace3591493 ("drm/amd/powerplay: add hardware manager sub-component")
Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Fedor Pchelkin and committed by
Alex Deucher
a54e4639 14b2d71a

+1 -1
+1 -1
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c
··· 149 149 } 150 150 151 151 cgs_write_register(hwmgr->device, indirect_port, index); 152 - return phm_wait_on_register(hwmgr, indirect_port + 1, mask, value); 152 + return phm_wait_on_register(hwmgr, indirect_port + 1, value, mask); 153 153 } 154 154 155 155 int phm_wait_for_register_unequal(struct pp_hwmgr *hwmgr,