From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot 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 Message-ID: In-Reply-To: <20260427212454.420004-3-thorsten.blum@linux.dev> References: <20260427212454.420004-3-thorsten.blum@linux.dev> <20260427212454.420004-3-thorsten.blum@linux.dev> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Status: Looks good** The patch does two things: 1. Adds `#include ` =E2=80=94 correct, since `max3()` is de= fined there and was not previously included directly. Alphabetical ordering= of the include is maintained. 2. Replaces: ```c ksize =3D max(max(in_size, out_size), drv_size); ``` with: ```c ksize =3D 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 sa= me type-safe three-way max. The semantics are identical. **Minor observations:** - The v1=E2=86=92v2 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 simil= ar), but adding the explicit `minmax.h` include for `max3()` is the right p= ractice =E2=80=94 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