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/tyr: add a kernel buffer object Date: Tue, 03 Mar 2026 12:48:20 +1000 Message-ID: In-Reply-To: <20260302232500.244489-11-deborah.brouwer@collabora.com> References: <20260302232500.244489-1-deborah.brouwer@collabora.com> <20260302232500.244489-11-deborah.brouwer@collabora.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review **Author:** Deborah Brouwer / Boris Brezillon Introduces `KernelBo` wrapping a GEM shmem object with auto-map/unmap in GPU VA space. ```rust + pub(crate) fn new( + ... + size: u64, + ... + ) -> Result { + ... + let bo = gem::shmem::Object::::new( + ddev, + size as usize, ``` The `size as usize` cast is safe on 64-bit (where `usize` is 64-bit), which is the target platform. But on 32-bit `COMPILE_TEST` builds, this could silently truncate. Low priority since firmware sections are small. The `Drop` impl for `KernelBo` properly unmaps the VA range and logs errors. Clean design. --- Generated by Claude Code Patch Reviewer