From: Omri Arad Date: Sat, 14 Jan 2017 16:58:02 +0000 (+0200) Subject: drivers: staging: rts5208: fix endianness handling X-Git-Tag: v4.14-rc1~1455^2~361 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3331f9cbddacf726dfd25d9d05a6e9aec23a97aa;p=platform%2Fkernel%2Flinux-rpi.git drivers: staging: rts5208: fix endianness handling 'cb' and 'sgb' were assigned __le values but were not marked as such, this fixes the following sparse warnings: drivers/staging/rts5208/rtsx_transport.c:220:34: warning: incorrect type in assignment (different base types) drivers/staging/rts5208/rtsx_transport.c:220:34: expected unsigned int [unsigned] [usertype] drivers/staging/rts5208/rtsx_transport.c:220:34: got restricted __le32 [usertype] drivers/staging/rts5208/rtsx_transport.c:319:44: warning: incorrect type in assignment (different base types) drivers/staging/rts5208/rtsx_transport.c:319:44: expected unsigned long long [unsigned] [long] [long long] [usertype] drivers/staging/rts5208/rtsx_transport.c:319:44: got restricted __le64 [usertype] drivers/staging/rts5208/rtsx_transport.c:319:44: warning: incorrect type in assignment (different base types) drivers/staging/rts5208/rtsx_transport.c:319:44: expected unsigned long long [unsigned] [long] [long long] [usertype] drivers/staging/rts5208/rtsx_transport.c:319:44: got restricted __le64 [usertype] Signed-off-by: Omri Arad Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rts5208/rtsx_transport.c b/drivers/staging/rts5208/rtsx_transport.c index 4d8e7c5..2379901 100644 --- a/drivers/staging/rts5208/rtsx_transport.c +++ b/drivers/staging/rts5208/rtsx_transport.c @@ -207,7 +207,7 @@ handle_errors: void rtsx_add_cmd(struct rtsx_chip *chip, u8 cmd_type, u16 reg_addr, u8 mask, u8 data) { - u32 *cb = (u32 *)(chip->host_cmds_ptr); + __le32 *cb = (__le32 *)(chip->host_cmds_ptr); u32 val = 0; val |= (u32)(cmd_type & 0x03) << 30; @@ -300,7 +300,7 @@ finish_send_cmd: static inline void rtsx_add_sg_tbl( struct rtsx_chip *chip, u32 addr, u32 len, u8 option) { - u64 *sgb = (u64 *)(chip->host_sg_tbl_ptr); + __le64 *sgb = (__le64 *)(chip->host_sg_tbl_ptr); u64 val = 0; u32 temp_len = 0; u8 temp_opt = 0;