From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: drm/sched: Remove redundant entity->rq initialization and checks Date: Thu, 04 Jun 2026 12:41:19 +1000 Message-ID: In-Reply-To: <20260602153339.43453-1-tvrtko.ursulin@igalia.com> References: <20260602153339.43453-1-tvrtko.ursulin@igalia.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Overall Series Review Subject: drm/sched: Remove redundant entity->rq initialization and checks Author: Tvrtko Ursulin Patches: 3 Reviewed: 2026-06-04T12:41:19.912219 --- This is a single-patch cleanup that removes dead code from the DRM schedule= r. The analysis is correct: after commit 28c5bf28763d ("drm/sched: Disallow= initializing entities with no schedulers"), `drm_sched_entity_init()` vali= dates that `sched_list` is non-empty and non-NULL, then unconditionally set= s `entity->rq =3D &sched_list[0]->rq`. No code path in the scheduler ever s= ets `entity->rq` back to NULL after init. Therefore, the NULL checks in `ki= ll`, `flush`, and `job_init` are dead code. The patch also correctly identifies a latent bug in the removed dead code: = the `dev_err(job->sched->dev, ...)` in `drm_sched_job_init()` would derefer= ence `job->sched` before it has been initialized =E2=80=94 `job->sched` is = only assigned later in `drm_sched_job_arm()`, and the `memset(job, 0, ...)`= hasn't even run yet at that point, so `job->sched` is whatever garbage was= in the caller's allocation. The patch is correct and safe to apply, with one minor issue noted below. --- Generated by Claude Code Patch Reviewer