From: Ben Dooks <ben.dooks@codethink.co.uk>
To: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
alexander.deucher@amd.com, christian.koenig@amd.com
Cc: linux-kernel@vger.kernel.org, airlied@gmail.com, simona@ffwll.ch,
Ben Dooks <ben.dooks@codethink.co.uk>
Subject: [PATCH] drm/radeon/cik: fix endian cik_cp_gfx_load_microcode()
Date: Wed, 11 Mar 2026 17:14:19 +0000 [thread overview]
Message-ID: <20260311171419.559180-1-ben.dooks@codethink.co.uk> (raw)
The cik_cp_gfx_load_microcode() has __be32 in one of
the paths where it is assigning to an __le32. This looks
to be a copy error from the other branch of the if in
that code.
Fix the following sparse warning by changing to __le32:
drivers/gpu/drm/radeon/cik.c:3926:25: warning: incorrect type in assignment (different base types)
drivers/gpu/drm/radeon/cik.c:3926:25: expected restricted __le32 const [usertype] *[assigned] fw_data
drivers/gpu/drm/radeon/cik.c:3926:25: got restricted __be32 const [usertype] *
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
drivers/gpu/drm/radeon/cik.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c
index 51a3e0fc2f56..1f9167d5ec6e 100644
--- a/drivers/gpu/drm/radeon/cik.c
+++ b/drivers/gpu/drm/radeon/cik.c
@@ -3923,7 +3923,7 @@ static int cik_cp_gfx_load_microcode(struct radeon_device *rdev)
WREG32(CP_CE_UCODE_ADDR, le32_to_cpu(ce_hdr->header.ucode_version));
/* ME */
- fw_data = (const __be32 *)
+ fw_data = (const __le32 *)
(rdev->me_fw->data + le32_to_cpu(me_hdr->header.ucode_array_offset_bytes));
fw_size = le32_to_cpu(me_hdr->header.ucode_size_bytes) / 4;
WREG32(CP_ME_RAM_WADDR, 0);
--
2.37.2.352.g3c44437643
next reply other threads:[~2026-03-11 17:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-11 17:14 Ben Dooks [this message]
2026-03-11 20:49 ` Claude review: drm/radeon/cik: fix endian cik_cp_gfx_load_microcode() Claude Code Review Bot
2026-03-11 20:49 ` Claude Code Review Bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260311171419.559180-1-ben.dooks@codethink.co.uk \
--to=ben.dooks@codethink.co.uk \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=simona@ffwll.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox