From: Alex Deucher Date: Fri, 4 Sep 2015 04:11:54 +0000 (-0400) Subject: drm/amdgpu: fix warning in scheduler X-Git-Tag: v4.14-rc1~4701^2~4^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5134e999cb72c621f48305d5c201ab30156505c1;p=platform%2Fkernel%2Flinux-rpi.git drm/amdgpu: fix warning in scheduler This should never happen so warn when the count does not equal the expected size. Reviewed-by: Christian König Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c index ab8577f..9259f1b 100644 --- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c +++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c @@ -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); @@ -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;