Skip to content

Commit a54e463

Browse files
pchelkin91alexdeucher
authored andcommitted
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: 3bace35 ("drm/amd/powerplay: add hardware manager sub-component") Signed-off-by: Fedor Pchelkin <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 14b2d71 commit a54e463

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ int phm_wait_on_indirect_register(struct pp_hwmgr *hwmgr,
149149
}
150150

151151
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);
153153
}
154154

155155
int phm_wait_for_register_unequal(struct pp_hwmgr *hwmgr,

0 commit comments

Comments
 (0)