From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: iommu/generic_pt: implement iova_to_phys_length Date: Thu, 04 Jun 2026 15:00:35 +1000 Message-ID: In-Reply-To: <20260531093637.3893199-4-guanghuifeng@linux.alibaba.com> References: <20260531093637.3893199-1-guanghuifeng@linux.alibaba.com> <20260531093637.3893199-4-guanghuifeng@linux.alibaba.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review Good use of `pt_entry_oa_lg2sz()` to determine the PTE block size. The v2 notes that Jason suggested this already handles contiguous PTE hints natively, which is correct. The error path fix is good -- the old code returned `ret` (a negative errno) from `make_range()` as a `phys_addr_t`, which would be interpreted as a valid (very large) physical address. The new code returns 0: ```c ret = make_range(common_from_iommu(iommu_table), &range, iova, 1); if (ret) return 0; // was: return ret; ``` This is a pre-existing bug fix bundled into the patch. It should arguably be a separate commit. --- Generated by Claude Code Patch Reviewer