Repository navigation
drm/asahi: remove the items rustc reports as never used (-96) - #2433
Conversation
With every GPU backend enabled (G15, G16, G18, M5, M3_T8122), rustc reports 14 dead_code items in the driver. Eleven of them have no user in any build: CrashBuffers::Fixed (no table constructs it) and its match arm, Gpu::submit_m5_work, RenderIds::availability, ComputePool::completed_submissions, Lease::needs_release_observation, InitData::publish_work, InitData::m5_policy_telemetry_word, the render generation's retire, render_pool_owner, UatPageTable::visit_runs and m5_queue_configurations. Remove them. Three stay because a build outside the fleet config uses them: QueueSlot::cancel and Availability::notify_own (a KUnit test, built with CONFIG_KUNIT=y) and g16 board data::select (the asahi-m4 host selftest compiles that file). Signed-off-by: Ryan Murray <[email protected]>
|
No blockers. I grepped current integration/aurora (drivers/gpu/drm/asahi, tools, rust) for every removed item. None has a user outside its own definition:
HW row: none needed (removed items were unreachable; Assisted-by: LLM (Claude:Opus 5.5) |
|
Adversarial pass at f4db4c4: no blockers. Every removed name was checked against the tree, the other open pull requests and our kits, and nothing still uses it. Assisted-by: LLM (Claude:Opus 5.5) |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Formal §1–§6 pre-PR review at live head f4db4c48daf11 against live integration/aurora (70a00e583b03): APPROVE.
Verification Summary
- Scope, correctness & live-tree check: Not superseded and merges cleanly (
git merge-treeclean against liveintegration/aurora70a00e583b03and against open #24373c53d3e2095c). Independently verified acrossdrivers/,rust/, andtools/on70a00e583b03that all 11 removed items (CrashBuffers::Fixed+ match arm,Firmware::submit_m5_work,RenderIds::availability,ComputePool::completed_submissions,Lease::needs_release_observation,InitData::publish_work,InitData::m5_policy_telemetry_word,Generation::retire,Vm::render_pool_owner,UatPageTable::visit_runs,G17Resources::m5_queue_configurations) have zero callers and that the updated doc comments ing17/mod.rs,g17/initdata.rs, andg17/runtime.rsresolve cleanly on the merged tree. - §1–§3 (No model gating / production-ready / safety): PASS — unreachable dead-code removal only (-96 lines), no behavioral change.
- §4 (Clean-room & attribution): PASS — commit
f4db4c48daf11carries human author/committer + humanSigned-off-by:only (zero AI trailers); PR body carriesAssisted-by:. - §5 (Evidence): PASS — full fleet config build (
G15/G16/G18/M5/M3_T8122),CONFIG_KUNIT=ybuild, and byte-identicalaurora.o.modinfodocumented; no hardware row needed for unreachable dead code. - §6 (Naming & live CI): PASS — live CI
host-testsis green onf4db4c48daf11(only workflow triggered fordrivers/gpu/drm/asahi/**). - Minor non-blocking note: the commit message refers to
Gpu::submit_m5_work, whereas the removed method ing17/mod.rsisFirmware::submit_m5_work(also removed cleanly by open #2437).
Assisted-by: LLM (Gemini 4 Neon)
|
Merge readiness at
Areas: Updated by pr-readiness on every push, edit and review, and every 30 minutes. Rules: merge policy · labels. |
|
Verdict at Blockers: None. Testing: No runtime change. I checked all 11 removed items against the PR parent and current main. No caller references the deleted methods, and neither tree constructs the removed internal enum variant. The target retirement and register submission methods with similar names remain in use and remain in the tree. Exact hosted host-tests passed. |
Problem
A fleet-config build of drm/asahi, with every GPU backend on, prints 14
dead_codewarnings. Most are methods left behind as the G17/M5 code moved on.Change
Remove the 11 that nothing uses in any build (net -96 lines):
CrashBuffers::Fixedand its match arm (no hw table constructs it)Gpu::submit_m5_work,RenderIds::availability,ComputePool::completed_submissions,Lease::needs_release_observationInitData::publish_workandInitData::m5_policy_telemetry_wordretire,render_pool_owner,UatPageTable::visit_runsandm5_queue_configurationsKeep three that rustc flags but another build uses:
QueueSlot::cancelandAvailability::notify_own: theasahi_g17_queue_slot_cancelKUnit test, which is only built withCONFIG_KUNIT=y.data::select: the asahi-m4 host selftesttest-perf.pycompiles that file.Most of the removed items came from the M5 bring-up commits (9b1f778, b311814, 524c575, c75d823, 0668eca, 476cf7f), and
Fixedfrom 9038ef8.Testing
make Image modules dtbsRC=0, 5,909 modules, modpost reports no undefined symbols, and the only warnings are ones the baseline already had in untouched files.make drivers/gpu/drm/asahi/: RC=0. The dead_code warnings go from 14 to 3 (exactly the kept items), with no new warnings..modinfoof aurora.o is byte-identical to the baseline.CONFIG_KUNIT=y(all asahi#[kunit_tests]modules compiled): RC=0.Still to run
Nothing hardware-side. No removed item was reachable.