* [PATCH] drm/radeon/cik: fix endian cik_cp_gfx_load_microcode()
@ 2026-03-11 17:14 Ben Dooks
0 siblings, 0 replies; only message in thread
From: Ben Dooks @ 2026-03-11 17:14 UTC (permalink / raw)
To: dri-devel, amd-gfx, alexander.deucher, christian.koenig
Cc: linux-kernel, airlied, simona, Ben Dooks
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-03-11 17:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-11 17:14 [PATCH] drm/radeon/cik: fix endian cik_cp_gfx_load_microcode() Ben Dooks
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®