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: Mon, 18 May 2026 16:01:29 +1000 Message-ID: In-Reply-To: <20260517172352.3615-2-thorsten.blum@linux.dev> References: <20260517172352.3615-2-thorsten.blum@linux.dev> <20260517172352.3615-2-thorsten.blum@linux.dev> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review **Status: Clean** The patch does two things: 1. Adds `#include ` (line 16 after patch), which provides the `max3` macro. This is correctly placed in alphabetical order among the existing includes. 2. Replaces the nested `max()` calls: ```c - ksize = max(max(in_size, out_size), drv_size); + ksize = max3(in_size, out_size, drv_size); ``` All three variables are declared as `unsigned int` at line 138: ```c unsigned int in_size, out_size, drv_size, ksize; ``` This makes the `max3` call type-safe with no risk of signed/unsigned comparison issues. The change is functionally equivalent and slightly more readable. No concerns. **Reviewed-by: Already has R-b from T.J. Mercier.** --- Generated by Claude Code Patch Reviewer