From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: mm: add rest_of_page() macro
Date: Thu, 05 Mar 2026 13:59:10 +1000 [thread overview]
Message-ID: <review-patch1-20260304012717.201797-2-ynorov@nvidia.com> (raw)
In-Reply-To: <20260304012717.201797-2-ynorov@nvidia.com>
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 cast to `unsigned long`, so it works with both pointers and integer types (loff_t, unsigned long, etc.). The return type is `unsigned long`, which is appropriate 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 `unsigned long` — this is fine since the callers use the result in contexts that accept either width.
No issues.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-03-05 3:59 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-04 1:27 [PATCH 0/8] mm: globalize rest_of_page() macro Yury Norov
2026-03-04 1:27 ` [PATCH 1/8] mm: add " Yury Norov
2026-03-05 3:59 ` Claude Code Review Bot [this message]
2026-03-04 1:27 ` [PATCH 2/8] fs: use rest_of_page() macro where appropriate Yury Norov
2026-03-05 3:59 ` Claude review: " Claude Code Review Bot
2026-03-04 1:27 ` [PATCH 3/8] net: " Yury Norov
2026-03-05 3:59 ` Claude review: " Claude Code Review Bot
2026-03-04 1:27 ` [PATCH 4/8] core: " Yury Norov
2026-03-05 3:59 ` Claude review: " Claude Code Review Bot
2026-03-04 1:27 ` [PATCH 5/8] spi: " Yury Norov
2026-03-04 11:10 ` Mark Brown
2026-03-05 3:59 ` Claude review: " Claude Code Review Bot
2026-03-04 1:27 ` [PATCH 6/8] KVM: " Yury Norov
2026-03-05 3:59 ` Claude review: " Claude Code Review Bot
2026-03-04 1:27 ` [PATCH 7/8] drivers: ALSA: " Yury Norov
2026-03-05 3:59 ` Claude review: " Claude Code Review Bot
2026-03-04 1:27 ` [PATCH 8/8] arch: " Yury Norov
2026-03-05 3:59 ` Claude review: " Claude Code Review Bot
2026-03-04 2:28 ` [PATCH 0/8] mm: globalize rest_of_page() macro Jakub Kicinski
2026-03-04 2:42 ` Jens Axboe
2026-03-04 2:49 ` Sean Christopherson
2026-03-04 3:32 ` Yury Norov
2026-03-04 3:35 ` Jens Axboe
2026-03-04 12:48 ` Peter Zijlstra
2026-03-05 3:59 ` Claude review: " Claude Code Review Bot
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-patch1-20260304012717.201797-2-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