From 09b7a9862222c44945c936f1c4f017b4cda1eaa1 Mon Sep 17 00:00:00 2001 From: rezhu Date: Thu, 12 Nov 2015 16:40:50 +0800 Subject: [PATCH] drm/amd/powerplay: fix warning of cast to pointer from integer of different size. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.c | 4 ++-- drivers/gpu/drm/amd/powerplay/eventmgr/psm.c | 6 +++--- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) 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; -- 2.20.1