From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: nouveau/gsp/rpc: Document RPC function return value contracts Date: Thu, 04 Jun 2026 14:22:54 +1000 Message-ID: In-Reply-To: <20260601095403.228220-2-zenghongling@kylinos.cn> References: <20260601095403.228220-1-zenghongling@kylinos.cn> <20260601095403.228220-2-zenghongling@kylinos.cn> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review This patch adds kernel-doc comments documenting return value semantics. The= analysis is mostly correct, but there is a **major placement bug**: The doc comment for `r535_gsp_rpc_get` is placed before `r535_gsp_rpc_done(= )`, not before `r535_gsp_rpc_get()`: ```c +/** + * r535_gsp_rpc_get - Allocate and initialize an RPC message + * @gsp: GSP device + * @fn: RPC function number + * @payload_size: Size of the payload + * + * Return: Pointer to RPC payload data on success, or ERR_PTR() on error. + * Never returns NULL. + */ static void r535_gsp_rpc_done(struct nvkm_gsp *gsp, void *repv) ``` In the source, `r535_gsp_rpc_done()` (line 604) comes before `r535_gsp_rpc_= get()` (line 612). The doc comment is attached to the wrong function. The k= ernel-doc tooling would associate this `@gsp`, `@fn`, `@payload_size` docum= entation with `r535_gsp_rpc_done`, which only takes `(gsp, repv)` =E2=80=94= a parameter mismatch that would produce kernel-doc warnings. Minor: these are all `static` functions, so kernel-doc comments are somewha= t unconventional here =E2=80=94 inline `/* */` comments noting the return c= ontract would suffice and be less maintenance burden. --- Generated by Claude Code Patch Reviewer