Skip to contentSkip to conversation

drm/radeon/cik: fix endian cik_cp_gfx_load_microcode()

PATCH New Ben Dooks 1 participant 1 message Mar 11

Subsystems (2)
lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/1 drm/radeon/cik: fix endian cik_cp_gfx_load_microcode()

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] *

---
 drivers/gpu/drm/radeon/cik.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/radeon/cik.c +1 -1
index 51a3e0fc2f56..1f9167d5ec6e 100644
@@ -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);
Signature · 1 line
2.37.2.352.g3c44437643