Repository navigation
drm/asahi: gate G17 KUnit helpers on built-in KUnit - #492
Conversation
The kunit_tests macro compiles its test modules only when CONFIG_KUNIT is y. With CONFIG_KUNIT=m the four test-only G17 helpers remain compiled and produce dead-code warnings, breaking a CONFIG_WERROR build. Use the same built-in KUnit condition for the helpers as for their callers. Fixes: a36e352 ("drm/asahi: size the G17 compute QID budget by open logical queues") Fixes: 014605a ("drm/asahi: add G17 resource wait domains and use them for queue creation") Fixes: 64f717d ("drm/asahi: wait for G17 compute capacity on the release that frees it") Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Thanks for catching this. These four constructors come from my #423 test commits, and gating them on Part of your pending verification:
The same four helpers are in omacom #229, so it gets the same fix. |
|
Shipping-combination build result. I built
A separate WERROR problem with 1.99.0. Both builds above pass |
The shipping Asahi configuration uses CONFIG_KUNIT=m. Four G17 helpers compile under that setting although their only callers are inside #[kunit_tests], whose macro requires CONFIG_KUNIT="y". CONFIG_WERROR=y then rejects the unused items.
Gate the helpers on the same built-in-KUnit setting as their callers. Built-in KUnit retains the helpers; production behavior is unchanged. Introduced by a36e352, 014605a, and 64f717d in linux #423.
Validation of this exact source tree (a668914cb2e6; original buildbox fix 5135c9d4 and published 91c4792 have identical trees):
The author's Rust 1.99 targeted build reproduces the four errors without this fix and builds with it using KRUSTFLAGS=-Adeprecated. Without that override it reports 12 deprecation errors. Ten fetch_update call sites already exist in pre-merge af80fbe; the arm64 minimum Rust remains 1.85. The direct unqualified pass above is for Rust 1.97.1 and does not claim Rust 1.99 compatibility.
Ready for review. This fix alone does not clear the separate distro qualification hold.