]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/amd/powerplay: Use bitwise instead of arithmetic operator for flags
authorChen Zhou <chenzhou10@huawei.com>
Fri, 21 Feb 2020 12:21:39 +0000 (20:21 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 26 Feb 2020 19:17:33 +0000 (14:17 -0500)
This silences the following coccinelle warning:

"WARNING: sum of probable bitmasks, consider |"

Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c

index 92a65e3daff4bd7405ed6c6e06775c45d99a1968..f29f95be1e56288d7d8affe84de74f4776d26cff 100644 (file)
@@ -3382,7 +3382,7 @@ static int vega10_populate_and_upload_sclk_mclk_dpm_levels(
        }
 
        if (data->need_update_dpm_table &
-                       (DPMTABLE_OD_UPDATE_SCLK + DPMTABLE_UPDATE_SCLK + DPMTABLE_UPDATE_SOCCLK)) {
+                       (DPMTABLE_OD_UPDATE_SCLK | DPMTABLE_UPDATE_SCLK | DPMTABLE_UPDATE_SOCCLK)) {
                result = vega10_populate_all_graphic_levels(hwmgr);
                PP_ASSERT_WITH_CODE((0 == result),
                                "Failed to populate SCLK during PopulateNewDPMClocksStates Function!",
@@ -3390,7 +3390,7 @@ static int vega10_populate_and_upload_sclk_mclk_dpm_levels(
        }
 
        if (data->need_update_dpm_table &
-                       (DPMTABLE_OD_UPDATE_MCLK + DPMTABLE_UPDATE_MCLK)) {
+                       (DPMTABLE_OD_UPDATE_MCLK | DPMTABLE_UPDATE_MCLK)) {
                result = vega10_populate_all_memory_levels(hwmgr);
                PP_ASSERT_WITH_CODE((0 == result),
                                "Failed to populate MCLK during PopulateNewDPMClocksStates Function!",