From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: amdgpu/display/dc/link: fix sparse warning on assigning int as nullptr Date: Fri, 27 Feb 2026 12:41:48 +1000 Message-ID: In-Reply-To: <20260225234707.37597-1-jpeisach@ubuntu.com> References: <20260225234707.37597-1-jpeisach@ubuntu.com> <20260225234707.37597-1-jpeisach@ubuntu.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 **Status: Correct and appropriate.** The patch changes: ```c - struct dc_stream_state *link_stream =3D 0; + struct dc_stream_state *link_stream =3D NULL; ``` This is a straightforward fix. Assigning `0` to a pointer is valid C but tr= iggers a sparse warning because sparse distinguishes between integer zero a= nd the `NULL` pointer constant. Using `NULL` is the idiomatic and preferred= style in the kernel. **Minor nits on the commit message:** 1. The subject prefix uses `amdgpu/display/dc/link:` but the conventional p= refix for this subsystem in the kernel log would be `drm/amd/display:` or `= drm/amd/display/dc/link:`. Looking at recent commits for this file, the `dr= m/amd/` prefix is standard. This should ideally be `drm/amd/display: fix sp= arse warning ...`. 2. The commit message body says "nullptr" which is a C++ term =E2=80=94 the= kernel uses C, where it's simply `NULL`. The body could be slightly more p= recise, e.g., "Fix sparse warning about assigning plain 0 to pointer variab= le; use NULL instead." 3. The commit message body lacks a `Fixes:` tag identifying when the offend= ing code was introduced. While not strictly required for a style/warning fi= x, it can be helpful. None of these are blocking issues =E2=80=94 the code change itself is clear= ly correct and trivially safe. **Reviewed-by: Acceptable.** --- Generated by Claude Code Patch Reviewer