From: Claude Code Review Bot <claude-review@example.com>
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 [thread overview]
Message-ID: <review-overall-20260428023536.449877-1-ynorov@nvidia.com> (raw)
In-Reply-To: <20260428023536.449877-1-ynorov@nvidia.com>
Overall Series Review
Subject: drm/amdgpu: use bitmap_clear() in amdgpu_amdkfd_device_init()
Author: Yury Norov <ynorov@nvidia.com>
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 init 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 the actual `bitmap_clear()` implementation in `include/linux/bitmap.h:547`, it's clear this claim was wrong — the function has an `else` fallback to `__bitmap_clear()` that handles runtime-variable `nbits` just fine. The compile-time-constant paths (single-bit, small_const_nbits, aligned memset) are just optimizations, not requirements.
The change is safe, correct, and provides a minor performance improvement by replacing N individual atomic `clear_bit()` calls with a single non-atomic `bitmap_clear()`, which operates on whole words at a time.
**Verdict: Looks good to merge.**
---
Generated by Claude Code Patch Reviewer
prev parent reply other threads:[~2026-04-28 3:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-28 2:35 [PATCH v2] drm/amdgpu: use bitmap_clear() in amdgpu_amdkfd_device_init() Yury Norov
2026-04-28 3:43 ` Claude review: " Claude Code Review Bot
2026-04-28 3:43 ` Claude Code Review Bot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=review-overall-20260428023536.449877-1-ynorov@nvidia.com \
--to=claude-review@example.com \
--cc=dri-devel-reviews@example.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox