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/amdkfd: simplify kgd_gfx_v9_get_cu_occupancy() Date: Tue, 28 Apr 2026 13:44:59 +1000 Message-ID: In-Reply-To: <20260428022605.447901-1-ynorov@nvidia.com> References: <20260428022605.447901-1-ynorov@nvidia.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Overall Series Review Subject: drm/amdkfd: simplify kgd_gfx_v9_get_cu_occupancy() Author: Yury Norov Patches: 1 Reviewed: 2026-04-28T13:44:59.288137 --- This is a single patch that attempts to simplify `kgd_gfx_v9_get_cu_occupancy()` by replacing a manual bitmap-complement-then-loop pattern with the kernel's `for_each_andnot_bit()` iterator. The intent is good and the cleanup would be welcome, but **the arguments to `for_each_andnot_bit()` are swapped**, completely inverting which queues are processed. This is a correctness bug that would cause the function to report wave occupancy for the wrong set of queues. --- Generated by Claude Code Patch Reviewer