From: Evan Quan Date: Wed, 5 Sep 2018 02:03:13 +0000 (+0800) Subject: drm/amd/powerplay: fix compile warning for wrong data type V2 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=28968375a7ec95562e402b43f795e04fd320ae18;p=openwrt%2Fstaging%2Fblogic.git drm/amd/powerplay: fix compile warning for wrong data type V2 do_div expects the 1st argument in 64bit instead of 32bit. Drop the usage of do_div as it seems unnecessary. V2: drop usage of do_div completely Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c index 3efd59e984a3..1e65ac01e0f5 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c @@ -1195,7 +1195,7 @@ static int vega20_set_sclk_od( int ret = 0; od_sclk = golden_sclk_table->dpm_levels[golden_sclk_table->count - 1].value * value; - do_div(od_sclk, 100); + od_sclk /= 100; od_sclk += golden_sclk_table->dpm_levels[golden_sclk_table->count - 1].value; ret = vega20_od8_set_settings(hwmgr, OD8_SETTING_GFXCLK_FMAX, od_sclk); @@ -1242,7 +1242,7 @@ static int vega20_set_mclk_od( int ret = 0; od_mclk = golden_mclk_table->dpm_levels[golden_mclk_table->count - 1].value * value; - do_div(od_mclk, 100); + od_mclk /= 100; od_mclk += golden_mclk_table->dpm_levels[golden_mclk_table->count - 1].value; ret = vega20_od8_set_settings(hwmgr, OD8_SETTING_UCLK_FMAX, od_mclk);