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: dma-buf: heaps: use max3() in dma_heap_ioctl
Date: Tue, 28 Apr 2026 13:58:20 +1000	[thread overview]
Message-ID: <review-patch1-20260427212454.420004-3-thorsten.blum@linux.dev> (raw)
In-Reply-To: <20260427212454.420004-3-thorsten.blum@linux.dev>

Patch Review

**Status: Looks good**

The patch does two things:

1. Adds `#include <linux/minmax.h>` — correct, since `max3()` is defined there and was not previously included directly. Alphabetical ordering of the include is maintained.

2. Replaces:
   ```c
   ksize = max(max(in_size, out_size), drv_size);
   ```
   with:
   ```c
   ksize = max3(in_size, out_size, drv_size);
   ```

This is a straightforward substitution. `max3()` in `include/linux/minmax.h` (line 152) is defined via `__careful_op3(max, ...)` which performs the same type-safe three-way max. The semantics are identical.

**Minor observations:**
- The v1→v2 changelog is clear: v1 was missing the explicit `minmax.h` include, and T.J. Mercier caught it. Good iteration.
- `max()` is likely already transitively available (via `kernel.h` or similar), but adding the explicit `minmax.h` include for `max3()` is the right practice — it avoids relying on transitive includes that could break in future header cleanups.

No issues found. The patch is correct and ready to merge.

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-04-28  3:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-27 21:24 [PATCH v2] dma-buf: heaps: use max3() in dma_heap_ioctl Thorsten Blum
2026-04-28  3:58 ` Claude Code Review Bot [this message]
2026-04-28  3:58 ` Claude review: " Claude Code Review Bot
  -- strict thread matches above, loose matches on Subject: below --
2026-04-27 17:25 [PATCH] " Thorsten Blum
2026-04-28  4:15 ` Claude review: " Claude Code Review Bot
2026-04-28  4:15 ` 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-20260427212454.420004-3-thorsten.blum@linux.dev \
    --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