From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: drm/radeon/cik: fix endian cik_cp_gfx_load_microcode() Date: Thu, 12 Mar 2026 06:49:18 +1000 Message-ID: In-Reply-To: <20260311171419.559180-1-ben.dooks@codethink.co.uk> References: <20260311171419.559180-1-ben.dooks@codethink.co.uk> <20260311171419.559180-1-ben.dooks@codethink.co.uk> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Verdict: Correct and straightforward fix.** The variable `fw_data` is declared as `const __le32 *` at line 3900. In the= new firmware header path (the `if` branch), the PFP and CE sections correc= tly cast to `(const __le32 *)`, but the ME section incorrectly casts to `(c= onst __be32 *)`: ```c /* PFP */ fw_data =3D (const __le32 *) // correct (rdev->pfp_fw->data + ...); /* CE */ fw_data =3D (const __le32 *) // correct (rdev->ce_fw->data + ...); /* ME */ fw_data =3D (const __be32 *) // BUG - should be __le32 (rdev->me_fw->data + ...); ``` This is clearly a copy-paste error from the `else` branch (lines 3934-3957)= , which handles legacy firmware format using `__be32`. In the new-format br= anch, all firmware data uses `le32_to_cpup()` for reading (line 3931), so t= he cast must be `__le32 *` to match. The fix changes the cast to `(const __le32 *)`, consistent with the PFP and= CE casts above it and with the `le32_to_cpup()` usage that follows. This h= as no runtime impact since the cast is just a pointer type annotation =E2= =80=94 the underlying data and byte-swap operations are unchanged =E2=80=94= but it silences a legitimate sparse warning and makes the code correctly s= elf-documenting. **No issues found.** Reviewed-by worthy. --- Generated by Claude Code Patch Reviewer