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 <[email protected]>
---
 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

Reply via email to