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>
{
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);
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;