Skip to content

Commit

Permalink
drm/amdgpu: fix warning in scheduler
Browse files Browse the repository at this point in the history
This should never happen so warn when the count does
not equal the expected size.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Alex Deucher committed Sep 4, 2015
1 parent 270e869 commit 5134e99
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ static int amd_sched_main(void *param)
{
struct sched_param sparam = {.sched_priority = 1};
struct amd_gpu_scheduler *sched = (struct amd_gpu_scheduler *)param;
int r;
int r, count;

sched_setscheduler(current, SCHED_FIFO, &sparam);

Expand Down Expand Up @@ -361,7 +361,8 @@ static int amd_sched_main(void *param)
fence_put(fence);
}

kfifo_out(&entity->job_queue, &job, sizeof(job));
count = kfifo_out(&entity->job_queue, &job, sizeof(job));
WARN_ON(count != sizeof(job));
wake_up(&sched->job_scheduled);
}
return 0;
Expand Down

0 comments on commit 5134e99

Please sign in to comment.