drm/amd/pm/powerplay/hwmgr: use bitwise or for bitmasks addition
For bit mask addition, it is recommended to use or operator "|" instead of numerical addition as the former is quicker and cleaner. Change suggested by orplus.cocci Coccinelle semantic patch. Reviewed-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Deepak R Varma <drv@mailo.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
4e18550266
commit
d3d3b89451
|
@ -4203,7 +4203,7 @@ static int smu7_freeze_sclk_mclk_dpm(struct pp_hwmgr *hwmgr)
|
|||
|
||||
if ((0 == data->sclk_dpm_key_disabled) &&
|
||||
(data->need_update_smu7_dpm_table &
|
||||
(DPMTABLE_OD_UPDATE_SCLK + DPMTABLE_UPDATE_SCLK))) {
|
||||
(DPMTABLE_OD_UPDATE_SCLK | DPMTABLE_UPDATE_SCLK))) {
|
||||
PP_ASSERT_WITH_CODE(true == smum_is_dpm_running(hwmgr),
|
||||
"Trying to freeze SCLK DPM when DPM is disabled",
|
||||
);
|
||||
|
@ -4260,7 +4260,7 @@ static int smu7_populate_and_upload_sclk_mclk_dpm_levels(
|
|||
}
|
||||
|
||||
if (data->need_update_smu7_dpm_table &
|
||||
(DPMTABLE_OD_UPDATE_SCLK + DPMTABLE_UPDATE_SCLK)) {
|
||||
(DPMTABLE_OD_UPDATE_SCLK | DPMTABLE_UPDATE_SCLK)) {
|
||||
result = smum_populate_all_graphic_levels(hwmgr);
|
||||
PP_ASSERT_WITH_CODE((0 == result),
|
||||
"Failed to populate SCLK during PopulateNewDPMClocksStates Function!",
|
||||
|
@ -4268,7 +4268,7 @@ static int smu7_populate_and_upload_sclk_mclk_dpm_levels(
|
|||
}
|
||||
|
||||
if (data->need_update_smu7_dpm_table &
|
||||
(DPMTABLE_OD_UPDATE_MCLK + DPMTABLE_UPDATE_MCLK)) {
|
||||
(DPMTABLE_OD_UPDATE_MCLK | DPMTABLE_UPDATE_MCLK)) {
|
||||
/*populate MCLK dpm table to SMU7 */
|
||||
result = smum_populate_all_memory_levels(hwmgr);
|
||||
PP_ASSERT_WITH_CODE((0 == result),
|
||||
|
@ -4359,7 +4359,7 @@ static int smu7_unfreeze_sclk_mclk_dpm(struct pp_hwmgr *hwmgr)
|
|||
|
||||
if ((0 == data->sclk_dpm_key_disabled) &&
|
||||
(data->need_update_smu7_dpm_table &
|
||||
(DPMTABLE_OD_UPDATE_SCLK + DPMTABLE_UPDATE_SCLK))) {
|
||||
(DPMTABLE_OD_UPDATE_SCLK | DPMTABLE_UPDATE_SCLK))) {
|
||||
|
||||
PP_ASSERT_WITH_CODE(true == smum_is_dpm_running(hwmgr),
|
||||
"Trying to Unfreeze SCLK DPM when DPM is disabled",
|
||||
|
|
Loading…
Reference in New Issue