Use __le32 pointer type to resolve the sparse warnings.

sparse warnings:
 ras/core/eeprom.c:275:15: sparse: expected unsigned int [usertype]
 ras/core/eeprom.c:275:15: sparse: got restricted __le32 [usertype]

 ras/core/eeprom.c:277:15: sparse: expected unsigned int [usertype]
 ras/core/eeprom.c:277:15: sparse: got restricted __le32 [usertype]

 ras/core/eeprom.c:288:33: sparse: sparse: cast to restricted __le32
 ras/core/eeprom.c:289:33: sparse: sparse: cast to restricted __le32
 ras/core/eeprom.c:290:33: sparse: sparse: cast to restricted __le32
 ras/core/eeprom.c:291:33: sparse: sparse: cast to restricted __le32

 ras/core/eeprom.c:333:15: sparse: expected unsigned int [usertype]
 ras/core/eeprom.c:333:15: sparse: got restricted __le32 [usertype]
 ras/core/eeprom.c:343:15: sparse: sparse: cast to restricted __le32

Fixes: d95700604fbc ("drm/amd/ras: rename core ras_* files and update include 
guards")
Reported-by: kernel test robot <[email protected]>
Closes: 
https://lore.kernel.org/oe-kbuild-all/[email protected]/

Signed-off-by: YiPeng Chai <[email protected]>
---
 drivers/gpu/drm/amd/ras/core/eeprom.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/ras/core/eeprom.c 
b/drivers/gpu/drm/amd/ras/core/eeprom.c
index e7aad113b98a..efa04cd8fbe0 100644
--- a/drivers/gpu/drm/amd/ras/core/eeprom.c
+++ b/drivers/gpu/drm/amd/ras/core/eeprom.c
@@ -260,7 +260,7 @@ static void
 __encode_table_header_to_buf(struct ras_eeprom_table_header *hdr,
                             unsigned char *buf)
 {
-       u32 *pp = (uint32_t *)buf;
+       __le32 *pp = (__le32 *)buf;
 
        pp[0] = cpu_to_le32(hdr->header);
        pp[1] = cpu_to_le32(hdr->version);
@@ -273,7 +273,7 @@ static void
 __decode_table_header_from_buf(struct ras_eeprom_table_header *hdr,
                               unsigned char *buf)
 {
-       u32 *pp = (uint32_t *)buf;
+       __le32 *pp = (__le32 *)buf;
 
        hdr->header           = le32_to_cpu(pp[0]);
        hdr->version          = le32_to_cpu(pp[1]);
@@ -315,7 +315,7 @@ static void
 __encode_table_ras_info_to_buf(struct ras_eeprom_table_ras_info *rai,
                               unsigned char *buf)
 {
-       u32 *pp = (uint32_t *)buf;
+       __le32 *pp = (__le32 *)buf;
        u32 tmp;
 
        tmp = ((uint32_t)(rai->rma_status) & 0xFF) |
-- 
2.43.0

Reply via email to