Commit 09b7a986 authored by rezhu's avatar rezhu Committed by Alex Deucher

drm/amd/powerplay: fix warning of cast to pointer from integer of different size.

Signed-off-by: default avatarRex Zhu <Rex.Zhu@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 9c0bad90
...@@ -402,7 +402,7 @@ int pem_task_create_user_performance_state(struct pp_eventmgr *eventmgr, struct ...@@ -402,7 +402,7 @@ int pem_task_create_user_performance_state(struct pp_eventmgr *eventmgr, struct
event_data->pnew_power_state = state; event_data->pnew_power_state = state;
return 0; 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) { switch (event_data->requested_ui_label) {
...@@ -428,4 +428,4 @@ int pem_task_initialize_thermal_controller(struct pp_eventmgr *eventmgr, struct ...@@ -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) int pem_task_uninitialize_thermal_controller(struct pp_eventmgr *eventmgr, struct pem_event_data *event_data)
{ {
return phm_stop_thermal_controller(eventmgr->hwmgr); return phm_stop_thermal_controller(eventmgr->hwmgr);
} }
\ No newline at end of file
...@@ -37,7 +37,7 @@ int psm_get_ui_state(struct pp_eventmgr *eventmgr, enum PP_StateUILabel ui_label ...@@ -37,7 +37,7 @@ int psm_get_ui_state(struct pp_eventmgr *eventmgr, enum PP_StateUILabel ui_label
*state_id = state->id; *state_id = state->id;
return 0; 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; return -1;
} }
...@@ -57,7 +57,7 @@ int psm_get_state_by_classification(struct pp_eventmgr *eventmgr, enum PP_StateC ...@@ -57,7 +57,7 @@ int psm_get_state_by_classification(struct pp_eventmgr *eventmgr, enum PP_StateC
*state_id = state->id; *state_id = state->id;
return 0; 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; return -1;
} }
...@@ -77,7 +77,7 @@ int psm_set_performance_states(struct pp_eventmgr *eventmgr, unsigned long *stat ...@@ -77,7 +77,7 @@ int psm_set_performance_states(struct pp_eventmgr *eventmgr, unsigned long *stat
hwmgr->request_ps = state; hwmgr->request_ps = state;
return 0; 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; return -1;
} }
......
...@@ -121,7 +121,7 @@ int hw_init_power_state_table(struct pp_hwmgr *hwmgr) ...@@ -121,7 +121,7 @@ int hw_init_power_state_table(struct pp_hwmgr *hwmgr)
if (state->classification.flags & PP_StateClassificationFlag_Uvd) if (state->classification.flags & PP_StateClassificationFlag_Uvd)
hwmgr->uvd_ps = state; hwmgr->uvd_ps = state;
state = (struct pp_power_state *)((uint64_t)state + size); state = (struct pp_power_state *)((unsigned long)state + size);
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment