drm/amd/powerplay: fix warning of cast to pointer from integer of different size.
authorrezhu <Rex.Zhu@amd.com>
Thu, 12 Nov 2015 08:40:50 +0000 (16:40 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 21 Dec 2015 21:42:38 +0000 (16:42 -0500)
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.c
drivers/gpu/drm/amd/powerplay/eventmgr/psm.c
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c

index fdd67c6..618aadf 100644 (file)
@@ -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
+}
index 82774ac..5740fbf 100644 (file)
@@ -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;
 }
index f243e40..618cc4d 100644 (file)
@@ -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;