From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: kunit: Add documentation for warning backtrace suppression API Date: Sat, 16 May 2026 09:36:18 +1000 Message-ID: In-Reply-To: <20260515-kunit_add_support-v12-4-a216dc228be8@redhat.com> References: <20260515-kunit_add_support-v12-0-a216dc228be8@redhat.com> <20260515-kunit_add_support-v12-4-a216dc228be8@redhat.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review Documentation is clear and covers both API forms with examples. **1. Fixes a pre-existing missing newline at EOF:** ```c - } \ No newline at end of file + } ``` Minor bonus fix. **2. The documentation correctly notes the handle scope constraint:** ``` +.. note:: + The warning count must be checked inside the block; the suppression handle + is not accessible after the block exits. ``` This is important for users of the scoped API and is well-called-out. **3. The direct-function example shows count access after `kunit_end_suppress_warning`:** ```c + w = kunit_start_suppress_warning(test); + trigger_backtrace(); + kunit_end_suppress_warning(test, w); + + KUNIT_EXPECT_EQ(test, kunit_suppressed_warning_count(w), 1); ``` This mirrors the pattern in `backtrace_suppression_test_multi_scope`. As noted in my patch 2 review, this works because the RCU grace period hasn't completed, but it's a fragile pattern to document as canonical usage. Consider adding a note that the handle memory remains valid briefly after `kunit_end_suppress_warning()` due to RCU-deferred freeing, or restructure the example to read the count before ending suppression. --- Generated by Claude Code Patch Reviewer