From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: mm: add rest_of_page() macro Date: Thu, 05 Mar 2026 13:59:10 +1000 Message-ID: In-Reply-To: <20260304012717.201797-2-ynorov@nvidia.com> References: <20260304012717.201797-1-ynorov@nvidia.com> <20260304012717.201797-2-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 Patch Review Defines the macro and removes the original from net/9p: ```c +#define rest_of_page(p) (PAGE_SIZE - offset_in_page(p)) ``` This is clean. The macro correctly relies on `offset_in_page()` for the cas= t to `unsigned long`, so it works with both pointers and integer types (lof= f_t, unsigned long, etc.). The return type is `unsigned long`, which is app= ropriate for a byte count within a page. The removal of the `static unsigned int rest_of_page(void *data)` function = from `net/9p/trans_virtio.c` is the exact equivalent. Note the original was= `unsigned int` return and accepted `void *`, while the macro returns `unsi= gned long` =E2=80=94 this is fine since the callers use the result in conte= xts that accept either width. No issues. --- Generated by Claude Code Patch Reviewer