Please ignore this patch since i found there was already fix for this. Regards, Evan >-----Original Message----- >From: Evan Quan [mailto:evan.quan at amd.com] >Sent: Thursday, January 04, 2018 10:55 AM >To: amd-gfx at lists.freedesktop.org >Cc: Quan, Evan <Evan.Quan at amd.com> >Subject: [PATCH] drm/amd/powerplay: fix compile warning > >drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/hardwaremanager.c: In >function 'phm_start_thermal_controller': >drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/hardwaremanager.c:231:9: >warning: braces around scalar initializer [enabled by default] > struct PP_TemperatureRange range = {{TEMP_RANGE_MIN, TEMP_RANGE_MAX}}; > ^ >drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/hardwaremanager.c:231:9: >warning: (near initialization for 'range.min') [enabled by default] >drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/hardwaremanager.c:231:9: >warning: excess elements in scalar initializer [enabled by default] >drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/hardwaremanager.c:231:9: >warning: (near initialization for 'range.min') [enabled by default] > >Change-Id: I321ef2f0c5fe3ff27c0414145b53c0e0250bf837 >Signed-off-by: Evan Quan <evan.quan at amd.com> >--- > drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c >b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c >index 84e1cb0..fdd2c05 100644 >--- a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c >+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c >@@ -228,7 +228,7 @@ int phm_register_thermal_interrupt(struct pp_hwmgr *hwmgr, >const void *info) > int phm_start_thermal_controller(struct pp_hwmgr *hwmgr) > { > int ret = 0; >- struct PP_TemperatureRange range = {{TEMP_RANGE_MIN, TEMP_RANGE_MAX}}; >+ struct PP_TemperatureRange range = {TEMP_RANGE_MIN, TEMP_RANGE_MAX}; > > if (hwmgr->hwmgr_func->get_thermal_temperature_range) > hwmgr->hwmgr_func->get_thermal_temperature_range( >-- >2.7.4