From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: of_reserved_mem: add a helper for rmem device_init op Date: Mon, 09 Mar 2026 09:02:39 +1000 Message-ID: In-Reply-To: <20260306-b4-dmabuf-heap-coherent-rmem-v3-3-3d00d36c9bc4@redhat.com> References: <20260306-b4-dmabuf-heap-coherent-rmem-v3-0-3d00d36c9bc4@redhat.com> <20260306-b4-dmabuf-heap-coherent-rmem-v3-3-3d00d36c9bc4@redhat.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review Clean refactoring. The new `of_reserved_mem_device_init_with_mem()` extract= s the core logic from `of_reserved_mem_device_init_by_idx()`. **Minor: NULL check change in behavior** The original code in `of_reserved_mem_device_init_by_idx()` checked: ```c if (!rmem || !rmem->ops || !rmem->ops->device_init) return -EINVAL; ``` Now `of_reserved_mem_device_init_by_idx()` calls the new helper which does = these checks, but `of_reserved_mem_lookup()` can return NULL, and the new h= elper also checks `!rmem`, so the behavior is preserved. The stub for `!CON= FIG_OF_RESERVED_MEM` returns `-EOPNOTSUPP` instead of the previous `-ENOSYS= ` (from `of_reserved_mem_device_init_by_idx`'s stub) =E2=80=94 this is fine= and arguably more correct. No issues found. Well done. --- --- Generated by Claude Code Patch Reviewer