Re: [PATCH 3/4] drm/sched: Remove to_drm_sched_job internal helper

2025-01-21 Thread Tvrtko Ursulin
On 20/01/2025 17:17, Danilo Krummrich wrote: On Mon, Jan 20, 2025 at 04:52:39PM +, Tvrtko Ursulin wrote: The code assumes queue node is the first element in struct drm_sched_job. I'd add that this assumption lies in doing the NULL check after the container_of(). Without saying that, it m

[PATCH 3/4] drm/sched: Remove to_drm_sched_job internal helper

2025-01-21 Thread Tvrtko Ursulin
The code assumes queue node is the first element in struct drm_sched_job. Since this is not documented it can be very fragile so lets just remove the internal helper and explicitly check for "nothing dequeued", before converting the node to a sched job. Signed-off-by: Tvrtko Ursulin Cc: Christian

Re: [PATCH 3/4] drm/sched: Remove to_drm_sched_job internal helper

2025-01-20 Thread Danilo Krummrich
On Mon, Jan 20, 2025 at 04:52:39PM +, Tvrtko Ursulin wrote: > The code assumes queue node is the first element in struct > drm_sched_job. I'd add that this assumption lies in doing the NULL check after the container_of(). Without saying that, it might not be that obvious. > Since this is not