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/amdgpu: use bitmap_clear() in amdgpu_amdkfd_device_init() Date: Tue, 28 Apr 2026 13:43:04 +1000 Message-ID: In-Reply-To: <20260428023536.449877-1-ynorov@nvidia.com> References: <20260428023536.449877-1-ynorov@nvidia.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Overall Series Review Subject: drm/amdgpu: use bitmap_clear() in amdgpu_amdkfd_device_init() Author: Yury Norov Patches: 1 Reviewed: 2026-04-28T13:43:04.392665 --- This is a single-patch cleanup series from Yury Norov that replaces a hand-= rolled `clear_bit()` loop with `bitmap_clear()` in the amdgpu KFD device in= it path. The patch is correct and straightforward. The original code contained a misleading comment claiming `bitmap_clear()` = shouldn't be used when `nbits` is not a compile-time constant. Looking at t= he actual `bitmap_clear()` implementation in `include/linux/bitmap.h:547`, = it's clear this claim was wrong =E2=80=94 the function has an `else` fallba= ck to `__bitmap_clear()` that handles runtime-variable `nbits` just fine. T= he compile-time-constant paths (single-bit, small_const_nbits, aligned mems= et) are just optimizations, not requirements. The change is safe, correct, and provides a minor performance improvement b= y replacing N individual atomic `clear_bit()` calls with a single non-atomi= c `bitmap_clear()`, which operates on whole words at a time. **Verdict: Looks good to merge.** --- Generated by Claude Code Patch Reviewer