mirror of
https://github.com/torvalds/linux.git
synced 2026-04-30 04:22:32 -04:00
drm/amdgpu: refine the scheduler job type conversion
Use container_of rather than casting. Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: David Zhou <david1.zhou@amd.com> Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
4c7eb91cae
commit
a6db8a33e1
@@ -1277,6 +1277,8 @@ struct amdgpu_job {
|
||||
struct amdgpu_user_fence uf;
|
||||
int (*free_job)(struct amdgpu_job *job);
|
||||
};
|
||||
#define to_amdgpu_job(sched_job) \
|
||||
container_of((sched_job), struct amdgpu_job, base)
|
||||
|
||||
static inline u32 amdgpu_get_ib_value(struct amdgpu_cs_parser *p, uint32_t ib_idx, int idx)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user