]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd/pm/powerplay/hwmgr/smu_helper: fix order of mask and value
authorFedor Pchelkin <pchelkin@ispras.ru>
Mon, 30 Jun 2025 20:26:17 +0000 (23:26 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 7 Jul 2025 17:47:02 +0000 (13:47 -0400)
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>
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c

index 79a566f3564a57858696cec243a9483d7d9c5d64..c305ea4ec17d21467f9c460af49b6d99421d6321 100644 (file)
@@ -149,7 +149,7 @@ int phm_wait_on_indirect_register(struct pp_hwmgr *hwmgr,
        }
 
        cgs_write_register(hwmgr->device, indirect_port, index);
-       return phm_wait_on_register(hwmgr, indirect_port + 1, mask, value);
+       return phm_wait_on_register(hwmgr, indirect_port + 1, value, mask);
 }
 
 int phm_wait_for_register_unequal(struct pp_hwmgr *hwmgr,