public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/ttm: document that ttm_bo_swapout deals with pages
Date: Tue, 10 Mar 2026 11:58:56 +1000	[thread overview]
Message-ID: <review-patch1-20260309-ttm_bo_swapout_doc-v1-1-eeb08176a00b@igalia.com> (raw)
In-Reply-To: <20260309-ttm_bo_swapout_doc-v1-1-eeb08176a00b@igalia.com>

Patch Review

**Status: Correct, ready to merge.**

The patch fixes two inaccuracies in the kerneldoc for `ttm_bo_swapout()`:

1. `@target` parameter was documented as "bytes" but is actually "pages"
2. Return value was documented as "bytes" but is actually "pages"

This is verifiable by tracing the code:

- `ttm_bo_swapout()` passes `target` directly to `ttm_lru_walk_for_evict()` at `ttm_bo.c:1234`
- The `process_bo` callback (`ttm_bo_swapout_cb`) returns `num_pages` (from `tt->num_pages`) at `ttm_bo.c:1144` for deleted BOs
- `ttm_lru_walk_for_evict()` accumulates these return values as `progress` and compares against `target` at `ttm_bo_util.c:912-913`

So `target` and the return value are unambiguously in pages.

**Minor pre-existing nit (not introduced by this patch):** The `@man` doc at line 1212 has a typo: "goint" should be "going". The author may want to fix that in a follow-up or fold it in if they respin.

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-03-10  1:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-09 18:49 [PATCH] drm/ttm: document that ttm_bo_swapout deals with pages Thadeu Lima de Souza Cascardo
2026-03-10  1:58 ` Claude Code Review Bot [this message]
2026-03-10  1:58 ` 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-20260309-ttm_bo_swapout_doc-v1-1-eeb08176a00b@igalia.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