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/ttm/tests: fix lru_count ASSERT Date: Sun, 12 Apr 2026 11:28:14 +1000 Message-ID: In-Reply-To: <20260409111032.72141-2-matthew.auld@intel.com> References: <20260409111032.72141-2-matthew.auld@intel.com> <20260409111032.72141-2-matthew.auld@intel.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **The bug:** After pool initialization via `__list_lru_init -> init_one_lru= `, the LRU count for each node should be zero. The original assertion had a= spurious `!` negation: ```c KUNIT_ASSERT_FALSE(test, !list_lru_count(&pt.pages)); ``` `KUNIT_ASSERT_FALSE(test, !list_lru_count(...))` means "assert that `!count= ` is false", which is equivalent to "assert count is **non-zero**". That's = the opposite of what the test intended =E2=80=94 it should be verifying the= LRU is empty after initialization. **The fix:** Removing the `!` gives: ```c KUNIT_ASSERT_FALSE(test, list_lru_count(&pt.pages)); ``` This correctly asserts that `list_lru_count(&pt.pages)` is zero (falsy), ma= tching the expected post-init state. I confirmed that the kernel tree at `drivers/gpu/drm/ttm/tests/ttm_device_t= est.c:178-179` already has the corrected version (without the `!`), consist= ent with this fix having been applied on drm-next. **Minor style observation:** Using `KUNIT_ASSERT_EQ(test, list_lru_count(&p= t.pages), 0)` would make the intent unambiguous and avoid future confusion = with negation, but the existing form is fine and consistent with current te= st style. **Reviewed-by worthy:** Yes. The fix is correct, minimal, and well-describe= d. The `Fixes:` tag is appropriate (references `444e2a19d7fd` which ported = ttm/pool to list_lru and introduced this test). --- Generated by Claude Code Patch Reviewer