From: rezhu Date: Thu, 12 Nov 2015 08:40:50 +0000 (+0800) Subject: drm/amd/powerplay: fix warning of cast to pointer from integer of different size. X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=09b7a9862222c44945c936f1c4f017b4cda1eaa1;p=openwrt%2Fstaging%2Fblogic.git drm/amd/powerplay: fix warning of cast to pointer from integer of different size. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.c b/drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.c index fdd67c65c724..618aadf14cff 100644 --- a/drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.c +++ b/drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.c @@ -402,7 +402,7 @@ restart_search: event_data->pnew_power_state = state; return 0; } - state = (struct pp_power_state *)((uint64_t)state + hwmgr->ps_size); + state = (struct pp_power_state *)((unsigned long)state + hwmgr->ps_size); } switch (event_data->requested_ui_label) { @@ -428,4 +428,4 @@ int pem_task_initialize_thermal_controller(struct pp_eventmgr *eventmgr, struct int pem_task_uninitialize_thermal_controller(struct pp_eventmgr *eventmgr, struct pem_event_data *event_data) { return phm_stop_thermal_controller(eventmgr->hwmgr); -} \ No newline at end of file +} diff --git a/drivers/gpu/drm/amd/powerplay/eventmgr/psm.c b/drivers/gpu/drm/amd/powerplay/eventmgr/psm.c index 82774ace8bdb..5740fbfcbeab 100644 --- a/drivers/gpu/drm/amd/powerplay/eventmgr/psm.c +++ b/drivers/gpu/drm/amd/powerplay/eventmgr/psm.c @@ -37,7 +37,7 @@ int psm_get_ui_state(struct pp_eventmgr *eventmgr, enum PP_StateUILabel ui_label *state_id = state->id; return 0; } - state = (struct pp_power_state *)((uint64_t)state + hwmgr->ps_size); + state = (struct pp_power_state *)((unsigned long)state + hwmgr->ps_size); } return -1; } @@ -57,7 +57,7 @@ int psm_get_state_by_classification(struct pp_eventmgr *eventmgr, enum PP_StateC *state_id = state->id; return 0; } - state = (struct pp_power_state *)((uint64_t)state + hwmgr->ps_size); + state = (struct pp_power_state *)((unsigned long)state + hwmgr->ps_size); } return -1; } @@ -77,7 +77,7 @@ int psm_set_performance_states(struct pp_eventmgr *eventmgr, unsigned long *stat hwmgr->request_ps = state; return 0; } - state = (struct pp_power_state *)((uint64_t)state + hwmgr->ps_size); + state = (struct pp_power_state *)((unsigned long)state + hwmgr->ps_size); } return -1; } diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c index f243e40ed158..618cc4d9d7aa 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c @@ -121,7 +121,7 @@ int hw_init_power_state_table(struct pp_hwmgr *hwmgr) if (state->classification.flags & PP_StateClassificationFlag_Uvd) hwmgr->uvd_ps = state; - state = (struct pp_power_state *)((uint64_t)state + size); + state = (struct pp_power_state *)((unsigned long)state + size); } return 0;